init
commit
d91c2a4ced
|
@ -0,0 +1,30 @@
|
|||
## 开发
|
||||
|
||||
```bash
|
||||
# 安装依赖
|
||||
npm install
|
||||
|
||||
# 建议不要直接使用 cnpm 安装依赖,会有各种诡异的 bug。可以通过如下操作解决 npm 下载速度慢的问题
|
||||
npm install --registry=https://registry.npmmirror.com
|
||||
|
||||
# 启动服务
|
||||
npm run dev
|
||||
```
|
||||
|
||||
浏览器访问 http://localhost:80
|
||||
|
||||
## 发布
|
||||
|
||||
```bash
|
||||
# 构建测试环境
|
||||
npm run build:stage
|
||||
|
||||
# 构建生产环境
|
||||
npm run build:prod
|
||||
```
|
||||
|
||||
## 注意
|
||||
|
||||
```bash
|
||||
# node.js版本不能高于16,推荐用16的最后一个LTS版本
|
||||
```
|
|
@ -0,0 +1,13 @@
|
|||
module.exports = {
|
||||
presets: [
|
||||
// https://github.com/vuejs/vue-cli/tree/master/packages/@vue/babel-preset-app
|
||||
'@vue/cli-plugin-babel/preset'
|
||||
],
|
||||
'env': {
|
||||
'development': {
|
||||
// babel-plugin-dynamic-import-node plugin only does one thing by converting all import() to require().
|
||||
// This plugin can significantly increase the speed of hot updates, when you have a large number of pages.
|
||||
'plugins': ['dynamic-import-node']
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
@echo off
|
||||
echo.
|
||||
echo [信息] 打包Web工程,生成dist文件。
|
||||
echo.
|
||||
|
||||
%~d0
|
||||
cd %~dp0
|
||||
|
||||
cd ..
|
||||
npm run build:prod
|
||||
|
||||
pause
|
File diff suppressed because one or more lines are too long
Binary file not shown.
|
@ -0,0 +1,637 @@
|
|||
declare namespace Jessibuca {
|
||||
|
||||
/** 超时信息 */
|
||||
enum TIMEOUT {
|
||||
/** 当play()的时候,如果没有数据返回 */
|
||||
loadingTimeout = 'loadingTimeout',
|
||||
/** 当播放过程中,如果超过timeout之后没有数据渲染 */
|
||||
delayTimeout = 'delayTimeout',
|
||||
}
|
||||
|
||||
/** 错误信息 */
|
||||
enum ERROR {
|
||||
/** 播放错误,url 为空的时候,调用 play 方法 */
|
||||
playError = 'playError',
|
||||
/** http 请求失败 */
|
||||
fetchError = 'fetchError',
|
||||
/** websocket 请求失败 */
|
||||
websocketError = 'websocketError',
|
||||
/** webcodecs 解码 h265 失败 */
|
||||
webcodecsH265NotSupport = 'webcodecsH265NotSupport',
|
||||
/** mediaSource 解码 h265 失败 */
|
||||
mediaSourceH265NotSupport = 'mediaSourceH265NotSupport',
|
||||
/** wasm 解码失败 */
|
||||
wasmDecodeError = 'wasmDecodeError',
|
||||
}
|
||||
|
||||
interface Config {
|
||||
/**
|
||||
* 播放器容器
|
||||
* * 若为 string ,则底层调用的是 document.getElementById('id')
|
||||
* */
|
||||
container: HTMLElement | string;
|
||||
/**
|
||||
* 设置最大缓冲时长,单位秒,播放器会自动消除延迟
|
||||
*/
|
||||
videoBuffer?: number;
|
||||
/**
|
||||
* worker地址
|
||||
* * 默认引用的是根目录下面的decoder.js文件 ,decoder.js 与 decoder.wasm文件必须是放在同一个目录下面。 */
|
||||
decoder?: string;
|
||||
/**
|
||||
* 是否不使用离屏模式(提升渲染能力)
|
||||
*/
|
||||
forceNoOffscreen?: boolean;
|
||||
/**
|
||||
* 是否开启当页面的'visibilityState'变为'hidden'的时候,自动暂停播放。
|
||||
*/
|
||||
hiddenAutoPause?: boolean;
|
||||
/**
|
||||
* 是否有音频,如果设置`false`,则不对音频数据解码,提升性能。
|
||||
*/
|
||||
hasAudio?: boolean;
|
||||
/**
|
||||
* 设置旋转角度,只支持,0(默认),180,270 三个值
|
||||
*/
|
||||
rotate?: boolean;
|
||||
/**
|
||||
* 1. 当为`true`的时候:视频画面做等比缩放后,高或宽对齐canvas区域,画面不被拉伸,但有黑边。 等同于 `setScaleMode(1)`
|
||||
* 2. 当为`false`的时候:视频画面完全填充canvas区域,画面会被拉伸。等同于 `setScaleMode(0)`
|
||||
*/
|
||||
isResize?: boolean;
|
||||
/**
|
||||
* 1. 当为`true`的时候:视频画面做等比缩放后,完全填充canvas区域,画面不被拉伸,没有黑边,但画面显示不全。等同于 `setScaleMode(2)`
|
||||
*/
|
||||
isFullSize?: boolean;
|
||||
/**
|
||||
* 1. 当为`true`的时候:ws协议不检验是否以.flv为依据,进行协议解析。
|
||||
*/
|
||||
isFlv?: boolean;
|
||||
/**
|
||||
* 是否开启控制台调试打
|
||||
*/
|
||||
debug?: boolean;
|
||||
/**
|
||||
* 1. 设置超时时长, 单位秒
|
||||
* 2. 在连接成功之前(loading)和播放中途(heart),如果超过设定时长无数据返回,则回调timeout事件
|
||||
*/
|
||||
timeout?: number;
|
||||
/**
|
||||
* 1. 设置超时时长, 单位秒
|
||||
* 2. 在连接成功之前,如果超过设定时长无数据返回,则回调timeout事件
|
||||
*/
|
||||
heartTimeout?: number;
|
||||
/**
|
||||
* 1. 设置超时时长, 单位秒
|
||||
* 2. 在连接成功之前,如果超过设定时长无数据返回,则回调timeout事件
|
||||
*/
|
||||
loadingTimeout?: number;
|
||||
/**
|
||||
* 是否支持屏幕的双击事件,触发全屏,取消全屏事件
|
||||
*/
|
||||
supportDblclickFullscreen?: boolean;
|
||||
/**
|
||||
* 是否显示网
|
||||
*/
|
||||
showBandwidth?: boolean;
|
||||
/**
|
||||
* 配置操作按钮
|
||||
*/
|
||||
operateBtns?: {
|
||||
/** 是否显示全屏按钮 */
|
||||
fullscreen?: boolean;
|
||||
/** 是否显示截图按钮 */
|
||||
screenshot?: boolean;
|
||||
/** 是否显示播放暂停按钮 */
|
||||
play?: boolean;
|
||||
/** 是否显示声音按钮 */
|
||||
audio?: boolean;
|
||||
/** 是否显示录制按 */
|
||||
record?: boolean;
|
||||
};
|
||||
/**
|
||||
* 开启屏幕常亮,在手机浏览器上, canvas标签渲染视频并不会像video标签那样保持屏幕常亮
|
||||
*/
|
||||
keepScreenOn?: boolean;
|
||||
/**
|
||||
* 是否开启声音,默认是关闭声音播放的
|
||||
*/
|
||||
isNotMute?: boolean;
|
||||
/**
|
||||
* 加载过程中文案
|
||||
*/
|
||||
loadingText?: boolean;
|
||||
/**
|
||||
* 背景图片
|
||||
*/
|
||||
background?: string;
|
||||
/**
|
||||
* 是否开启MediaSource硬解码
|
||||
* * 视频编码只支持H.264视频(Safari on iOS不支持)
|
||||
* * 不支持 forceNoOffscreen 为 false (开启离屏渲染)
|
||||
*/
|
||||
useMSE?: boolean;
|
||||
/**
|
||||
* 是否开启Webcodecs硬解码
|
||||
* * 视频编码只支持H.264视频 (需在chrome 94版本以上,需要https或者localhost环境)
|
||||
* * 支持 forceNoOffscreen 为 false (开启离屏渲染)
|
||||
* */
|
||||
useWCS?: boolean;
|
||||
/**
|
||||
* 是否开启键盘快捷键
|
||||
* 目前支持的键盘快捷键有:esc -> 退出全屏;arrowUp -> 声音增加;arrowDown -> 声音减少;
|
||||
*/
|
||||
hotKey?: boolean;
|
||||
/**
|
||||
* 在使用MSE或者Webcodecs 播放H265的时候,是否自动降级到wasm模式。
|
||||
* 设置为false 则直接关闭播放,抛出Error 异常,设置为true 则会自动切换成wasm模式播放。
|
||||
*/
|
||||
autoWasm?: boolean;
|
||||
/**
|
||||
* heartTimeout 心跳超时之后自动再播放,不再抛出异常,而直接重新播放视频地址。
|
||||
*/
|
||||
heartTimeoutReplay?: boolean,
|
||||
/**
|
||||
* heartTimeoutReplay 从试次数,超过之后,不再自动播放
|
||||
*/
|
||||
heartTimeoutReplayTimes?: number,
|
||||
/**
|
||||
* loadingTimeout loading之后自动再播放,不再抛出异常,而直接重新播放视频地址。
|
||||
*/
|
||||
loadingTimeoutReplay?: boolean,
|
||||
/**
|
||||
* heartTimeoutReplay 从试次数,超过之后,不再自动播放
|
||||
*/
|
||||
loadingTimeoutReplayTimes?: number
|
||||
/**
|
||||
* wasm解码报错之后,不再抛出异常,而是直接重新播放视频地址。
|
||||
*/
|
||||
wasmDecodeErrorReplay?: boolean,
|
||||
/**
|
||||
* https://github.com/langhuihui/jessibuca/issues/152 解决方案
|
||||
* 例如:WebGL图像预处理默认每次取4字节的数据,但是540x960分辨率下的U、V分量宽度是540/2=270不能被4整除,导致绿屏。
|
||||
*/
|
||||
openWebglAlignment?: boolean
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
declare class Jessibuca {
|
||||
|
||||
constructor(config?: Jessibuca.Config);
|
||||
|
||||
/**
|
||||
* 是否开启控制台调试打印
|
||||
@example
|
||||
// 开启
|
||||
jessibuca.setDebug(true)
|
||||
// 关闭
|
||||
jessibuca.setDebug(false)
|
||||
*/
|
||||
setDebug(flag: boolean): void;
|
||||
|
||||
/**
|
||||
* 静音
|
||||
@example
|
||||
jessibuca.mute()
|
||||
*/
|
||||
mute(): void;
|
||||
|
||||
/**
|
||||
* 取消静音
|
||||
@example
|
||||
jessibuca.cancelMute()
|
||||
*/
|
||||
cancelMute(): void;
|
||||
|
||||
/**
|
||||
* 留给上层用户操作来触发音频恢复的方法。
|
||||
*
|
||||
* iPhone,chrome等要求自动播放时,音频必须静音,需要由一个真实的用户交互操作来恢复,不能使用代码。
|
||||
*
|
||||
* https://developers.google.com/web/updates/2017/09/autoplay-policy-changes
|
||||
*/
|
||||
audioResume(): void;
|
||||
|
||||
/**
|
||||
*
|
||||
* 设置超时时长, 单位秒
|
||||
* 在连接成功之前和播放中途,如果超过设定时长无数据返回,则回调timeout事件
|
||||
|
||||
@example
|
||||
jessibuca.setTimeout(10)
|
||||
|
||||
jessibuca.on('timeout',function(){
|
||||
//
|
||||
});
|
||||
*/
|
||||
setTimeout(): void;
|
||||
|
||||
/**
|
||||
* @param mode
|
||||
* 0 视频画面完全填充canvas区域,画面会被拉伸 等同于参数 `isResize` 为false
|
||||
*
|
||||
* 1 视频画面做等比缩放后,高或宽对齐canvas区域,画面不被拉伸,但有黑边 等同于参数 `isResize` 为true
|
||||
*
|
||||
* 2 视频画面做等比缩放后,完全填充canvas区域,画面不被拉伸,没有黑边,但画面显示不全 等同于参数 `isFullResize` 为true
|
||||
@example
|
||||
jessibuca.setScaleMode(0)
|
||||
|
||||
jessibuca.setScaleMode(1)
|
||||
|
||||
jessibuca.setScaleMode(2)
|
||||
*/
|
||||
setScaleMode(mode: number): void;
|
||||
|
||||
/**
|
||||
* 暂停播放
|
||||
*
|
||||
* 可以在pause 之后,再调用 `play()`方法就继续播放之前的流。
|
||||
@example
|
||||
jessibuca.pause().then(()=>{
|
||||
console.log('pause success')
|
||||
|
||||
jessibuca.play().then(()=>{
|
||||
|
||||
}).catch((e)=>{
|
||||
|
||||
})
|
||||
|
||||
}).catch((e)=>{
|
||||
console.log('pause error',e);
|
||||
})
|
||||
*/
|
||||
pause(): Promise<void>;
|
||||
|
||||
/**
|
||||
* 关闭视频,不释放底层资源
|
||||
@example
|
||||
jessibuca.close();
|
||||
*/
|
||||
close(): void;
|
||||
|
||||
/**
|
||||
* 关闭视频,释放底层资源
|
||||
@example
|
||||
jessibuca.destroy()
|
||||
*/
|
||||
destroy(): void;
|
||||
|
||||
/**
|
||||
* 清理画布为黑色背景
|
||||
@example
|
||||
jessibuca.clearView()
|
||||
*/
|
||||
clearView(): void;
|
||||
|
||||
/**
|
||||
* 播放视频
|
||||
@example
|
||||
|
||||
jessibuca.play('url').then(()=>{
|
||||
console.log('play success')
|
||||
}).catch((e)=>{
|
||||
console.log('play error',e)
|
||||
})
|
||||
//
|
||||
jessibuca.play()
|
||||
*/
|
||||
play(url?: string): Promise<void>;
|
||||
|
||||
/**
|
||||
* 重新调整视图大小
|
||||
*/
|
||||
resize(): void;
|
||||
|
||||
/**
|
||||
* 设置最大缓冲时长,单位秒,播放器会自动消除延迟。
|
||||
*
|
||||
* 等同于 `videoBuffer` 参数。
|
||||
*
|
||||
@example
|
||||
// 设置 200ms 缓冲
|
||||
jessibuca.setBufferTime(0.2)
|
||||
*/
|
||||
setBufferTime(time: number): void;
|
||||
|
||||
/**
|
||||
* 设置旋转角度,只支持,0(默认) ,180,270 三个值。
|
||||
*
|
||||
* > 可用于实现监控画面小窗和全屏效果,由于iOS没有全屏API,此方法可以模拟页面内全屏效果而且多端效果一致。 *
|
||||
@example
|
||||
jessibuca.setRotate(0)
|
||||
|
||||
jessibuca.setRotate(90)
|
||||
|
||||
jessibuca.setRotate(270)
|
||||
*/
|
||||
setRotate(deg: number): void;
|
||||
|
||||
/**
|
||||
*
|
||||
* 设置音量大小,取值0 — 1
|
||||
*
|
||||
* > 区别于 mute 和 cancelMute 方法,虽然设置setVolume(0) 也能达到 mute方法,但是mute 方法是不调用底层播放音频的,能提高性能。而setVolume(0)只是把声音设置为0 ,以达到效果。
|
||||
* @param volume 当为0时,完全无声;当为1时,最大音量,默认值
|
||||
@example
|
||||
jessibuca.setVolume(0.2)
|
||||
|
||||
jessibuca.setVolume(0)
|
||||
|
||||
jessibuca.setVolume(1)
|
||||
*/
|
||||
setVolume(volume: number): void;
|
||||
|
||||
/**
|
||||
* 返回是否加载完毕
|
||||
@example
|
||||
var result = jessibuca.hasLoaded()
|
||||
console.log(result) // true
|
||||
*/
|
||||
hasLoaded(): boolean;
|
||||
|
||||
/**
|
||||
* 开启屏幕常亮,在手机浏览器上, canvas标签渲染视频并不会像video标签那样保持屏幕常亮。
|
||||
* H5目前在chrome\edge 84, android chrome 84及以上有原生亮屏API, 需要是https页面
|
||||
* 其余平台为模拟实现,此时为兼容实现,并不保证所有浏览器都支持
|
||||
@example
|
||||
jessibuca.setKeepScreenOn()
|
||||
*/
|
||||
setKeepScreenOn(): boolean;
|
||||
|
||||
/**
|
||||
* 全屏(取消全屏)播放视频
|
||||
@example
|
||||
jessibuca.setFullscreen(true)
|
||||
//
|
||||
jessibuca.setFullscreen(false)
|
||||
*/
|
||||
setFullscreen(flag: boolean): void;
|
||||
|
||||
/**
|
||||
*
|
||||
* 截图,调用后弹出下载框保存截图
|
||||
* @param filename 可选参数, 保存的文件名, 默认 `时间戳`
|
||||
* @param format 可选参数, 截图的格式,可选png或jpeg或者webp ,默认 `png`
|
||||
* @param quality 可选参数, 当格式是jpeg或者webp时,压缩质量,取值0 ~ 1 ,默认 `0.92`
|
||||
* @param type 可选参数, 可选download或者base64或者blob,默认`download`
|
||||
|
||||
@example
|
||||
|
||||
jessibuca.screenshot("test","png",0.5)
|
||||
|
||||
const base64 = jessibuca.screenshot("test","png",0.5,'base64')
|
||||
|
||||
const fileBlob = jessibuca.screenshot("test",'blob')
|
||||
*/
|
||||
screenshot(filename?: string, format?: string, quality?: number, type?: string): void;
|
||||
|
||||
/**
|
||||
* 开始录制。
|
||||
* @param fileName 可选,默认时间戳
|
||||
* @param fileType 可选,默认webm,支持webm 和mp4 格式
|
||||
|
||||
@example
|
||||
jessibuca.startRecord('xxx','webm')
|
||||
*/
|
||||
startRecord(fileName: string, fileType: string): void;
|
||||
|
||||
/**
|
||||
* 暂停录制并下载。
|
||||
@example
|
||||
jessibuca.stopRecordAndSave()
|
||||
*/
|
||||
stopRecordAndSave(): void;
|
||||
|
||||
/**
|
||||
* 返回是否正在播放中状态。
|
||||
@example
|
||||
var result = jessibuca.isPlaying()
|
||||
console.log(result) // true
|
||||
*/
|
||||
isPlaying(): boolean;
|
||||
|
||||
/**
|
||||
* 返回是否静音。
|
||||
@example
|
||||
var result = jessibuca.isMute()
|
||||
console.log(result) // true
|
||||
*/
|
||||
isMute(): boolean;
|
||||
|
||||
/**
|
||||
* 返回是否正在录制。
|
||||
@example
|
||||
var result = jessibuca.isRecording()
|
||||
console.log(result) // true
|
||||
*/
|
||||
isRecording(): boolean;
|
||||
|
||||
|
||||
/**
|
||||
* 监听 jessibuca 初始化事件
|
||||
* @example
|
||||
* jessibuca.on("load",function(){console.log('load')})
|
||||
*/
|
||||
on(event: 'load', callback: () => void): void;
|
||||
|
||||
/**
|
||||
* 视频播放持续时间,单位ms
|
||||
* @example
|
||||
* jessibuca.on('timeUpdate',function (ts) {console.log('timeUpdate',ts);})
|
||||
*/
|
||||
on(event: 'timeUpdate', callback: () => void): void;
|
||||
|
||||
/**
|
||||
* 当解析出视频信息时回调,2个回调参数
|
||||
* @example
|
||||
* jessibuca.on("videoInfo",function(data){console.log('width:',data.width,'height:',data.width)})
|
||||
*/
|
||||
on(event: 'videoInfo', callback: (data: {
|
||||
/** 视频宽 */
|
||||
width: number;
|
||||
/** 视频高 */
|
||||
height: number;
|
||||
}) => void): void;
|
||||
|
||||
/**
|
||||
* 当解析出音频信息时回调,2个回调参数
|
||||
* @example
|
||||
* jessibuca.on("audioInfo",function(data){console.log('numOfChannels:',data.numOfChannels,'sampleRate',data.sampleRate)})
|
||||
*/
|
||||
on(event: 'audioInfo', callback: (data: {
|
||||
/** 声频通道 */
|
||||
numOfChannels: number;
|
||||
/** 采样率 */
|
||||
sampleRate: number;
|
||||
}) => void): void;
|
||||
|
||||
/**
|
||||
* 信息,包含错误信息
|
||||
* @example
|
||||
* jessibuca.on("log",function(data){console.log('data:',data)})
|
||||
*/
|
||||
on(event: 'log', callback: () => void): void;
|
||||
|
||||
/**
|
||||
* 错误信息
|
||||
* @example
|
||||
* jessibuca.on("error",function(error){
|
||||
if(error === Jessibuca.ERROR.fetchError){
|
||||
//
|
||||
}
|
||||
else if(error === Jessibuca.ERROR.webcodecsH265NotSupport){
|
||||
//
|
||||
}
|
||||
console.log('error:',error)
|
||||
})
|
||||
*/
|
||||
on(event: 'error', callback: (err: Jessibuca.ERROR) => void): void;
|
||||
|
||||
/**
|
||||
* 当前网速, 单位KB 每秒1次,
|
||||
* @example
|
||||
* jessibuca.on("kBps",function(data){console.log('kBps:',data)})
|
||||
*/
|
||||
on(event: 'kBps', callback: (value: number) => void): void;
|
||||
|
||||
/**
|
||||
* 渲染开始
|
||||
* @example
|
||||
* jessibuca.on("start",function(){console.log('start render')})
|
||||
*/
|
||||
on(event: 'start', callback: () => void): void;
|
||||
|
||||
/**
|
||||
* 当设定的超时时间内无数据返回,则回调
|
||||
* @example
|
||||
* jessibuca.on("timeout",function(error){console.log('timeout:',error)})
|
||||
*/
|
||||
on(event: 'timeout', callback: (error: Jessibuca.TIMEOUT) => void): void;
|
||||
|
||||
/**
|
||||
* 当play()的时候,如果没有数据返回,则回调
|
||||
* @example
|
||||
* jessibuca.on("loadingTimeout",function(){console.log('timeout')})
|
||||
*/
|
||||
on(event: 'loadingTimeout', callback: () => void): void;
|
||||
|
||||
/**
|
||||
* 当播放过程中,如果超过timeout之后没有数据渲染,则抛出异常。
|
||||
* @example
|
||||
* jessibuca.on("delayTimeout",function(){console.log('timeout')})
|
||||
*/
|
||||
on(event: 'delayTimeout', callback: () => void): void;
|
||||
|
||||
/**
|
||||
* 当前是否全屏
|
||||
* @example
|
||||
* jessibuca.on("fullscreen",function(flag){console.log('is fullscreen',flag)})
|
||||
*/
|
||||
on(event: 'fullscreen', callback: () => void): void;
|
||||
|
||||
/**
|
||||
* 触发播放事件
|
||||
* @example
|
||||
* jessibuca.on("play",function(flag){console.log('play')})
|
||||
*/
|
||||
on(event: 'play', callback: () => void): void;
|
||||
|
||||
/**
|
||||
* 触发暂停事件
|
||||
* @example
|
||||
* jessibuca.on("pause",function(flag){console.log('pause')})
|
||||
*/
|
||||
on(event: 'pause', callback: () => void): void;
|
||||
|
||||
/**
|
||||
* 触发声音事件,返回boolean值
|
||||
* @example
|
||||
* jessibuca.on("mute",function(flag){console.log('is mute',flag)})
|
||||
*/
|
||||
on(event: 'mute', callback: () => void): void;
|
||||
|
||||
/**
|
||||
* 流状态统计,流开始播放后回调,每秒1次。
|
||||
* @example
|
||||
* jessibuca.on("stats",function(s){console.log("stats is",s)})
|
||||
*/
|
||||
on(event: 'stats', callback: (stats: {
|
||||
/** 当前缓冲区时长,单位毫秒 */
|
||||
buf: number;
|
||||
/** 当前视频帧率 */
|
||||
fps: number;
|
||||
/** 当前音频码率,单位bit */
|
||||
abps: number;
|
||||
/** 当前视频码率,单位bit */
|
||||
vbps: number;
|
||||
/** 当前视频帧pts,单位毫秒 */
|
||||
ts: number;
|
||||
}) => void): void;
|
||||
|
||||
/**
|
||||
* 渲染性能统计,流开始播放后回调,每秒1次。
|
||||
* @param performance 0: 表示卡顿,1: 表示流畅,2: 表示非常流程
|
||||
* @example
|
||||
* jessibuca.on("performance",function(performance){console.log("performance is",performance)})
|
||||
*/
|
||||
on(event: 'performance', callback: (performance: 0 | 1 | 2) => void): void;
|
||||
|
||||
/**
|
||||
* 录制开始的事件
|
||||
|
||||
* @example
|
||||
* jessibuca.on("recordStart",function(){console.log("record start")})
|
||||
*/
|
||||
on(event: 'recordStart', callback: () => void): void;
|
||||
|
||||
/**
|
||||
* 录制结束的事件
|
||||
|
||||
* @example
|
||||
* jessibuca.on("recordEnd",function(){console.log("record end")})
|
||||
*/
|
||||
on(event: 'recordEnd', callback: () => void): void;
|
||||
|
||||
/**
|
||||
* 录制的时候,返回的录制时长,1s一次
|
||||
|
||||
* @example
|
||||
* jessibuca.on("recordingTimestamp",function(timestamp){console.log("recordingTimestamp is",timestamp)})
|
||||
*/
|
||||
on(event: 'recordingTimestamp', callback: (timestamp: number) => void): void;
|
||||
|
||||
/**
|
||||
* 监听调用play方法 经过 初始化-> 网络请求-> 解封装 -> 解码 -> 渲染 一系列过程的时间消耗
|
||||
* @param event
|
||||
* @param callback
|
||||
*/
|
||||
on(event: 'playToRenderTimes', callback: (times: {
|
||||
playInitStart: number, // 1 初始化
|
||||
playStart: number, // 2 初始化
|
||||
streamStart: number, // 3 网络请求
|
||||
streamResponse: number, // 4 网络请求
|
||||
demuxStart: number, // 5 解封装
|
||||
decodeStart: number, // 6 解码
|
||||
videoStart: number, // 7 渲染
|
||||
playTimestamp: number,// playStart- playInitStart
|
||||
streamTimestamp: number,// streamStart - playStart
|
||||
streamResponseTimestamp: number,// streamResponse - streamStart
|
||||
demuxTimestamp: number, // demuxStart - streamResponse
|
||||
decodeTimestamp: number, // decodeStart - demuxStart
|
||||
videoTimestamp: number,// videoStart - decodeStart
|
||||
allTimestamp: number // videoStart - playInitStart
|
||||
}) => void): void
|
||||
|
||||
/**
|
||||
* 监听方法
|
||||
*
|
||||
@example
|
||||
|
||||
jessibuca.on("load",function(){console.log('load')})
|
||||
*/
|
||||
on(event: string, callback: Function): void;
|
||||
|
||||
}
|
||||
|
||||
export default Jessibuca;
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,12 @@
|
|||
@echo off
|
||||
echo.
|
||||
echo [信息] 安装Web工程,生成node_modules文件。
|
||||
echo.
|
||||
|
||||
%~d0
|
||||
cd %~dp0
|
||||
|
||||
cd ..
|
||||
npm install --registry=https://registry.npmmirror.com
|
||||
|
||||
pause
|
|
@ -0,0 +1,12 @@
|
|||
@echo off
|
||||
echo.
|
||||
echo [信息] 使用 Vue CLI 命令运行 Web 工程。
|
||||
echo.
|
||||
|
||||
%~d0
|
||||
cd %~dp0
|
||||
|
||||
cd ..
|
||||
npm run dev
|
||||
|
||||
pause
|
|
@ -0,0 +1,35 @@
|
|||
const { run } = require('runjs')
|
||||
const chalk = require('chalk')
|
||||
const config = require('../vue.config.js')
|
||||
const rawArgv = process.argv.slice(2)
|
||||
const args = rawArgv.join(' ')
|
||||
|
||||
if (process.env.npm_config_preview || rawArgv.includes('--preview')) {
|
||||
const report = rawArgv.includes('--report')
|
||||
|
||||
run(`vue-cli-service build ${args}`)
|
||||
|
||||
const port = 9526
|
||||
const publicPath = config.publicPath
|
||||
|
||||
var connect = require('connect')
|
||||
var serveStatic = require('serve-static')
|
||||
const app = connect()
|
||||
|
||||
app.use(
|
||||
publicPath,
|
||||
serveStatic('./dist', {
|
||||
index: ['index.html', '/']
|
||||
})
|
||||
)
|
||||
|
||||
app.listen(port, function () {
|
||||
console.log(chalk.green(`> Preview at http://localhost:${port}${publicPath}`))
|
||||
if (report) {
|
||||
console.log(chalk.green(`> Report at http://localhost:${port}${publicPath}report.html`))
|
||||
}
|
||||
|
||||
})
|
||||
} else {
|
||||
run(`vue-cli-service build ${args}`)
|
||||
}
|
|
@ -0,0 +1,107 @@
|
|||
{
|
||||
"name": "cdht",
|
||||
"version": "3.8.5",
|
||||
"description": "大气污染实时监测平台",
|
||||
"author": "MiMeng",
|
||||
"license": "AGPL3.0",
|
||||
"scripts": {
|
||||
"dev": "vue-cli-service serve",
|
||||
"build:prod": "vue-cli-service build",
|
||||
"build:stage": "vue-cli-service build --mode staging",
|
||||
"preview": "node build/index.js --preview",
|
||||
"lint": "eslint --ext .js,.vue src"
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
"pre-commit": "lint-staged"
|
||||
}
|
||||
},
|
||||
"lint-staged": {
|
||||
"src/**/*.{js,vue}": [
|
||||
"eslint --fix",
|
||||
"git add"
|
||||
]
|
||||
},
|
||||
"keywords": [
|
||||
"vue",
|
||||
"admin",
|
||||
"dashboard",
|
||||
"element-ui",
|
||||
"boilerplate",
|
||||
"admin-template",
|
||||
"management-system"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://gitee.com/y_project/RuoYi-Vue.git"
|
||||
},
|
||||
"dependencies": {
|
||||
"@easydarwin/easywasmplayer": "^4.0.7",
|
||||
"@jiaminghi/data-view": "^2.10.0",
|
||||
"@riophae/vue-treeselect": "0.4.0",
|
||||
"axios": "0.24.0",
|
||||
"clipboard": "2.0.8",
|
||||
"codemirror": "^5.65.2",
|
||||
"core-js": "3.25.3",
|
||||
"echarts": "4.9.0",
|
||||
"element-china-area-data": "^4.1.1",
|
||||
"element-ui": "2.15.10",
|
||||
"file-saver": "^2.0.5",
|
||||
"fuse.js": "6.4.3",
|
||||
"highlight.js": "9.18.5",
|
||||
"js-beautify": "1.13.0",
|
||||
"js-cookie": "3.0.1",
|
||||
"jsencrypt": "3.0.0-rc.1",
|
||||
"jshint": "^2.13.4",
|
||||
"jsonlint": "^1.6.3",
|
||||
"moment": "^2.29.4",
|
||||
"mqtt": "^4.3.3",
|
||||
"nprogress": "0.2.0",
|
||||
"quill": "1.3.7",
|
||||
"screenfull": "5.0.2",
|
||||
"script-loader": "^0.7.2",
|
||||
"sortablejs": "1.10.2",
|
||||
"sql-formatter": "^4.0.2",
|
||||
"vue": "2.6.12",
|
||||
"vue-clipboard2": "^0.3.3",
|
||||
"vue-codemirror": "^4.0.6",
|
||||
"vue-count-to": "1.0.13",
|
||||
"vue-cropper": "0.5.5",
|
||||
"vue-easytable": "^2.14.0",
|
||||
"vue-json-viewer": "^2.2.21",
|
||||
"vue-meta": "2.4.0",
|
||||
"vue-qr": "^4.0.9",
|
||||
"vue-router": "3.4.9",
|
||||
"vue-seamless-scroll": "^1.1.23",
|
||||
"vue2-ace-editor": "^0.0.15",
|
||||
"vuedraggable": "2.24.3",
|
||||
"vuex": "3.6.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vue/cli-plugin-babel": "4.4.6",
|
||||
"@vue/cli-plugin-eslint": "4.4.6",
|
||||
"@vue/cli-service": "4.4.6",
|
||||
"babel-eslint": "10.1.0",
|
||||
"babel-plugin-dynamic-import-node": "^2.3.3",
|
||||
"chalk": "4.1.0",
|
||||
"compression-webpack-plugin": "5.0.2",
|
||||
"connect": "3.6.6",
|
||||
"eslint": "^7.28.0",
|
||||
"eslint-plugin-vue": "7.2.0",
|
||||
"lint-staged": "10.5.3",
|
||||
"runjs": "4.4.2",
|
||||
"sass": "1.32.13",
|
||||
"sass-loader": "10.1.1",
|
||||
"script-ext-html-webpack-plugin": "2.1.5",
|
||||
"svg-sprite-loader": "5.1.1",
|
||||
"vue-template-compiler": "2.6.12"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8.9",
|
||||
"npm": ">= 3.0.0"
|
||||
},
|
||||
"browserslist": [
|
||||
"> 1%",
|
||||
"last 2 versions"
|
||||
]
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 9.4 KiB |
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,231 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
||||
|
||||
<script src="/js/jessibuca-pro/jessibuca-pro.js"></script>
|
||||
<script type="text/javascript" src="/js/EasyWasmPlayer.js"></script>
|
||||
<title>
|
||||
<%= webpackConfig.name %>
|
||||
</title>
|
||||
<!--[if lt IE 11]><script>window.location.href='/html/ie.html';</script><![endif]-->
|
||||
<style>
|
||||
html,
|
||||
body,
|
||||
#app {
|
||||
height: 100%;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.chromeframe {
|
||||
margin: 0.2em 0;
|
||||
background: #ccc;
|
||||
color: #000;
|
||||
padding: 0.2em 0;
|
||||
}
|
||||
|
||||
#loader-wrapper {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 999999;
|
||||
}
|
||||
|
||||
#loader {
|
||||
display: block;
|
||||
position: relative;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
width: 150px;
|
||||
height: 150px;
|
||||
margin: -75px 0 0 -75px;
|
||||
border-radius: 50%;
|
||||
border: 3px solid transparent;
|
||||
border-top-color: #FFF;
|
||||
-webkit-animation: spin 2s linear infinite;
|
||||
-ms-animation: spin 2s linear infinite;
|
||||
-moz-animation: spin 2s linear infinite;
|
||||
-o-animation: spin 2s linear infinite;
|
||||
animation: spin 2s linear infinite;
|
||||
z-index: 1001;
|
||||
}
|
||||
|
||||
#loader:before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 5px;
|
||||
left: 5px;
|
||||
right: 5px;
|
||||
bottom: 5px;
|
||||
border-radius: 50%;
|
||||
border: 3px solid transparent;
|
||||
border-top-color: #FFF;
|
||||
-webkit-animation: spin 3s linear infinite;
|
||||
-moz-animation: spin 3s linear infinite;
|
||||
-o-animation: spin 3s linear infinite;
|
||||
-ms-animation: spin 3s linear infinite;
|
||||
animation: spin 3s linear infinite;
|
||||
}
|
||||
|
||||
#loader:after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 15px;
|
||||
left: 15px;
|
||||
right: 15px;
|
||||
bottom: 15px;
|
||||
border-radius: 50%;
|
||||
border: 3px solid transparent;
|
||||
border-top-color: #FFF;
|
||||
-moz-animation: spin 1.5s linear infinite;
|
||||
-o-animation: spin 1.5s linear infinite;
|
||||
-ms-animation: spin 1.5s linear infinite;
|
||||
-webkit-animation: spin 1.5s linear infinite;
|
||||
animation: spin 1.5s linear infinite;
|
||||
}
|
||||
|
||||
|
||||
@-webkit-keyframes spin {
|
||||
0% {
|
||||
-webkit-transform: rotate(0deg);
|
||||
-ms-transform: rotate(0deg);
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
100% {
|
||||
-webkit-transform: rotate(360deg);
|
||||
-ms-transform: rotate(360deg);
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
0% {
|
||||
-webkit-transform: rotate(0deg);
|
||||
-ms-transform: rotate(0deg);
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
100% {
|
||||
-webkit-transform: rotate(360deg);
|
||||
-ms-transform: rotate(360deg);
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#loader-wrapper .loader-section {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
width: 51%;
|
||||
height: 100%;
|
||||
background: #7171C6;
|
||||
z-index: 1000;
|
||||
-webkit-transform: translateX(0);
|
||||
-ms-transform: translateX(0);
|
||||
transform: translateX(0);
|
||||
}
|
||||
|
||||
#loader-wrapper .loader-section.section-left {
|
||||
left: 0;
|
||||
}
|
||||
|
||||
#loader-wrapper .loader-section.section-right {
|
||||
right: 0;
|
||||
}
|
||||
|
||||
|
||||
.loaded #loader-wrapper .loader-section.section-left {
|
||||
-webkit-transform: translateX(-100%);
|
||||
-ms-transform: translateX(-100%);
|
||||
transform: translateX(-100%);
|
||||
-webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
|
||||
transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
|
||||
}
|
||||
|
||||
.loaded #loader-wrapper .loader-section.section-right {
|
||||
-webkit-transform: translateX(100%);
|
||||
-ms-transform: translateX(100%);
|
||||
transform: translateX(100%);
|
||||
-webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
|
||||
transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
|
||||
}
|
||||
|
||||
.loaded #loader {
|
||||
opacity: 0;
|
||||
-webkit-transition: all 0.3s ease-out;
|
||||
transition: all 0.3s ease-out;
|
||||
}
|
||||
|
||||
.loaded #loader-wrapper {
|
||||
visibility: hidden;
|
||||
-webkit-transform: translateY(-100%);
|
||||
-ms-transform: translateY(-100%);
|
||||
transform: translateY(-100%);
|
||||
-webkit-transition: all 0.3s 1s ease-out;
|
||||
transition: all 0.3s 1s ease-out;
|
||||
}
|
||||
|
||||
.no-js #loader-wrapper {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.no-js h1 {
|
||||
color: #222222;
|
||||
}
|
||||
|
||||
#loader-wrapper .load_title {
|
||||
font-family: 'Open Sans';
|
||||
color: #FFF;
|
||||
font-size: 19px;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
z-index: 9999999999999;
|
||||
position: absolute;
|
||||
top: 60%;
|
||||
opacity: 1;
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
#loader-wrapper .load_title span {
|
||||
font-weight: normal;
|
||||
font-style: italic;
|
||||
font-size: 13px;
|
||||
color: #FFF;
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
img {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
/* 清除地图LOGO */
|
||||
/* .BMap_cpyCtrl {
|
||||
display: none!important;
|
||||
}
|
||||
|
||||
.anchorBL {
|
||||
display: none!important;
|
||||
} */
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="app">
|
||||
<div id="loader-wrapper">
|
||||
<div id="loader"></div>
|
||||
<div class="loader-section section-left"></div>
|
||||
<div class="loader-section section-right"></div>
|
||||
<div class="load_title">正在加载系统资源,请耐心等待</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
|
@ -0,0 +1 @@
|
|||
"use strict";var Module={};var ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string";if(ENVIRONMENT_IS_NODE){var nodeWorkerThreads=require("worker_threads");var parentPort=nodeWorkerThreads.parentPort;parentPort.on("message",data=>onmessage({data:data}));var fs=require("fs");Object.assign(global,{self:global,require:require,Module:Module,location:{href:__filename},Worker:nodeWorkerThreads.Worker,importScripts:function(f){(0,eval)(fs.readFileSync(f,"utf8"))},postMessage:function(msg){parentPort.postMessage(msg)},performance:global.performance||{now:function(){return Date.now()}}})}var initializedJS=false;var pendingNotifiedProxyingQueues=[];function threadPrintErr(){var text=Array.prototype.slice.call(arguments).join(" ");if(ENVIRONMENT_IS_NODE){fs.writeSync(2,text+"\n");return}console.error(text)}function threadAlert(){var text=Array.prototype.slice.call(arguments).join(" ");postMessage({cmd:"alert",text:text,threadId:Module["_pthread_self"]()})}var err=threadPrintErr;self.alert=threadAlert;Module["instantiateWasm"]=(info,receiveInstance)=>{var instance=new WebAssembly.Instance(Module["wasmModule"],info);receiveInstance(instance);Module["wasmModule"]=null;return instance.exports};self.onmessage=e=>{try{if(e.data.cmd==="load"){Module["wasmModule"]=e.data.wasmModule;Module["wasmMemory"]=e.data.wasmMemory;Module["buffer"]=Module["wasmMemory"].buffer;Module["ENVIRONMENT_IS_PTHREAD"]=true;(e.data.urlOrBlob?import(e.data.urlOrBlob):import("./decoder-pro-mt-worker.js")).then(function(exports){return exports.default(Module)}).then(function(instance){Module=instance})}else if(e.data.cmd==="run"){Module["__performance_now_clock_drift"]=performance.now()-e.data.time;Module["__emscripten_thread_init"](e.data.pthread_ptr,0,0,1);Module["establishStackSpace"]();Module["PThread"].receiveObjectTransfer(e.data);Module["PThread"].threadInitTLS();if(!initializedJS){Module["___embind_register_native_and_builtin_types"]();pendingNotifiedProxyingQueues.forEach(queue=>{Module["executeNotifiedProxyingQueue"](queue)});pendingNotifiedProxyingQueues=[];initializedJS=true}try{Module["invokeEntryPoint"](e.data.start_routine,e.data.arg)}catch(ex){if(ex!="unwind"){if(ex instanceof Module["ExitStatus"]){if(Module["keepRuntimeAlive"]()){}else{Module["__emscripten_thread_exit"](ex.status)}}else{throw ex}}}}else if(e.data.cmd==="cancel"){if(Module["_pthread_self"]()){Module["__emscripten_thread_exit"](-1)}}else if(e.data.target==="setimmediate"){}else if(e.data.cmd==="processProxyingQueue"){if(initializedJS){Module["executeNotifiedProxyingQueue"](e.data.queue)}else{pendingNotifiedProxyingQueues.push(e.data.queue)}}else{err("worker.js received unknown command "+e.data.cmd);err(e.data)}}catch(ex){err("worker.js onmessage() captured an uncaught exception: "+ex);if(ex&&ex.stack)err(ex.stack);if(Module["__emscripten_thread_crashed"]){Module["__emscripten_thread_crashed"]()}throw ex}};
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
|
@ -0,0 +1 @@
|
|||
"use strict";var Module={};var ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string";if(ENVIRONMENT_IS_NODE){var nodeWorkerThreads=require("worker_threads");var parentPort=nodeWorkerThreads.parentPort;parentPort.on("message",data=>onmessage({data:data}));var fs=require("fs");Object.assign(global,{self:global,require:require,Module:Module,location:{href:__filename},Worker:nodeWorkerThreads.Worker,importScripts:f=>(0,eval)(fs.readFileSync(f,"utf8")+"//# sourceURL="+f),postMessage:msg=>parentPort.postMessage(msg),performance:global.performance||{now:Date.now}})}var initializedJS=false;function threadPrintErr(){var text=Array.prototype.slice.call(arguments).join(" ");if(ENVIRONMENT_IS_NODE){fs.writeSync(2,text+"\n");return}console.error(text)}function threadAlert(){var text=Array.prototype.slice.call(arguments).join(" ");postMessage({cmd:"alert",text:text,threadId:Module["_pthread_self"]()})}var err=threadPrintErr;self.alert=threadAlert;Module["instantiateWasm"]=(info,receiveInstance)=>{var module=Module["wasmModule"];Module["wasmModule"]=null;var instance=new WebAssembly.Instance(module,info);return receiveInstance(instance)};self.onunhandledrejection=e=>{throw e.reason||e};function handleMessage(e){try{if(e.data.cmd==="load"){let messageQueue=[];self.onmessage=e=>messageQueue.push(e);self.startWorker=instance=>{Module=instance;postMessage({"cmd":"loaded"});for(let msg of messageQueue){handleMessage(msg)}self.onmessage=handleMessage};Module["wasmModule"]=e.data.wasmModule;for(const handler of e.data.handlers){Module[handler]=(...args)=>{postMessage({cmd:"callHandler",handler:handler,args:args})}}Module["wasmMemory"]=e.data.wasmMemory;Module["buffer"]=Module["wasmMemory"].buffer;Module["ENVIRONMENT_IS_PTHREAD"]=true;(e.data.urlOrBlob?import(e.data.urlOrBlob):import("./decoder-pro-simd-mt-worker.js")).then(exports=>exports.default(Module))}else if(e.data.cmd==="run"){Module["__emscripten_thread_init"](e.data.pthread_ptr,0,0,1);Module["__emscripten_thread_mailbox_await"](e.data.pthread_ptr);Module["establishStackSpace"]();Module["PThread"].receiveObjectTransfer(e.data);Module["PThread"].threadInitTLS();if(!initializedJS){Module["__embind_initialize_bindings"]();initializedJS=true}try{Module["invokeEntryPoint"](e.data.start_routine,e.data.arg)}catch(ex){if(ex!="unwind"){throw ex}}}else if(e.data.cmd==="cancel"){if(Module["_pthread_self"]()){Module["__emscripten_thread_exit"](-1)}}else if(e.data.target==="setimmediate"){}else if(e.data.cmd==="checkMailbox"){if(initializedJS){Module["checkMailbox"]()}}else if(e.data.cmd){err(`worker.js received unknown command ${e.data.cmd}`);err(e.data)}}catch(ex){if(Module["__emscripten_thread_crashed"]){Module["__emscripten_thread_crashed"]()}throw ex}}self.onmessage=handleMessage;
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,2 @@
|
|||
User-agent: *
|
||||
Disallow: /
|
|
@ -0,0 +1,31 @@
|
|||
<template>
|
||||
<div id="app" style="background-color:#0e2e87" v-if="$route.meta.bigScreen">
|
||||
<router-view />
|
||||
</div>
|
||||
<div id="app" v-else>
|
||||
<router-view />
|
||||
<theme-picker />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ThemePicker from "@/components/ThemePicker";
|
||||
|
||||
export default {
|
||||
name: "App",
|
||||
components: { ThemePicker },
|
||||
metaInfo() {
|
||||
return {
|
||||
title: this.$store.state.settings.dynamicTitle && this.$store.state.settings.title,
|
||||
titleTemplate: title => {
|
||||
return title ? `${title} - ${process.env.VUE_APP_TITLE}` : process.env.VUE_APP_TITLE
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
#app .theme-picker {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,60 @@
|
|||
import request from '@/utils/request';
|
||||
|
||||
// 查询设备告警列表
|
||||
export function listAlert(query) {
|
||||
return request({
|
||||
url: '/iot/alert/list',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
// 查询设备告警关联的场景列表
|
||||
export function getScenesByAlertId(alertId) {
|
||||
return request({
|
||||
url: '/iot/alert/getScenesByAlertId/' + alertId,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 查询设备告警关联的通知模板
|
||||
export function listNotifyTemplate(alertId) {
|
||||
return request({
|
||||
url: '/iot/alert/listNotifyTemplate/' + alertId,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 查询设备告警详细
|
||||
export function getAlert(alertId) {
|
||||
return request({
|
||||
url: '/iot/alert/' + alertId,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 新增设备告警
|
||||
export function addAlert(data) {
|
||||
return request({
|
||||
url: '/iot/alert',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 修改设备告警
|
||||
export function updateAlert(data) {
|
||||
return request({
|
||||
url: '/iot/alert',
|
||||
method: 'put',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 删除设备告警
|
||||
export function delAlert(alertId) {
|
||||
return request({
|
||||
url: '/iot/alert/' + alertId,
|
||||
method: 'delete',
|
||||
});
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询设备告警列表
|
||||
export function listAlertLog(query) {
|
||||
return request({
|
||||
url: '/iot/alertLog/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询设备告警详细
|
||||
export function getAlertLog(alertLogId) {
|
||||
return request({
|
||||
url: '/iot/alertLog/' + alertLogId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增设备告警
|
||||
export function addAlertLog(data) {
|
||||
return request({
|
||||
url: '/iot/alertLog',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改设备告警
|
||||
export function updateAlertLog(data) {
|
||||
return request({
|
||||
url: '/iot/alertLog',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除设备告警
|
||||
export function delAlertLog(alertLogId) {
|
||||
return request({
|
||||
url: '/iot/alertLog/' + alertLogId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
import request from '@/utils/request';
|
||||
|
||||
// 查询用户列表
|
||||
export function alertUserList(query) {
|
||||
return request({
|
||||
url: '/iot/deviceAlertUser/query',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
// 查询告警用户列表
|
||||
export function listUser(data) {
|
||||
return request({
|
||||
url: '/iot/deviceAlertUser/list',
|
||||
method: 'get',
|
||||
params: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 新增告警用户
|
||||
export function addAlertUser(data) {
|
||||
return request({
|
||||
url: '/iot/deviceAlertUser',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 删除告警用户
|
||||
export function delAlertUser(deviceId, userId) {
|
||||
return request({
|
||||
url: '/iot/deviceAlertUser?deviceId=' + deviceId + '&userId=' + userId,
|
||||
method: 'delete',
|
||||
});
|
||||
}
|
|
@ -0,0 +1,52 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询产品授权码列表
|
||||
export function listAuthorize(query) {
|
||||
return request({
|
||||
url: '/iot/authorize/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询产品授权码详细
|
||||
export function getAuthorize(authorizeId) {
|
||||
return request({
|
||||
url: '/iot/authorize/' + authorizeId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增产品授权码
|
||||
export function addAuthorize(data) {
|
||||
return request({
|
||||
url: '/iot/authorize',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
//根据数量批量新增产品授权码
|
||||
export function addProductAuthorizeByNum(data) {
|
||||
return request({
|
||||
url: '/iot/authorize/addProductAuthorizeByNum',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 修改产品授权码
|
||||
export function updateAuthorize(data) {
|
||||
return request({
|
||||
url: '/iot/authorize',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除产品授权码
|
||||
export function delAuthorize(authorizeId) {
|
||||
return request({
|
||||
url: '/iot/authorize/' + authorizeId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
import request from '@/utils/request';
|
||||
|
||||
// 查询产品分类列表
|
||||
export function listCategory(query) {
|
||||
return request({
|
||||
url: '/iot/category/list',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
// 查询产品简短分类列表
|
||||
export function listShortCategory(query) {
|
||||
return request({
|
||||
url: '/iot/category/shortlist',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
// 查询产品分类详细
|
||||
export function getCategory(categoryId) {
|
||||
return request({
|
||||
url: '/iot/category/' + categoryId,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 新增产品分类
|
||||
export function addCategory(data) {
|
||||
return request({
|
||||
url: '/iot/category',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 修改产品分类
|
||||
export function updateCategory(data) {
|
||||
return request({
|
||||
url: '/iot/category',
|
||||
method: 'put',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 删除产品分类
|
||||
export function delCategory(categoryId) {
|
||||
return request({
|
||||
url: '/iot/category/' + categoryId,
|
||||
method: 'delete',
|
||||
});
|
||||
}
|
|
@ -0,0 +1,105 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询监控设备通道信息列表
|
||||
export function listChannel(query) {
|
||||
return request({
|
||||
url: '/sip/channel/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询监控设备通道信息详细
|
||||
export function getChannel(channelId) {
|
||||
return request({
|
||||
url: '/sip/channel/' + channelId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增监控设备通道信息
|
||||
export function addChannel(createNum, data) {
|
||||
return request({
|
||||
url: '/sip/channel/' + createNum,
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改监控设备通道信息
|
||||
export function updateChannel(data) {
|
||||
return request({
|
||||
url: '/sip/channel',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除监控设备通道信息
|
||||
export function delChannel(channelId) {
|
||||
return request({
|
||||
url: '/sip/channel/' + channelId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 开始播放
|
||||
export function startPlay(deviceId, channelId) {
|
||||
return request({
|
||||
url: '/sip/player/play/' + deviceId + "/" + channelId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 获取流信息
|
||||
export function getStreaminfo(deviceId, channelId) {
|
||||
return request({
|
||||
url: '/sip/player/playstream/' + deviceId + "/" + channelId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function playback(deviceId, channelId, query) {
|
||||
return request({
|
||||
url: '/sip/player/playback/' + deviceId + "/" + channelId,
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function closeStream(deviceId, channelId, streamId){
|
||||
return request({
|
||||
url: '/sip/player/closeStream/' + deviceId + "/" + channelId + "/" + streamId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function playbackPause(deviceId, channelId, streamId) {
|
||||
return request({
|
||||
url: '/sip/player/playbackPause/' + deviceId + "/" + channelId + "/" + streamId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function playbackReplay(deviceId, channelId, streamId) {
|
||||
return request({
|
||||
url: '/sip/player/playbackReplay/' + deviceId + "/" + channelId + "/" + streamId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function playbackSeek(deviceId, channelId, streamId, query) {
|
||||
return request({
|
||||
url: '/sip/player/playbackSeek/' + deviceId + "/" + channelId + "/" + streamId,
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function playbackSpeed(deviceId, channelId, streamId, query) {
|
||||
return request({
|
||||
url: '/sip/player/playbackSpeed/' + deviceId + "/" + channelId + "/" + streamId,
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询云云对接列表
|
||||
export function listClientDetails(query) {
|
||||
return request({
|
||||
url: '/iot/clientDetails/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询云云对接详细
|
||||
export function getClientDetails(clientId) {
|
||||
return request({
|
||||
url: '/iot/clientDetails/' + clientId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增云云对接
|
||||
export function addClientDetails(data) {
|
||||
return request({
|
||||
url: '/iot/clientDetails',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改云云对接
|
||||
export function updateClientDetails(data) {
|
||||
return request({
|
||||
url: '/iot/clientDetails',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除云云对接
|
||||
export function delClientDetails(clientId) {
|
||||
return request({
|
||||
url: '/iot/clientDetails/' + clientId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
|
@ -0,0 +1,182 @@
|
|||
import request from '@/utils/request';
|
||||
|
||||
// 查询设备列表
|
||||
export function listDevice(query) {
|
||||
return request({
|
||||
url: '/iot/device/list',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
// 查询未授权设备列表
|
||||
export function listUnAuthDevice(query) {
|
||||
return request({
|
||||
url: '/iot/device/unAuthlist',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
// 查询分组可添加设备分页列表
|
||||
export function listDeviceByGroup(query) {
|
||||
return request({
|
||||
url: '/iot/device/listByGroup',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
// 查询设备简短列表
|
||||
export function listDeviceShort(query) {
|
||||
return request({
|
||||
url: '/iot/device/shortList',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
// 查询所有设备简短列表
|
||||
export function listAllDeviceShort() {
|
||||
return request({
|
||||
url: '/iot/device/all',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 查询设备详细
|
||||
export function getDevice(deviceId) {
|
||||
return request({
|
||||
url: '/iot/device/' + deviceId,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 设备数据同步
|
||||
export function deviceSynchronization(serialNumber) {
|
||||
return request({
|
||||
url: '/iot/device/synchronization/' + serialNumber,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 根据设备编号查询设备详细
|
||||
export function getDeviceBySerialNumber(serialNumber) {
|
||||
return request({
|
||||
url: '/iot/device/getDeviceBySerialNumber/' + serialNumber,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 查询设备统计信息
|
||||
export function getDeviceStatistic() {
|
||||
return request({
|
||||
url: '/iot/device/statistic',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 选择分配设备
|
||||
export function distributionDevice(deptId, deviceIds) {
|
||||
return request({
|
||||
url: '/iot/device/assignment?deptId=' + deptId + '&deviceIds=' + deviceIds,
|
||||
method: 'post',
|
||||
});
|
||||
}
|
||||
//回收设备
|
||||
export function recycleDevice(deviceIds) {
|
||||
return request({
|
||||
url: '/iot/device/recovery?deviceIds=' + deviceIds,
|
||||
method: 'post',
|
||||
});
|
||||
}
|
||||
//查询设备导入记录
|
||||
export function listImportRecord() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
//查询设备回收记录
|
||||
export function listRecycleRecord() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
//查询设备分配记录
|
||||
export function listAllotRecord() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 查询设备运行状态详细
|
||||
export function getDeviceRunningStatus(params) {
|
||||
return request({
|
||||
url: '/iot/device/runningStatus',
|
||||
method: 'get',
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
// 查询设备物模型的值
|
||||
export function getDeviceThingsModelValue(deviceId) {
|
||||
return request({
|
||||
url: '/iot/device/thingsModelValue/' + deviceId,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 新增设备
|
||||
export function addDevice(data) {
|
||||
return request({
|
||||
url: '/iot/device',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 修改设备
|
||||
export function updateDevice(data) {
|
||||
return request({
|
||||
url: '/iot/device',
|
||||
method: 'put',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 删除设备
|
||||
export function delDevice(deviceId) {
|
||||
return request({
|
||||
url: '/iot/device/' + deviceId,
|
||||
method: 'delete',
|
||||
});
|
||||
}
|
||||
|
||||
// 生成设备编号
|
||||
export function generatorDeviceNum(params) {
|
||||
return request({
|
||||
url: '/iot/device/generator',
|
||||
method: 'get',
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
export function getGwDevCode(params) {
|
||||
return request({
|
||||
url: '/iot/device/gwDevCount',
|
||||
method: 'get',
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
//mqtt连接参数查看
|
||||
export function getMqttConnect(params) {
|
||||
return request({
|
||||
url: '/iot/device/getMqttConnectData',
|
||||
method: 'get',
|
||||
params: params,
|
||||
});
|
||||
}
|
|
@ -0,0 +1,71 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询定时任务调度列表
|
||||
export function listJob(query) {
|
||||
return request({
|
||||
url: '/iot/job/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询定时任务调度详细
|
||||
export function getJob(jobId) {
|
||||
return request({
|
||||
url: '/iot/job/' + jobId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增定时任务调度
|
||||
export function addJob(data) {
|
||||
return request({
|
||||
url: '/iot/job',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改定时任务调度
|
||||
export function updateJob(data) {
|
||||
return request({
|
||||
url: '/iot/job',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除定时任务调度
|
||||
export function delJob(jobId) {
|
||||
return request({
|
||||
url: '/iot/job/' + jobId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 任务状态修改
|
||||
export function changeJobStatus(jobId, status) {
|
||||
const data = {
|
||||
jobId,
|
||||
status
|
||||
}
|
||||
return request({
|
||||
url: '/iot/job/changeStatus',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 定时任务立即执行一次
|
||||
export function runJob(jobId, jobGroup) {
|
||||
const data = {
|
||||
jobId,
|
||||
jobGroup
|
||||
}
|
||||
return request({
|
||||
url: '/iot/job/run',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
|
@ -0,0 +1,62 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询设备日志列表
|
||||
export function listDeviceLog(query) {
|
||||
return request({
|
||||
url: '/iot/deviceLog/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询设备监测数据
|
||||
export function listMonitor(query) {
|
||||
return request({
|
||||
url: '/iot/deviceLog/monitor',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询设备监测数据
|
||||
export function listHistory(query) {
|
||||
return request({
|
||||
url: '/iot/deviceLog/history',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询设备日志详细
|
||||
export function getDeviceLog(logId) {
|
||||
return request({
|
||||
url: '/iot/deviceLog/' + logId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增设备日志
|
||||
export function addDeviceLog(data) {
|
||||
return request({
|
||||
url: '/iot/deviceLog',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改设备日志
|
||||
export function updateDeviceLog(data) {
|
||||
return request({
|
||||
url: '/iot/deviceLog',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除设备日志
|
||||
export function delDeviceLog(logId) {
|
||||
return request({
|
||||
url: '/iot/deviceLog/' + logId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
|
@ -0,0 +1,63 @@
|
|||
import request from '@/utils/request';
|
||||
|
||||
// 查询设备用户列表
|
||||
export function listDeviceUser(query) {
|
||||
return request({
|
||||
url: '/iot/deviceUser/list',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
// 查询设备用户详细
|
||||
export function getDeviceUser(deviceId, userId) {
|
||||
return request({
|
||||
url: '/iot/share/detail?deviceId=' + deviceId + '&userId=' + userId,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 查询用户
|
||||
export function shareUser(query) {
|
||||
return request({
|
||||
url: '/iot/deviceUser/shareUser',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
// 新增设备用户
|
||||
export function addDeviceUser(data) {
|
||||
return request({
|
||||
url: '/iot/deviceUser',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 新增多个设备用户
|
||||
export function addDeviceUsers(data) {
|
||||
return request({
|
||||
url: '/iot/deviceUser/addDeviceUsers',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 修改设备用户
|
||||
export function updateDeviceUser(data) {
|
||||
return request({
|
||||
url: '/iot/deviceUser',
|
||||
method: 'put',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 删除设备用户
|
||||
export function delDeviceUser(device) {
|
||||
return request({
|
||||
url: '/iot/deviceUser',
|
||||
method: 'delete',
|
||||
data: device,
|
||||
});
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
|
||||
// 查询事件日志列表
|
||||
export function listEventLog(query) {
|
||||
return request({
|
||||
url: '/iot/event/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询事件日志详细
|
||||
export function getEventLog(logId) {
|
||||
return request({
|
||||
url: '/iot/event/' + logId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增事件日志
|
||||
export function addEventLog(data) {
|
||||
return request({
|
||||
url: '/iot/event',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改事件日志
|
||||
export function updateEventLog(data) {
|
||||
return request({
|
||||
url: '/iot/event',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除事件日志
|
||||
export function delLog(logId) {
|
||||
return request({
|
||||
url: '/iot/event/' + logId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询产品固件列表
|
||||
export function listFirmware(query) {
|
||||
return request({
|
||||
url: '/iot/firmware/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询待升级固件版本列表
|
||||
export function upGradeVersionList(query) {
|
||||
return request({
|
||||
url: '/iot/firmware/upGradeVersionList',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询设备最新固件
|
||||
export function getLatestFirmware(deviceId) {
|
||||
return request({
|
||||
url: '/iot/firmware/getLatest/' + deviceId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询产品固件详细
|
||||
export function getFirmware(firmwareId) {
|
||||
return request({
|
||||
url: '/iot/firmware/' + firmwareId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增产品固件
|
||||
export function addFirmware(data) {
|
||||
return request({
|
||||
url: '/iot/firmware',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改产品固件
|
||||
export function updateFirmware(data) {
|
||||
return request({
|
||||
url: '/iot/firmware',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除产品固件
|
||||
export function delFirmware(firmwareId) {
|
||||
return request({
|
||||
url: '/iot/firmware/' + firmwareId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
|
@ -0,0 +1,65 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询固件升级任务列表
|
||||
export function listTask(query) {
|
||||
return request({
|
||||
url: '/iot/firmware/task/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询固件升级任务详细
|
||||
export function getTask(id) {
|
||||
return request({
|
||||
url: '/iot/firmware/task/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增固件升级任务
|
||||
export function addTask(data) {
|
||||
return request({
|
||||
url: '/iot/firmware/task',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改固件升级任务
|
||||
export function updateTask(data) {
|
||||
return request({
|
||||
url: '/iot/firmware/task',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除固件升级任务
|
||||
export function delTask(id) {
|
||||
return request({
|
||||
url: '/iot/firmware/task/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 根据固件id查询下属设备列表
|
||||
export function deviceList(query) {
|
||||
return request({
|
||||
url: '/iot/firmware/task/deviceList',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 固件升级设备统计
|
||||
// 0:等待升级 1:已发送设备 2:设备收到 ===> 正在升级
|
||||
// 3:升级成功 ===> 升级成功
|
||||
// 4:升级失败 5:停止 ===> 升级失败
|
||||
export function deviceStatistic(query) {
|
||||
return request({
|
||||
url: '/iot/firmware/task/deviceStatistic',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询设备服务下发日志列表
|
||||
export function listLog(query) {
|
||||
return request({
|
||||
url: '/iot/log/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询设备服务下发日志详细
|
||||
export function getLog(id) {
|
||||
return request({
|
||||
url: '/iot/log/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增设备服务下发日志
|
||||
export function addLog(data) {
|
||||
return request({
|
||||
url: '/iot/log',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改设备服务下发日志
|
||||
export function updateLog(data) {
|
||||
return request({
|
||||
url: '/iot/log',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除设备服务下发日志
|
||||
export function delLog(id) {
|
||||
return request({
|
||||
url: '/iot/log/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询设备分组列表
|
||||
export function listGroup(query) {
|
||||
return request({
|
||||
url: '/iot/group/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询设备分组详细
|
||||
export function getGroup(groupId) {
|
||||
return request({
|
||||
url: '/iot/group/' + groupId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询分组下的关联设备ID数组
|
||||
export function getDeviceIds(groupId) {
|
||||
return request({
|
||||
url: '/iot/group/getDeviceIds/' + groupId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增设备分组
|
||||
export function addGroup(data) {
|
||||
return request({
|
||||
url: '/iot/group',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改设备分组
|
||||
export function updateGroup(data) {
|
||||
return request({
|
||||
url: '/iot/group',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 更新分组下的设备
|
||||
export function updateDeviceGroups(data) {
|
||||
return request({
|
||||
url: '/iot/group/updateDeviceGroups',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除设备分组
|
||||
export function delGroup(groupId) {
|
||||
return request({
|
||||
url: '/iot/group/' + groupId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询设备日志列表
|
||||
export function listLog(query) {
|
||||
return request({
|
||||
url: '/iot/log/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询设备日志详细
|
||||
export function getLog(deviceLogId) {
|
||||
return request({
|
||||
url: '/iot/log/' + deviceLogId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增设备日志
|
||||
export function addLog(data) {
|
||||
return request({
|
||||
url: '/iot/log',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改设备日志
|
||||
export function updateLog(data) {
|
||||
return request({
|
||||
url: '/iot/log',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除设备日志
|
||||
export function delLog(deviceLogId) {
|
||||
return request({
|
||||
url: '/iot/log/' + deviceLogId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
|
@ -0,0 +1,52 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询流媒体服务器配置列表
|
||||
export function listmediaServer(query) {
|
||||
return request({
|
||||
url: '/sip/mediaserver/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询流媒体服务器配置详细
|
||||
export function getmediaServer() {
|
||||
return request({
|
||||
url: '/sip/mediaserver/',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增流媒体服务器配置
|
||||
export function addmediaServer(data) {
|
||||
return request({
|
||||
url: '/sip/mediaserver',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改流媒体服务器配置
|
||||
export function updatemediaServer(data) {
|
||||
return request({
|
||||
url: '/sip/mediaserver',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除流媒体服务器配置
|
||||
export function delmediaServer(id) {
|
||||
return request({
|
||||
url: '/sip/mediaserver/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
export function checkmediaServer(query) {
|
||||
return request({
|
||||
url: '/sip/mediaserver/check' ,
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
|
@ -0,0 +1,78 @@
|
|||
import request from '@/utils/request';
|
||||
|
||||
// 查询物模型列表
|
||||
export function listModel(query) {
|
||||
return request({
|
||||
url: '/iot/model/list',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
// 查询物模型详细
|
||||
export function getModel(modelId) {
|
||||
return request({
|
||||
url: '/iot/model/' + modelId,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 查询物模型对应分享设备用户权限列表
|
||||
export function permListModel(productId) {
|
||||
return request({
|
||||
url: '/iot/model/permList/' + productId,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 新增物模型
|
||||
export function addModel(data) {
|
||||
return request({
|
||||
url: '/iot/model',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 导入通用物模型
|
||||
export function importModel(data) {
|
||||
return request({
|
||||
url: '/iot/model/import',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 修改物模型
|
||||
export function updateModel(data) {
|
||||
return request({
|
||||
url: '/iot/model',
|
||||
method: 'put',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 删除物模型
|
||||
export function delModel(modelId) {
|
||||
return request({
|
||||
url: '/iot/model/' + modelId,
|
||||
method: 'delete',
|
||||
});
|
||||
}
|
||||
|
||||
// 根据产品ID获取缓存的物模型
|
||||
export function cacheJsonThingsModel(productId) {
|
||||
return request({
|
||||
url: '/iot/model/cache/' + productId,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 同步采集点模板到产品物模型
|
||||
export function synchron(data) {
|
||||
return request({
|
||||
url: '/iot/model/synchron',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 集群下所有客户端列表
|
||||
export function listNettyMqttClient(query) {
|
||||
return request({
|
||||
url: '/iot/mqtt/clients',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function clientOut(query) {
|
||||
return request({
|
||||
url: '/iot/mqtt/client/out',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
export function getNettyMqttStats() {
|
||||
return request({
|
||||
url: '/bashBoard/stats',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
export function statisticNettyMqtt(query) {
|
||||
return request({
|
||||
url: '/bashBoard/metrics',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询新闻资讯列表
|
||||
export function listNews(query) {
|
||||
return request({
|
||||
url: '/iot/news/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询新闻资讯详细
|
||||
export function getNews(newsId) {
|
||||
return request({
|
||||
url: '/iot/news/' + newsId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增新闻资讯
|
||||
export function addNews(data) {
|
||||
return request({
|
||||
url: '/iot/news',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改新闻资讯
|
||||
export function updateNews(data) {
|
||||
return request({
|
||||
url: '/iot/news',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除新闻资讯
|
||||
export function delNews(newsId) {
|
||||
return request({
|
||||
url: '/iot/news/' + newsId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
|
@ -0,0 +1,52 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询新闻分类列表
|
||||
export function listNewsCategory(query) {
|
||||
return request({
|
||||
url: '/iot/newsCategory/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询产品简短分类列表
|
||||
export function listShortNewsCategory() {
|
||||
return request({
|
||||
url: '/iot/newsCategory/newsCategoryShortList',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
// 查询新闻分类详细
|
||||
export function getNewsCategory(categoryId) {
|
||||
return request({
|
||||
url: '/iot/newsCategory/' + categoryId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增新闻分类
|
||||
export function addNewsCategory(data) {
|
||||
return request({
|
||||
url: '/iot/newsCategory',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改新闻分类
|
||||
export function updateNewsCategory(data) {
|
||||
return request({
|
||||
url: '/iot/newsCategory',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除新闻分类
|
||||
export function delNewsCategory(categoryId) {
|
||||
return request({
|
||||
url: '/iot/newsCategory/' + categoryId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
|
@ -0,0 +1,68 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询第三方登录平台控制列表
|
||||
export function listPlatform(query) {
|
||||
return request({
|
||||
url: '/iot/platform/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询第三方登录平台控制详细
|
||||
export function getPlatform(socialPlatformId) {
|
||||
return request({
|
||||
url: '/iot/platform/' + socialPlatformId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增第三方登录平台控制
|
||||
export function addPlatform(data) {
|
||||
return request({
|
||||
url: '/iot/platform',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改第三方登录平台控制
|
||||
export function updatePlatform(data) {
|
||||
return request({
|
||||
url: '/iot/platform',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除第三方登录平台控制
|
||||
export function delPlatform(socialPlatformId) {
|
||||
return request({
|
||||
url: '/iot/platform/' + socialPlatformId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
//解除绑定
|
||||
export function unbind(socialUserId){
|
||||
return request({
|
||||
url: '/iot/social/unbind/' + socialUserId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
//绑定跳转
|
||||
export function bind(platform){
|
||||
return request({
|
||||
url: '/iot/social/bind/' + platform,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
//绑定
|
||||
export function bindUser(bindId){
|
||||
return request({
|
||||
url: '/iot/social/bindId/' + bindId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
|
@ -0,0 +1,62 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询变量模板从机采集点列表
|
||||
export function listPoint(query) {
|
||||
return request({
|
||||
url: '/iot/point/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询变量模板从机采集点详细
|
||||
export function getPoint(id) {
|
||||
return request({
|
||||
url: '/iot/point/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增变量模板从机采集点
|
||||
export function addPoint(data) {
|
||||
return request({
|
||||
url: '/iot/point',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改变量模板从机采集点
|
||||
export function updatePoint(data) {
|
||||
return request({
|
||||
url: '/iot/point',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除变量模板从机采集点
|
||||
export function delPoint(id) {
|
||||
return request({
|
||||
url: '/iot/point/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
//根据从机id删除采集点数据
|
||||
export function delBySlaveId(data){
|
||||
return request({
|
||||
url: '/iot/point/delBySlaveId',
|
||||
method: 'delete',
|
||||
data: data,
|
||||
|
||||
})
|
||||
}
|
||||
//..
|
||||
export function selectByTemp(query){
|
||||
return request({
|
||||
url: '/iot/point/getPoints',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
|
@ -0,0 +1,87 @@
|
|||
import request from '@/utils/request';
|
||||
|
||||
// 查询产品列表
|
||||
export function listProduct(query) {
|
||||
return request({
|
||||
url: '/iot/product/list',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
// 查询产品列表
|
||||
export function listShortProduct() {
|
||||
return request({
|
||||
url: '/iot/product/shortList',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 查询产品详细
|
||||
export function getProduct(productId) {
|
||||
return request({
|
||||
url: '/iot/product/' + productId,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 新增产品
|
||||
export function addProduct(data) {
|
||||
return request({
|
||||
url: '/iot/product',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 修改产品
|
||||
export function updateProduct(data) {
|
||||
return request({
|
||||
url: '/iot/product',
|
||||
method: 'put',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 获取产品下设备的数量
|
||||
export function deviceCount(productId) {
|
||||
return request({
|
||||
url: '/iot/product/deviceCount/' + productId,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 更新产品状态
|
||||
export function changeProductStatus(data) {
|
||||
return request({
|
||||
url: '/iot/product/status/',
|
||||
method: 'put',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 删除产品
|
||||
export function delProduct(productId) {
|
||||
return request({
|
||||
url: '/iot/product/' + productId,
|
||||
method: 'delete',
|
||||
});
|
||||
}
|
||||
|
||||
// 根据采集点模板id查询所有产品
|
||||
export function selectByTempleId(params) {
|
||||
return request({
|
||||
url: '/iot/product/queryByTemplateId',
|
||||
method: 'get',
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
// 一键复制产品
|
||||
export function copyProduct(productId) {
|
||||
return request({
|
||||
url: `/iot/product/copy/${productId}`,
|
||||
method: 'post',
|
||||
data: { productId },
|
||||
});
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询协议列表
|
||||
export function listProtocol(query) {
|
||||
return request({
|
||||
url: '/iot/protocol/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询协议详细
|
||||
export function getProtocol(id) {
|
||||
return request({
|
||||
url: '/iot/protocol/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增协议
|
||||
export function addProtocol(data) {
|
||||
return request({
|
||||
url: '/iot/protocol',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改协议
|
||||
export function updateProtocol(data) {
|
||||
return request({
|
||||
url: '/iot/protocol',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除协议
|
||||
export function delProtocol(id) {
|
||||
return request({
|
||||
url: '/iot/protocol/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
|
@ -0,0 +1,88 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
export function getDevRecord(deviceId,channelId,query) {
|
||||
return request({
|
||||
url: '/sip/record/devquery/' + deviceId + "/" + channelId,
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function getRecord(channelId,sn) {
|
||||
return request({
|
||||
url: '/sip/record/query/' + channelId + "/" + sn,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
export function getServerRecord(query) {
|
||||
return request({
|
||||
url: '/sip/record/serverRecord/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function getServerRecordByDate(query) {
|
||||
return request({
|
||||
url: '/sip/record/serverRecord/date/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function getServerRecordByStream(query) {
|
||||
return request({
|
||||
url: '/sip/record/serverRecord/stream/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function getServerRecordByApp(query) {
|
||||
return request({
|
||||
url: '/sip/record/serverRecord/app/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function getServerRecordByFile(query) {
|
||||
return request({
|
||||
url: '/sip/record/serverRecord/file/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function getServerRecordByDevice(query) {
|
||||
return request({
|
||||
url: '/sip/record/serverRecord/device/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function startPlayRecord(deviceId, channelId) {
|
||||
return request({
|
||||
url: '/sip/record/play/' + deviceId + "/" + channelId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function startDownloadRecord(deviceId, channelId, query) {
|
||||
return request({
|
||||
url: '/sip/record/download/' + deviceId + "/" + channelId,
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
export function uploadRecord(query) {
|
||||
return request({
|
||||
url: '/sip/record/upload',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
|
@ -0,0 +1,57 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
//查询设备实时数据
|
||||
export function runStatus(params) {
|
||||
return request({
|
||||
url: '/iot/runtime/runState',
|
||||
method: 'get',
|
||||
params: params,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
//查询设备实时数据
|
||||
export function serviceInvoke(data) {
|
||||
return request({
|
||||
url: '/iot/runtime/service/invoke',
|
||||
method: 'post',
|
||||
data: data,
|
||||
})
|
||||
}
|
||||
|
||||
//查询设备服务下发日志
|
||||
export function funcLog(params) {
|
||||
return request({
|
||||
url: '/iot/runtime/funcLog',
|
||||
method: 'get',
|
||||
params: params,
|
||||
})
|
||||
}
|
||||
|
||||
// ---------- 2024.07.03 新增接口 ----------
|
||||
// 获取事件模型列表数据
|
||||
export function eventModel(productId) {
|
||||
return request({
|
||||
url: `/iot/model/event/model/${productId}`,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
// 获取事件列式数据
|
||||
export function eventColumnList(params) {
|
||||
return request({
|
||||
url: '/iot/event/column/list',
|
||||
method: 'get',
|
||||
params: params,
|
||||
})
|
||||
}
|
||||
|
||||
// 查询设备单个模型历史数据
|
||||
export function eventHistoryModel(params) {
|
||||
// beginTime: 开始时间, endTime: 结束时间, modelCode: 模型code, serialNumber:设备编号
|
||||
return request({
|
||||
url: `/iot/deviceLog/history/model`,
|
||||
method: 'get',
|
||||
params: params,
|
||||
})
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询变量模板设备从机列表
|
||||
export function listSalve(query) {
|
||||
return request({
|
||||
url: '/iot/salve/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询变量模板设备从机详细
|
||||
export function getSalve(id) {
|
||||
return request({
|
||||
url: '/iot/salve/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增变量模板设备从机
|
||||
export function addSalve(data) {
|
||||
return request({
|
||||
url: '/iot/salve',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改变量模板设备从机
|
||||
export function updateSalve(data) {
|
||||
return request({
|
||||
url: '/iot/salve',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除变量模板设备从机
|
||||
export function delSalve(id) {
|
||||
return request({
|
||||
url: '/iot/salve/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
//根据产品id查询从机列表
|
||||
export function listByPid(params){
|
||||
return request({
|
||||
url: "/iot/salve/listByPId",
|
||||
method: 'get',
|
||||
params: params,
|
||||
})
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
import request from '@/utils/request';
|
||||
|
||||
// 查询场景联动列表
|
||||
export function listScene(query) {
|
||||
return request({
|
||||
url: '/iot/scene/list',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
// 查询场景联动详细
|
||||
export function getScene(sceneId) {
|
||||
return request({
|
||||
url: '/iot/scene/' + sceneId,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 新增场景联动
|
||||
export function addScene(data) {
|
||||
return request({
|
||||
url: '/iot/scene',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 修改场景联动
|
||||
export function updateScene(data) {
|
||||
return request({
|
||||
url: '/iot/scene',
|
||||
method: 'put',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 删除场景联动
|
||||
export function delScene(sceneId) {
|
||||
return request({
|
||||
url: '/iot/scene/' + sceneId,
|
||||
method: 'delete',
|
||||
});
|
||||
}
|
||||
|
||||
// 执行场景
|
||||
export function runScene(query) {
|
||||
return request({
|
||||
url: '/iot/runtime/runScene',
|
||||
method: 'post',
|
||||
params: query,
|
||||
});
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
import request from '@/utils/request';
|
||||
|
||||
// 查询规则引擎脚本列表
|
||||
export function listScript(query) {
|
||||
return request({
|
||||
url: '/iot/script/list',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
// 查询规则引擎脚本详细
|
||||
export function getScript(scriptId) {
|
||||
return request({
|
||||
url: '/iot/script/' + scriptId,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 新增规则引擎脚本
|
||||
export function addScript(data) {
|
||||
return request({
|
||||
url: '/iot/script',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 修改规则引擎脚本
|
||||
export function updateScript(data) {
|
||||
return request({
|
||||
url: '/iot/script',
|
||||
method: 'put',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 删除规则引擎脚本
|
||||
export function delScript(scriptId) {
|
||||
return request({
|
||||
url: '/iot/script/' + scriptId,
|
||||
method: 'delete',
|
||||
});
|
||||
}
|
||||
|
||||
// 验证规则脚本
|
||||
export function validateScript(scriptData) {
|
||||
return request({
|
||||
url: '/iot/script/validate',
|
||||
method: 'post',
|
||||
data: scriptData,
|
||||
});
|
||||
}
|
|
@ -0,0 +1,54 @@
|
|||
import request from '@/utils/request';
|
||||
|
||||
// 查询设备分享列表
|
||||
export function listShare(query) {
|
||||
return request({
|
||||
url: '/iot/share/list',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
// 查询用户
|
||||
export function shareUser(query) {
|
||||
return request({
|
||||
url: '/iot/share/shareUser',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
// 查询设备分享详细
|
||||
export function getShare(deviceId, userId) {
|
||||
return request({
|
||||
url: '/iot/share/detail?deviceId=' + deviceId + '&userId=' + userId,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 新增设备分享
|
||||
export function addShare(data) {
|
||||
return request({
|
||||
url: '/iot/share',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 修改设备分享
|
||||
export function updateShare(data) {
|
||||
return request({
|
||||
url: '/iot/share',
|
||||
method: 'put',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 删除设备分享
|
||||
export function delShare(data) {
|
||||
return request({
|
||||
url: '/iot/share',
|
||||
method: 'delete',
|
||||
data: data,
|
||||
});
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询模拟设备日志列表
|
||||
export function listSimulateLog(query) {
|
||||
return request({
|
||||
url: '/iot/simulate/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询sip系统配置详细
|
||||
export function getSipconfig(productId,isDefault) {
|
||||
return request({
|
||||
url: '/sip/sipconfig/' + productId+'/'+isDefault,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增sip系统配置
|
||||
export function addSipconfig(data) {
|
||||
return request({
|
||||
url: '/sip/sipconfig',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改sip系统配置
|
||||
export function updateSipconfig(data) {
|
||||
return request({
|
||||
url: '/sip/sipconfig',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function delSipconfigByProductId(productId) {
|
||||
return request({
|
||||
url: '/sip/sipconfig/product/' + productId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
|
@ -0,0 +1,74 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询监控设备列表
|
||||
export function listSipDevice(query) {
|
||||
return request({
|
||||
url: '/sip/device/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function listSipDeviceChannel(deviceId) {
|
||||
return request({
|
||||
url: '/sip/device/listchannel/'+ deviceId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询监控设备详细
|
||||
export function getSipDevice(deviceId) {
|
||||
return request({
|
||||
url: '/sip/device/' + deviceId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增监控设备
|
||||
export function addSipDevice(data) {
|
||||
return request({
|
||||
url: '/sip/device',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改监控设备
|
||||
export function updateSipDevice(data) {
|
||||
return request({
|
||||
url: '/sip/device',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除监控设备
|
||||
export function delSipDevice(deviceId) {
|
||||
return request({
|
||||
url: '/sip/device/' + deviceId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
export function delSipDeviceBySipId(sipId) {
|
||||
return request({
|
||||
url: '/sip/device/sipid/' + sipId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
export function ptzdirection(deviceId,channelId,data) {
|
||||
return request({
|
||||
url: '/sip/ptz/direction/'+ deviceId + "/" + channelId,
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function ptzscale(deviceId,channelId,data) {
|
||||
return request({
|
||||
url: '/sip/ptz/scale/'+ deviceId + "/" + channelId,
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询数据补传任务列表
|
||||
export function listTask(query) {
|
||||
return request({
|
||||
url: '/iot/task/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询数据补传任务详细
|
||||
export function getTask(id) {
|
||||
return request({
|
||||
url: '/iot/task/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增数据补传任务
|
||||
export function addTask(data) {
|
||||
return request({
|
||||
url: '/iot/task',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改数据补传任务
|
||||
export function updateTask(data) {
|
||||
return request({
|
||||
url: '/iot/task',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除数据补传任务
|
||||
export function delTask(id) {
|
||||
return request({
|
||||
url: '/iot/task/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
|
@ -0,0 +1,62 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询设备采集变量模板列表
|
||||
export function listTemp(query) {
|
||||
return request({
|
||||
url: '/iot/temp/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询设备采集变量模板详细
|
||||
export function getTemp(templateId) {
|
||||
return request({
|
||||
url: '/iot/temp/' + templateId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增设备采集变量模板
|
||||
export function addTemp(data) {
|
||||
return request({
|
||||
url: '/iot/temp',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改设备采集变量模板
|
||||
export function updateTemp(data) {
|
||||
return request({
|
||||
url: '/iot/temp',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除设备采集变量模板
|
||||
export function delTemp(templateId) {
|
||||
return request({
|
||||
url: '/iot/temp/' + templateId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
//根据产品查询采集点关联
|
||||
export function getDeviceTemp(params){
|
||||
return request({
|
||||
url: '/iot/temp/getTemp' ,
|
||||
method: 'get',
|
||||
params: params,
|
||||
})
|
||||
}
|
||||
|
||||
export function getTempByPId(params){
|
||||
return request({
|
||||
url: '/iot/temp/getTempByPid',
|
||||
method: 'get',
|
||||
params: params,
|
||||
})
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询通用物模型列表
|
||||
export function listTemplate(query) {
|
||||
return request({
|
||||
url: '/iot/template/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询通用物模型详细
|
||||
export function getTemplate(templateId) {
|
||||
return request({
|
||||
url: '/iot/template/' + templateId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增通用物模型
|
||||
export function addTemplate(data) {
|
||||
return request({
|
||||
url: '/iot/template',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改通用物模型
|
||||
export function updateTemplate(data) {
|
||||
return request({
|
||||
url: '/iot/template',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除通用物模型
|
||||
export function delTemplate(templateId) {
|
||||
return request({
|
||||
url: '/iot/template/' + templateId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询通用物模型详细
|
||||
export function getAllPoints(params) {
|
||||
return request({
|
||||
url: '/iot/template/getPoints',
|
||||
method: 'get',
|
||||
params: params,
|
||||
})
|
||||
}
|
|
@ -0,0 +1,58 @@
|
|||
import request from '@/utils/request'
|
||||
import axios from 'axios'
|
||||
import { Message } from 'element-ui'
|
||||
import { saveAs } from 'file-saver'
|
||||
import { getToken } from '@/utils/auth'
|
||||
import { blobValidate } from "@/utils/ruoyi";
|
||||
|
||||
const baseURL = process.env.VUE_APP_BASE_API;
|
||||
|
||||
// 注册方法
|
||||
export function register(data) {
|
||||
return request({
|
||||
url: '/iot/tool/register',
|
||||
headers: {
|
||||
isToken: false
|
||||
},
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 查询用户列表
|
||||
export function listUser(query) {
|
||||
return request({
|
||||
url: '/iot/tool/userList',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 获取所有下发的topic
|
||||
export function getTopics(params){
|
||||
return request({
|
||||
url: '/iot/tool/getTopics',
|
||||
method: 'get',
|
||||
params: params,
|
||||
})
|
||||
}
|
||||
|
||||
// 获取所有下发的topic
|
||||
export function decode(params){
|
||||
return request({
|
||||
url: '/iot/tool/decode',
|
||||
method: 'get',
|
||||
params: params,
|
||||
})
|
||||
}
|
||||
|
||||
// 获取所有下发的topic
|
||||
export function simulateDown(params){
|
||||
return request({
|
||||
url: '/iot/tool/simulate',
|
||||
method: 'get',
|
||||
params: params,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
import request from '@/utils/request';
|
||||
|
||||
// 高空瞭望
|
||||
export function getHighObs(query) {
|
||||
return request({
|
||||
url: '/video/high-obs/page',
|
||||
method: 'get',
|
||||
params: {
|
||||
pageNo: query?.page || 1,
|
||||
pageSize: query?.pageSize || 100,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
// 视频监控-获取视频直播源
|
||||
export function getHighObsMonitor(channelNo) {
|
||||
return request({
|
||||
url: `/video/high-obs/play/${channelNo}`,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询界面可视化配置列表
|
||||
export function listViewConfig(query) {
|
||||
return request({
|
||||
url: '/iot/viewConfig/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询界面可视化配置详细
|
||||
export function getViewConfig(viewId) {
|
||||
return request({
|
||||
url: '/iot/viewConfig/' + viewId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增界面可视化配置
|
||||
export function addViewConfig(data) {
|
||||
return request({
|
||||
url: '/iot/viewConfig',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改界面可视化配置
|
||||
export function updateViewConfig(data) {
|
||||
return request({
|
||||
url: '/iot/viewConfig',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除界面可视化配置
|
||||
export function delViewConfig(viewId) {
|
||||
return request({
|
||||
url: '/iot/viewConfig/' + viewId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
|
@ -0,0 +1,175 @@
|
|||
import request from '@/utils/request';
|
||||
|
||||
// 登录方法
|
||||
export function login(username, password, code, uuid, sourceType) {
|
||||
const data = {
|
||||
username,
|
||||
password,
|
||||
code,
|
||||
uuid,
|
||||
sourceType,
|
||||
};
|
||||
return request({
|
||||
url: '/login',
|
||||
headers: {
|
||||
isToken: false,
|
||||
},
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 注册方法
|
||||
export function register(data) {
|
||||
return request({
|
||||
url: '/register',
|
||||
headers: {
|
||||
isToken: false,
|
||||
},
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 获取用户详细信息
|
||||
export function getInfo() {
|
||||
return request({
|
||||
url: '/getInfo',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 检查BindID
|
||||
export function checkBindId(bindId) {
|
||||
return request({
|
||||
url: '/auth/checkBindId/' + bindId,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 微信绑定获取结果信息
|
||||
export function getWxBindMsg(wxBindMsgId) {
|
||||
return request({
|
||||
url: '/wechat/getWxBindMsg?wxBindMsgId=' + wxBindMsgId,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 退出方法
|
||||
export function logout() {
|
||||
return request({
|
||||
url: '/logout',
|
||||
method: 'post',
|
||||
});
|
||||
}
|
||||
|
||||
// 获取验证码
|
||||
export function getCodeImg() {
|
||||
return request({
|
||||
url: '/captchaImage',
|
||||
headers: {
|
||||
isToken: false,
|
||||
},
|
||||
method: 'get',
|
||||
timeout: 20000,
|
||||
});
|
||||
}
|
||||
// 微信登录直接跳转登录
|
||||
export function socialLogin(loginId) {
|
||||
return request({
|
||||
url: '/auth/login/' + loginId,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 微信登录绑定登录
|
||||
export function bindLogin(data) {
|
||||
return request({
|
||||
url: '/auth/bind/login',
|
||||
headers: {
|
||||
isToken: false,
|
||||
},
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 三方登录注册绑定
|
||||
export function bindRegister(data) {
|
||||
return request({
|
||||
url: '/auth/bind/register',
|
||||
headers: {
|
||||
isToken: false,
|
||||
},
|
||||
method: 'post',
|
||||
timeout: 20000,
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
//短信登录获取验证码
|
||||
export function getSmsLoginCaptcha(phoneNumber) {
|
||||
return request({
|
||||
url: '/notify/smsLoginCaptcha?phoneNumber=' + phoneNumber,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
//短信登录
|
||||
export function smsLogin(data) {
|
||||
return request({
|
||||
url: '/auth/sms/login',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
export function getErrorMsg(errorId) {
|
||||
return request({
|
||||
url: '/auth/getErrorMsg/' + errorId,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// ========== OAUTH 2.0 相关 ==========
|
||||
|
||||
export function getAuthorize(clientId) {
|
||||
return request({
|
||||
url: '/oauth2/authorize?clientId=' + clientId,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
export function authorize(responseType, clientId, redirectUri, state, autoApprove, checkedScopes, uncheckedScopes) {
|
||||
// 构建 scopes
|
||||
const scopes = {};
|
||||
for (const scope of checkedScopes) {
|
||||
scopes[scope] = true;
|
||||
}
|
||||
for (const scope of uncheckedScopes) {
|
||||
scopes[scope] = false;
|
||||
}
|
||||
// 发起请求
|
||||
return request({
|
||||
url: '/oauth2/authorize',
|
||||
headers: {
|
||||
'Content-type': 'application/x-www-form-urlencoded',
|
||||
},
|
||||
params: {
|
||||
response_type: responseType,
|
||||
client_id: clientId,
|
||||
redirect_uri: redirectUri,
|
||||
state: state,
|
||||
auto_approve: autoApprove,
|
||||
scope: JSON.stringify(scopes),
|
||||
},
|
||||
method: 'post',
|
||||
});
|
||||
}
|
||||
//登录
|
||||
export function oauthLogin(data) {
|
||||
return request({
|
||||
url: '/auth/ssoLogin',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 获取路由
|
||||
export const getRouters = () => {
|
||||
return request({
|
||||
url: '/getRouters',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
|
@ -0,0 +1,57 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询缓存详细
|
||||
export function getCache() {
|
||||
return request({
|
||||
url: '/monitor/cache',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询缓存名称列表
|
||||
export function listCacheName() {
|
||||
return request({
|
||||
url: '/monitor/cache/getNames',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询缓存键名列表
|
||||
export function listCacheKey(cacheName) {
|
||||
return request({
|
||||
url: '/monitor/cache/getKeys/' + cacheName,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询缓存内容
|
||||
export function getCacheValue(cacheName, cacheKey) {
|
||||
return request({
|
||||
url: '/monitor/cache/getValue/' + cacheName + '/' + cacheKey,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 清理指定名称缓存
|
||||
export function clearCacheName(cacheName) {
|
||||
return request({
|
||||
url: '/monitor/cache/clearCacheName/' + cacheName,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 清理指定键名缓存
|
||||
export function clearCacheKey(cacheKey) {
|
||||
return request({
|
||||
url: '/monitor/cache/clearCacheKey/' + cacheKey,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 清理全部缓存
|
||||
export function clearCacheAll() {
|
||||
return request({
|
||||
url: '/monitor/cache/clearCacheAll',
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
|
@ -0,0 +1,71 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询定时任务调度列表
|
||||
export function listJob(query) {
|
||||
return request({
|
||||
url: '/monitor/job/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询定时任务调度详细
|
||||
export function getJob(jobId) {
|
||||
return request({
|
||||
url: '/monitor/job/' + jobId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增定时任务调度
|
||||
export function addJob(data) {
|
||||
return request({
|
||||
url: '/monitor/job',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改定时任务调度
|
||||
export function updateJob(data) {
|
||||
return request({
|
||||
url: '/monitor/job',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除定时任务调度
|
||||
export function delJob(jobId) {
|
||||
return request({
|
||||
url: '/monitor/job/' + jobId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 任务状态修改
|
||||
export function changeJobStatus(jobId, status) {
|
||||
const data = {
|
||||
jobId,
|
||||
status
|
||||
}
|
||||
return request({
|
||||
url: '/monitor/job/changeStatus',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 定时任务立即执行一次
|
||||
export function runJob(jobId, jobGroup) {
|
||||
const data = {
|
||||
jobId,
|
||||
jobGroup
|
||||
}
|
||||
return request({
|
||||
url: '/monitor/job/run',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询调度日志列表
|
||||
export function listJobLog(query) {
|
||||
return request({
|
||||
url: '/monitor/jobLog/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 删除调度日志
|
||||
export function delJobLog(jobLogId) {
|
||||
return request({
|
||||
url: '/monitor/jobLog/' + jobLogId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 清空调度日志
|
||||
export function cleanJobLog() {
|
||||
return request({
|
||||
url: '/monitor/jobLog/clean',
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询登录日志列表
|
||||
export function list(query) {
|
||||
return request({
|
||||
url: '/monitor/logininfor/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 删除登录日志
|
||||
export function delLogininfor(infoId) {
|
||||
return request({
|
||||
url: '/monitor/logininfor/' + infoId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 解锁用户登录状态
|
||||
export function unlockLogininfor(userName) {
|
||||
return request({
|
||||
url: '/monitor/logininfor/unlock/' + userName,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 清空登录日志
|
||||
export function cleanLogininfor() {
|
||||
return request({
|
||||
url: '/monitor/logininfor/clean',
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询在线用户列表
|
||||
export function list(query) {
|
||||
return request({
|
||||
url: '/monitor/online/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 强退用户
|
||||
export function forceLogout(tokenId) {
|
||||
return request({
|
||||
url: '/monitor/online/' + tokenId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询操作日志列表
|
||||
export function list(query) {
|
||||
return request({
|
||||
url: '/monitor/operlog/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 删除操作日志
|
||||
export function delOperlog(operId) {
|
||||
return request({
|
||||
url: '/monitor/operlog/' + operId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 清空操作日志
|
||||
export function cleanOperlog() {
|
||||
return request({
|
||||
url: '/monitor/operlog/clean',
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 获取服务信息
|
||||
export function getServer() {
|
||||
return request({
|
||||
url: '/monitor/server',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
|
@ -0,0 +1,59 @@
|
|||
import request from '@/utils/request';
|
||||
|
||||
// 查询通知渠道列表
|
||||
export function listChannel(query) {
|
||||
return request({
|
||||
url: '/notify/channel/list',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
// 查询通知渠道详细
|
||||
export function getChannel(id) {
|
||||
return request({
|
||||
url: '/notify/channel/' + id,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 查询通知渠道和服务商
|
||||
export function getChannelMessage(query) {
|
||||
return request({
|
||||
url: '/notify/channel/listChannel',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
//查询配置信息
|
||||
export function getConfigContent(provider, channelType) {
|
||||
return request({
|
||||
url: '/notify/channel/getConfigContent?channelType=' + channelType + '&provider=' + provider,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
// 新增通知渠道
|
||||
export function addChannel(data) {
|
||||
return request({
|
||||
url: '/notify/channel',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 修改通知渠道
|
||||
export function updateChannel(data) {
|
||||
return request({
|
||||
url: '/notify/channel',
|
||||
method: 'put',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 删除通知渠道
|
||||
export function delChannel(id) {
|
||||
return request({
|
||||
url: '/notify/channel/' + id,
|
||||
method: 'delete',
|
||||
});
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
import request from '@/utils/request';
|
||||
|
||||
// 查询通知日志列表
|
||||
export function listLog(query) {
|
||||
return request({
|
||||
url: '/notify/log/list',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
// 查询通知日志详细
|
||||
export function getLog(id) {
|
||||
return request({
|
||||
url: '/notify/log/' + id,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 新增通知日志
|
||||
export function addLog(data) {
|
||||
return request({
|
||||
url: '/notify/log',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 修改通知日志
|
||||
export function updateLog(data) {
|
||||
return request({
|
||||
url: '/notify/log',
|
||||
method: 'put',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 删除通知日志
|
||||
export function delLog(id) {
|
||||
return request({
|
||||
url: '/notify/log/' + id,
|
||||
method: 'delete',
|
||||
});
|
||||
}
|
|
@ -0,0 +1,97 @@
|
|||
import request from '@/utils/request';
|
||||
|
||||
// 查询通知模版列表
|
||||
export function listTemplate(query) {
|
||||
return request({
|
||||
url: '/notify/template/list',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
// 查询通知模版详细
|
||||
export function getTemplate(id) {
|
||||
return request({
|
||||
url: '/notify/template/' + id,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 新增通知模版
|
||||
export function addTemplate(data) {
|
||||
return request({
|
||||
url: '/notify/template',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 修改通知模版
|
||||
export function updateTemplate(data) {
|
||||
return request({
|
||||
url: '/notify/template',
|
||||
method: 'put',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 删除通知模版
|
||||
export function delTemplate(id) {
|
||||
return request({
|
||||
url: '/notify/template/' + id,
|
||||
method: 'delete',
|
||||
});
|
||||
}
|
||||
|
||||
// 查询通知模版示例
|
||||
export function getTemplateExample(params) {
|
||||
return request({
|
||||
url: '/notify/template/example',
|
||||
method: 'get',
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
// 获取通知模版详细信息
|
||||
export function getUsableTempate(params) {
|
||||
return request({
|
||||
url: '/notify/template/getUsable',
|
||||
method: 'get',
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
// 修改通知模版-更新状态
|
||||
export function updateState(data) {
|
||||
return request({
|
||||
url: '/notify/template/updateState',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 测试发送
|
||||
export function notifyTestTemplate(data) {
|
||||
return request({
|
||||
url: '/notify/send',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
//获取模板参数
|
||||
export function templateParams(data) {
|
||||
return request({
|
||||
url: '/notify/template/msgParams',
|
||||
method: 'get',
|
||||
params: data,
|
||||
});
|
||||
}
|
||||
|
||||
//获取消息通知模版参数变量
|
||||
export function getVariablesList(id, channelType, provider) {
|
||||
return request({
|
||||
url: '/notify/template/listVariables?id=' + id + '&channelType=' + channelType + '&provider=' + provider,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
|
@ -0,0 +1,60 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询参数列表
|
||||
export function listConfig(query) {
|
||||
return request({
|
||||
url: '/system/config/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询参数详细
|
||||
export function getConfig(configId) {
|
||||
return request({
|
||||
url: '/system/config/' + configId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 根据参数键名查询参数值
|
||||
export function getConfigKey(configKey) {
|
||||
return request({
|
||||
url: '/system/config/configKey/' + configKey,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增参数配置
|
||||
export function addConfig(data) {
|
||||
return request({
|
||||
url: '/system/config',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改参数配置
|
||||
export function updateConfig(data) {
|
||||
return request({
|
||||
url: '/system/config',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除参数配置
|
||||
export function delConfig(configId) {
|
||||
return request({
|
||||
url: '/system/config/' + configId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 刷新参数缓存
|
||||
export function refreshCache() {
|
||||
return request({
|
||||
url: '/system/config/refreshCache',
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
|
@ -0,0 +1,59 @@
|
|||
import request from '@/utils/request';
|
||||
|
||||
// 查询机构列表
|
||||
export function listDept(query) {
|
||||
return request({
|
||||
url: '/system/dept/list',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
// 查询机构列表(排除节点)
|
||||
export function listDeptExcludeChild(deptId) {
|
||||
return request({
|
||||
url: '/system/dept/list/exclude/' + deptId,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 查询机构类型
|
||||
export function getDeptType(deptType, showOwner) {
|
||||
return request({
|
||||
url: '/system/dept/getDeptType?deptType=' + deptType + '&showOwner=' + showOwner,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 查询机构详细
|
||||
export function getDept(deptId) {
|
||||
return request({
|
||||
url: '/system/dept/' + deptId,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 新增机构
|
||||
export function addDept(data) {
|
||||
return request({
|
||||
url: '/system/dept',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 修改机构
|
||||
export function updateDept(data) {
|
||||
return request({
|
||||
url: '/system/dept',
|
||||
method: 'put',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 删除机构
|
||||
export function delDept(deptId) {
|
||||
return request({
|
||||
url: '/system/dept/' + deptId,
|
||||
method: 'delete',
|
||||
});
|
||||
}
|
|
@ -0,0 +1,52 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询字典数据列表
|
||||
export function listData(query) {
|
||||
return request({
|
||||
url: '/system/dict/data/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询字典数据详细
|
||||
export function getData(dictCode) {
|
||||
return request({
|
||||
url: '/system/dict/data/' + dictCode,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 根据字典类型查询字典数据信息
|
||||
export function getDicts(dictType) {
|
||||
return request({
|
||||
url: '/system/dict/data/type/' + dictType,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增字典数据
|
||||
export function addData(data) {
|
||||
return request({
|
||||
url: '/system/dict/data',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改字典数据
|
||||
export function updateData(data) {
|
||||
return request({
|
||||
url: '/system/dict/data',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除字典数据
|
||||
export function delData(dictCode) {
|
||||
return request({
|
||||
url: '/system/dict/data/' + dictCode,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
|
@ -0,0 +1,60 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询字典类型列表
|
||||
export function listType(query) {
|
||||
return request({
|
||||
url: '/system/dict/type/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询字典类型详细
|
||||
export function getType(dictId) {
|
||||
return request({
|
||||
url: '/system/dict/type/' + dictId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增字典类型
|
||||
export function addType(data) {
|
||||
return request({
|
||||
url: '/system/dict/type',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改字典类型
|
||||
export function updateType(data) {
|
||||
return request({
|
||||
url: '/system/dict/type',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除字典类型
|
||||
export function delType(dictId) {
|
||||
return request({
|
||||
url: '/system/dict/type/' + dictId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 刷新字典缓存
|
||||
export function refreshCache() {
|
||||
return request({
|
||||
url: '/system/dict/type/refreshCache',
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 获取字典选择框列表
|
||||
export function optionselect() {
|
||||
return request({
|
||||
url: '/system/dict/type/optionselect',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
|
@ -0,0 +1,67 @@
|
|||
import request from '@/utils/request';
|
||||
|
||||
// 查询菜单列表
|
||||
export function listMenu(query) {
|
||||
return request({
|
||||
url: '/system/menu/list',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
// 查询菜单详细
|
||||
export function getMenu(menuId) {
|
||||
return request({
|
||||
url: '/system/menu/' + menuId,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 查询菜单下拉树结构
|
||||
export function treeselect() {
|
||||
return request({
|
||||
url: '/system/menu/treeselect',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
// 根据部门查询菜单下拉树结构
|
||||
export function partMenuTreeselect(deptId) {
|
||||
return request({
|
||||
url: '/system/menu/deptMenuTreeselect/' + deptId,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 根据角色ID查询菜单下拉树结构
|
||||
export function roleMenuTreeselect(roleId, deptId) {
|
||||
return request({
|
||||
url: '/system/menu/roleMenuTreeselect?roleId=' + roleId + '&deptId=' + deptId,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 新增菜单
|
||||
export function addMenu(data) {
|
||||
return request({
|
||||
url: '/system/menu',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 修改菜单
|
||||
export function updateMenu(data) {
|
||||
return request({
|
||||
url: '/system/menu',
|
||||
method: 'put',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 删除菜单
|
||||
export function delMenu(menuId) {
|
||||
return request({
|
||||
url: '/system/menu/' + menuId,
|
||||
method: 'delete',
|
||||
});
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询公告列表
|
||||
export function listNotice(query) {
|
||||
return request({
|
||||
url: '/system/notice/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询公告详细
|
||||
export function getNotice(noticeId) {
|
||||
return request({
|
||||
url: '/system/notice/' + noticeId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增公告
|
||||
export function addNotice(data) {
|
||||
return request({
|
||||
url: '/system/notice',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改公告
|
||||
export function updateNotice(data) {
|
||||
return request({
|
||||
url: '/system/notice',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除公告
|
||||
export function delNotice(noticeId) {
|
||||
return request({
|
||||
url: '/system/notice/' + noticeId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
|
@ -0,0 +1,52 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询文件存储配置列表
|
||||
export function listConfig(query) {
|
||||
return request({
|
||||
url: '/oss/config/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询文件存储配置详细
|
||||
export function getConfig(id) {
|
||||
return request({
|
||||
url: '/oss/config/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增文件存储配置
|
||||
export function addConfig(data) {
|
||||
return request({
|
||||
url: '/oss/config',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改文件存储配置
|
||||
export function updateConfig(data) {
|
||||
return request({
|
||||
url: '/oss/config',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除文件存储配置
|
||||
export function delConfig(id) {
|
||||
return request({
|
||||
url: '/oss/config/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
export function changeOssConfigStatus(data) {
|
||||
return request({
|
||||
url: '/oss/config/changeStatus',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询文件记录列表
|
||||
export function listDetail(query) {
|
||||
return request({
|
||||
url: '/oss/detail/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询文件记录详细
|
||||
export function getDetail(id) {
|
||||
return request({
|
||||
url: '/oss/detail/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增文件记录
|
||||
export function addDetail(data) {
|
||||
return request({
|
||||
url: '/oss/detail',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改文件记录
|
||||
export function updateDetail(data) {
|
||||
return request({
|
||||
url: '/oss/detail',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除文件记录
|
||||
export function delDetail(id) {
|
||||
return request({
|
||||
url: '/oss/detail/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
export function download(ossId) {
|
||||
return request({
|
||||
url: '/oss/detail/download/' + ossId,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询岗位列表
|
||||
export function listPost(query) {
|
||||
return request({
|
||||
url: '/system/post/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询岗位详细
|
||||
export function getPost(postId) {
|
||||
return request({
|
||||
url: '/system/post/' + postId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增岗位
|
||||
export function addPost(data) {
|
||||
return request({
|
||||
url: '/system/post',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改岗位
|
||||
export function updatePost(data) {
|
||||
return request({
|
||||
url: '/system/post',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除岗位
|
||||
export function delPost(postId) {
|
||||
return request({
|
||||
url: '/system/post/' + postId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
|
@ -0,0 +1,119 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询角色列表
|
||||
export function listRole(query) {
|
||||
return request({
|
||||
url: '/system/role/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询角色详细
|
||||
export function getRole(roleId) {
|
||||
return request({
|
||||
url: '/system/role/' + roleId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增角色
|
||||
export function addRole(data) {
|
||||
return request({
|
||||
url: '/system/role',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改角色
|
||||
export function updateRole(data) {
|
||||
return request({
|
||||
url: '/system/role',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 角色数据权限
|
||||
export function dataScope(data) {
|
||||
return request({
|
||||
url: '/system/role/dataScope',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 角色状态修改
|
||||
export function changeRoleStatus(roleId, status) {
|
||||
const data = {
|
||||
roleId,
|
||||
status
|
||||
}
|
||||
return request({
|
||||
url: '/system/role/changeStatus',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除角色
|
||||
export function delRole(roleId) {
|
||||
return request({
|
||||
url: '/system/role/' + roleId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询角色已授权用户列表
|
||||
export function allocatedUserList(query) {
|
||||
return request({
|
||||
url: '/system/role/authUser/allocatedList',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询角色未授权用户列表
|
||||
export function unallocatedUserList(query) {
|
||||
return request({
|
||||
url: '/system/role/authUser/unallocatedList',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 取消用户授权角色
|
||||
export function authUserCancel(data) {
|
||||
return request({
|
||||
url: '/system/role/authUser/cancel',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 批量取消用户授权角色
|
||||
export function authUserCancelAll(data) {
|
||||
return request({
|
||||
url: '/system/role/authUser/cancelAll',
|
||||
method: 'put',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
// 授权用户选择
|
||||
export function authUserSelectAll(data) {
|
||||
return request({
|
||||
url: '/system/role/authUser/selectAll',
|
||||
method: 'put',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
// 根据角色ID查询部门树结构
|
||||
export function deptTreeSelect(roleId) {
|
||||
return request({
|
||||
url: '/system/role/deptTree/' + roleId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
|
@ -0,0 +1,173 @@
|
|||
import request from '@/utils/request';
|
||||
import { parseStrEmpty } from '@/utils/ruoyi';
|
||||
|
||||
// 查询用户列表
|
||||
export function listUser(query) {
|
||||
return request({
|
||||
url: '/system/user/list',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
// 查询终端用户列表
|
||||
export function terminalUserList(query) {
|
||||
return request({
|
||||
url: '/system/user/listTerminal',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
// 查询用户详细
|
||||
export function getUser(userId) {
|
||||
return request({
|
||||
url: '/system/user/' + parseStrEmpty(userId),
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 查询角色列表
|
||||
export function getRole(deptId) {
|
||||
return request({
|
||||
url: '/system/dept/getRole?deptId=' + deptId,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 新增用户
|
||||
export function addUser(data) {
|
||||
return request({
|
||||
url: '/system/user',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 修改用户
|
||||
export function updateUser(data) {
|
||||
return request({
|
||||
url: '/system/user',
|
||||
method: 'put',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 删除用户
|
||||
export function delUser(userId) {
|
||||
return request({
|
||||
url: '/system/user/' + userId,
|
||||
method: 'delete',
|
||||
});
|
||||
}
|
||||
|
||||
// 用户密码重置
|
||||
export function resetUserPwd(userId, password) {
|
||||
const data = {
|
||||
userId,
|
||||
password,
|
||||
};
|
||||
return request({
|
||||
url: '/system/user/resetPwd',
|
||||
method: 'put',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 用户状态修改
|
||||
export function changeUserStatus(userId, status) {
|
||||
const data = {
|
||||
userId,
|
||||
status,
|
||||
};
|
||||
return request({
|
||||
url: '/system/user/changeStatus',
|
||||
method: 'put',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
// 获取微信二维码
|
||||
export function getLoginParam() {
|
||||
return request({
|
||||
url: '/wechat/getWxBindQr',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
// 解除绑定
|
||||
export function secureBind(data) {
|
||||
return request({
|
||||
url: '/wechat/cancelBind',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
// 查询用户个人信息
|
||||
export function getUserProfile() {
|
||||
return request({
|
||||
url: '/system/user/profile',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 修改用户个人信息
|
||||
export function updateUserProfile(data) {
|
||||
return request({
|
||||
url: '/system/user/profile',
|
||||
method: 'put',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 用户密码重置
|
||||
export function updateUserPwd(oldPassword, newPassword) {
|
||||
const data = {
|
||||
oldPassword,
|
||||
newPassword,
|
||||
};
|
||||
return request({
|
||||
url: '/system/user/profile/updatePwd',
|
||||
method: 'put',
|
||||
params: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 用户头像上传
|
||||
export function uploadAvatar(data) {
|
||||
return request({
|
||||
url: '/system/user/profile/avatar',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 查询授权角色
|
||||
export function getAuthRole(userId) {
|
||||
return request({
|
||||
url: '/system/user/authRole/' + userId,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 保存授权角色
|
||||
export function updateAuthRole(data) {
|
||||
return request({
|
||||
url: '/system/user/authRole',
|
||||
method: 'put',
|
||||
params: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 查询机构下拉树结构
|
||||
export function deptsTreeSelect() {
|
||||
return request({
|
||||
url: '/system/user/deptTree',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 查询子机构下拉树结构
|
||||
export function deptsTreeSelectSub(showOwner) {
|
||||
return request({
|
||||
url: '/system/user/deptTree?showOwner=' + showOwner,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
|
@ -0,0 +1,76 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询生成表数据
|
||||
export function listTable(query) {
|
||||
return request({
|
||||
url: '/tool/gen/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 查询db数据库列表
|
||||
export function listDbTable(query) {
|
||||
return request({
|
||||
url: '/tool/gen/db/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询表详细信息
|
||||
export function getGenTable(tableId) {
|
||||
return request({
|
||||
url: '/tool/gen/' + tableId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 修改代码生成信息
|
||||
export function updateGenTable(data) {
|
||||
return request({
|
||||
url: '/tool/gen',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 导入表
|
||||
export function importTable(data) {
|
||||
return request({
|
||||
url: '/tool/gen/importTable',
|
||||
method: 'post',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
// 预览生成代码
|
||||
export function previewTable(tableId) {
|
||||
return request({
|
||||
url: '/tool/gen/preview/' + tableId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 删除表数据
|
||||
export function delTable(tableId) {
|
||||
return request({
|
||||
url: '/tool/gen/' + tableId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 生成代码(自定义路径)
|
||||
export function genCode(tableName) {
|
||||
return request({
|
||||
url: '/tool/gen/genCode/' + tableName,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 同步数据库
|
||||
export function synchDb(tableName) {
|
||||
return request({
|
||||
url: '/tool/gen/synchDb/' + tableName,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue