浏览代码

初始化

yanghao 2 天之前
当前提交
5533a2d5a8
共有 100 个文件被更改,包括 4668 次插入0 次删除
  1. 22 0
      .editorconfig
  2. 20 0
      .env.development
  3. 14 0
      .env.production
  4. 17 0
      .env.staging
  5. 9 0
      .eslintignore
  6. 210 0
      .eslintrc.js
  7. 24 0
      .gitignore
  8. 4 0
      .prettierignore
  9. 10 0
      .prettierrc.js
  10. 30 0
      README.md
  11. 13 0
      babel.config.js
  12. 12 0
      bin/build.bat
  13. 0 0
      bin/jessibuca/decoder.js
  14. 二进制
      bin/jessibuca/decoder.wasm
  15. 637 0
      bin/jessibuca/jessibuca.d.ts
  16. 0 0
      bin/jessibuca/jessibuca.js
  17. 12 0
      bin/package.bat
  18. 12 0
      bin/run-web.bat
  19. 35 0
      build/index.js
  20. 113 0
      build/lang.js
  21. 143 0
      package.json
  22. 二进制
      public/favicon.ico
  23. 21 0
      public/html/ie.html
  24. 156 0
      public/index.html
  25. 二进制
      public/js/EasyPlayer.swf
  26. 0 0
      public/js/EasyWasmPlayer.js
  27. 二进制
      public/js/jessibuca-pro/bg.jpg
  28. 0 0
      public/js/jessibuca-pro/decoder-pro-audio.js
  29. 二进制
      public/js/jessibuca-pro/decoder-pro-audio.wasm
  30. 0 0
      public/js/jessibuca-pro/decoder-pro-hard-not-wasm.js
  31. 0 0
      public/js/jessibuca-pro/decoder-pro-hard.js
  32. 8 0
      public/js/jessibuca-pro/decoder-pro-mt-worker.js
  33. 二进制
      public/js/jessibuca-pro/decoder-pro-mt-worker.wasm
  34. 0 0
      public/js/jessibuca-pro/decoder-pro-mt-worker.worker.js
  35. 0 0
      public/js/jessibuca-pro/decoder-pro-mt.js
  36. 7 0
      public/js/jessibuca-pro/decoder-pro-simd-mt-worker.js
  37. 二进制
      public/js/jessibuca-pro/decoder-pro-simd-mt-worker.wasm
  38. 0 0
      public/js/jessibuca-pro/decoder-pro-simd-mt-worker.worker.js
  39. 0 0
      public/js/jessibuca-pro/decoder-pro-simd-mt.js
  40. 0 0
      public/js/jessibuca-pro/decoder-pro-simd.js
  41. 二进制
      public/js/jessibuca-pro/decoder-pro-simd.wasm
  42. 0 0
      public/js/jessibuca-pro/decoder-pro.js
  43. 二进制
      public/js/jessibuca-pro/decoder-pro.wasm
  44. 二进制
      public/js/jessibuca-pro/expand-hover.png
  45. 二进制
      public/js/jessibuca-pro/expand.png
  46. 二进制
      public/js/jessibuca-pro/jessibuca-logo.png
  47. 0 0
      public/js/jessibuca-pro/jessibuca-pro-multi.js
  48. 0 0
      public/js/jessibuca-pro/jessibuca-pro-talk.js
  49. 0 0
      public/js/jessibuca-pro/jessibuca-pro.js
  50. 二进制
      public/js/jessibuca-pro/logo.png
  51. 二进制
      public/js/jessibuca-pro/zoom-stop-hover.png
  52. 二进制
      public/js/jessibuca-pro/zoom-stop.png
  53. 二进制
      public/loading-bg.png
  54. 二进制
      public/loading-logo.png
  55. 二进制
      public/loading.gif
  56. 2 0
      public/robots.txt
  57. 36 0
      src/App.vue
  58. 37 0
      src/api/case/case.js
  59. 46 0
      src/api/data/center.js
  60. 60 0
      src/api/iot/alert.js
  61. 87 0
      src/api/iot/alertLog.js
  62. 36 0
      src/api/iot/alertUser.js
  63. 52 0
      src/api/iot/authorize.js
  64. 52 0
      src/api/iot/bridge.js
  65. 53 0
      src/api/iot/category.js
  66. 122 0
      src/api/iot/channel.js
  67. 44 0
      src/api/iot/clientDetails.js
  68. 52 0
      src/api/iot/control.js
  69. 33 0
      src/api/iot/dashBoard.js
  70. 333 0
      src/api/iot/device.js
  71. 44 0
      src/api/iot/deviceDashBoard.js
  72. 71 0
      src/api/iot/deviceJob.js
  73. 80 0
      src/api/iot/deviceLog.js
  74. 63 0
      src/api/iot/deviceuser.js
  75. 380 0
      src/api/iot/emqx.js
  76. 45 0
      src/api/iot/eventLog.js
  77. 61 0
      src/api/iot/firmware.js
  78. 65 0
      src/api/iot/firmwareTask.js
  79. 44 0
      src/api/iot/functionLog.js
  80. 71 0
      src/api/iot/gateway.js
  81. 61 0
      src/api/iot/group.js
  82. 51 0
      src/api/iot/httpClient.js
  83. 44 0
      src/api/iot/log.js
  84. 52 0
      src/api/iot/mediaServer.js
  85. 61 0
      src/api/iot/modbusConfig.js
  86. 49 0
      src/api/iot/modbusJob.js
  87. 106 0
      src/api/iot/model.js
  88. 51 0
      src/api/iot/mqttClient.js
  89. 63 0
      src/api/iot/mqttTest.js
  90. 36 0
      src/api/iot/netty.js
  91. 44 0
      src/api/iot/news.js
  92. 52 0
      src/api/iot/newsCategory.js
  93. 53 0
      src/api/iot/params.js
  94. 68 0
      src/api/iot/platform.js
  95. 62 0
      src/api/iot/point.js
  96. 78 0
      src/api/iot/product.js
  97. 44 0
      src/api/iot/protocol.js
  98. 88 0
      src/api/iot/record.js
  99. 54 0
      src/api/iot/runstatus.js
  100. 53 0
      src/api/iot/salve.js

+ 22 - 0
.editorconfig

@@ -0,0 +1,22 @@
+# 告诉EditorConfig插件,这是根文件,不用继续往上查找
+root = true
+
+# 匹配全部文件
+[*]
+# 设置字符集
+charset = utf-8
+# 缩进风格,可选space、tab
+indent_style = space
+# 缩进的空格数
+indent_size = 4
+# 结尾换行符,可选lf、cr、crlf
+end_of_line = lf
+# 在文件结尾插入新行
+insert_final_newline = true
+# 删除一行中的前后空格
+trim_trailing_whitespace = true
+
+# 匹配md结尾的文件
+[*.md]
+insert_final_newline = false
+trim_trailing_whitespace = false

+ 20 - 0
.env.development

@@ -0,0 +1,20 @@
+# 页面标题
+VUE_APP_TITLE = 延凡科技物联网系统
+
+# 开发环境配置
+ENV = 'development'
+
+# 开发环境
+VUE_APP_BASE_API = '/dev-api'
+
+# 路由懒加载
+VUE_CLI_BABEL_TRANSPILE_MODULES = true
+
+# 后端接口地址
+VUE_APP_SERVER_API_URL = 'http://localhost:8087/'
+
+# Mqtt消息服务器连接地址
+VUE_APP_MQTT_SERVER_URL = 'ws://localhost:8083/mqtt'
+
+# 百度地图AK
+VUE_APP_BAI_DU_AK = 'nAtaBg9FYzav6c8P9rF9qzsWZfT8O0PD'

+ 14 - 0
.env.production

@@ -0,0 +1,14 @@
+# 页面标题
+VUE_APP_TITLE = 延凡科技物联网系统
+
+# 生产环境配置
+ENV = 'production'
+
+# 生产环境
+VUE_APP_BASE_API = '/prod-api'
+
+# Mqtt消息服务器连接地址,使用空字符串则会自动获取服务器地址
+VUE_APP_MQTT_SERVER_URL = ''
+
+# 百度地图AK
+VUE_APP_BAI_DU_AK = 'nAtaBg9FYzav6c8P9rF9qzsWZfT8O0PD'

+ 17 - 0
.env.staging

@@ -0,0 +1,17 @@
+# 页面标题
+VUE_APP_TITLE = 延凡科技物联网系统
+
+NODE_ENV = production
+
+# 测试环境配置
+ENV = 'staging'
+
+# 测试环境
+VUE_APP_BASE_API = '/stage-api'
+
+# Mqtt消息服务器连接地址
+VUE_APP_MQTT_SERVER_URL = 'ws://localhost:8083/mqtt'
+
+# 百度地图AK
+VUE_APP_BAI_DU_AK = 'nAtaBg9FYzav6c8P9rF9qzsWZXXXXXX'
+

+ 9 - 0
.eslintignore

@@ -0,0 +1,9 @@
+# 忽略build目录下类型为js的文件的语法检查
+build/*.js
+# 忽略src/assets目录下文件的语法检查
+src/assets
+# 忽略public目录下文件的语法检查
+public
+# 忽略当前目录下为js的文件的语法检查
+*.js
+*.vue

+ 210 - 0
.eslintrc.js

@@ -0,0 +1,210 @@
+
+/**
+ *
+ * 规则说明见 https://cn.eslint.org/docs/rules/
+ * eslint-plugin-vue 规则见 https://github.com/vuejs/eslint-plugin-vue
+ *
+ * "off" 或 0 - 关闭规则
+ * "warn" 或 1 - 开启规则,使用警告级别的错误:warn (不会导致程序退出)
+ * "error" 或 2 - 开启规则,使用错误级别的错误:error (当被触发的时候,程序会退出)
+ *
+ */
+module.exports = {
+  root: true,
+  parserOptions: {
+    parser: 'babel-eslint',
+    sourceType: 'module'
+  },
+  env: {
+    browser: true,
+    node: true,
+    es6: true,
+  },
+  extends: ['plugin:vue/recommended', 'eslint:recommended'],
+
+  // add your custom rules here
+  rules: {
+    'vue/max-attributes-per-line': [2, {
+      'singleline': 10,
+      'multiline': {
+        'max': 1,
+        'allowFirstLine': false
+      }
+    }],
+    'vue/html-self-closing': 'off',
+    'vue/singleline-html-element-content-newline': 'off',
+    'vue/multiline-html-element-content-newline': 'off',
+    'vue/no-template-shadow': "off",
+    'vue/name-property-casing': ['error', 'PascalCase'],
+    'vue/no-v-html': 'off',
+    'accessor-pairs': 2,
+    'arrow-spacing': [2, {
+      'before': true,
+      'after': true
+    }],
+    'block-spacing': [2, 'always'],
+    'brace-style': [2, '1tbs', {
+      'allowSingleLine': true
+    }],
+    'camelcase': [0, {
+      'properties': 'always'
+    }],
+    'comma-dangle': [2, 'always-multiline'],
+    'comma-spacing': [2, {
+      'before': false,
+      'after': true
+    }],
+    'comma-style': [2, 'last'],
+    'constructor-super': 2,
+    'curly': [2, 'multi-line'],
+    'dot-location': [2, 'property'],
+    'eol-last': 2,
+    'eqeqeq': ["error", "always", {"null": "ignore"}],
+    'generator-star-spacing': [2, {
+      'before': true,
+      'after': true
+    }],
+    'handle-callback-err': [2, '^(err|error)$'],
+    'indent': [2, 2, {
+      'SwitchCase': 1
+    }],
+    'jsx-quotes': [2, 'prefer-single'],
+    'key-spacing': [2, {
+      'beforeColon': false,
+      'afterColon': true
+    }],
+    'keyword-spacing': [2, {
+      'before': true,
+      'after': true
+    }],
+    'new-cap': [2, {
+      'newIsCap': true,
+      'capIsNew': false
+    }],
+    'new-parens': 2,
+    'no-array-constructor': 2,
+    'no-caller': 2,
+    'no-console': 'off',
+    'no-class-assign': 2,
+    'no-cond-assign': 2,
+    'no-const-assign': 2,
+    'no-control-regex': 0,
+    'no-delete-var': 2,
+    'no-dupe-args': 2,
+    'no-dupe-class-members': 2,
+    'no-dupe-keys': 2,
+    'no-duplicate-case': 2,
+    'no-empty-character-class': 2,
+    'no-empty-pattern': 2,
+    'no-eval': 2,
+    'no-ex-assign': 2,
+    'no-extend-native': 2,
+    'no-extra-bind': 2,
+    'no-extra-boolean-cast': 2,
+    'no-extra-parens': [2, 'functions'],
+    'no-fallthrough': 2,
+    'no-floating-decimal': 2,
+    'no-func-assign': 2,
+    'no-implied-eval': 2,
+    'no-inner-declarations': [2, 'functions'],
+    'no-invalid-regexp': 2,
+    'no-irregular-whitespace': 2,
+    'no-iterator': 2,
+    'no-label-var': 2,
+    'no-labels': [2, {
+      'allowLoop': false,
+      'allowSwitch': false
+    }],
+    'no-lone-blocks': 2,
+    'no-mixed-spaces-and-tabs': 2,
+    'no-multi-spaces': 2,
+    'no-multi-str': 2,
+    'no-multiple-empty-lines': [2, {
+      'max': 1
+    }],
+    'no-native-reassign': 2,
+    'no-negated-in-lhs': 2,
+    'no-new-object': 2,
+    'no-new-require': 2,
+    'no-new-symbol': 2,
+    'no-new-wrappers': 2,
+    'no-obj-calls': 2,
+    'no-octal': 2,
+    'no-octal-escape': 2,
+    'no-path-concat': 2,
+    'no-proto': 2,
+    'no-redeclare': 2,
+    'no-regex-spaces': 2,
+    'no-return-assign': [2, 'except-parens'],
+    'no-self-assign': 2,
+    'no-self-compare': 2,
+    'no-sequences': 2,
+    'no-shadow-restricted-names': 2,
+    'no-spaced-func': 2,
+    'no-sparse-arrays': 2,
+    'no-this-before-super': 2,
+    'no-throw-literal': 2,
+    'no-trailing-spaces': 2,
+    'no-undef': 2,
+    'no-undef-init': 2,
+    'no-unexpected-multiline': 2,
+    'no-unmodified-loop-condition': 2,
+    'no-unneeded-ternary': [2, {
+      'defaultAssignment': false
+    }],
+    'no-unreachable': 2,
+    'no-unsafe-finally': 2,
+    'no-unused-vars': [2, {
+      'vars': 'all',
+      'args': 'none'
+    }],
+    'no-useless-call': 2,
+    'no-useless-computed-key': 2,
+    'no-useless-constructor': 2,
+    'no-useless-escape': 0,
+    'no-whitespace-before-property': 2,
+    'no-with': 2,
+    'one-var': [2, {
+      'initialized': 'never'
+    }],
+    'operator-linebreak': [2, 'after', {
+      'overrides': {
+        '?': 'before',
+        ':': 'before'
+      }
+    }],
+    'padded-blocks': [2, 'never'],
+    'quotes': [2, 'single', {
+      'avoidEscape': true,
+      'allowTemplateLiterals': true
+    }],
+    'semi': [2, 'always'],
+    'semi-spacing': [2, {
+      'before': false,
+      'after': true
+    }],
+    'space-before-blocks': [2, 'always'],
+    'space-before-function-paren': 0,
+    'space-in-parens': [2, 'never'],
+    'space-infix-ops': 2,
+    'space-unary-ops': [2, {
+      'words': true,
+      'nonwords': false
+    }],
+    'spaced-comment': [2, 'always', {
+      'markers': ['global', 'globals', 'eslint', 'eslint-disable', '*package', '!', ',']
+    }],
+    'template-curly-spacing': [2, 'never'],
+    'use-isnan': 2,
+    'valid-typeof': 2,
+    'wrap-iife': [2, 'any'],
+    'yield-star-spacing': [2, 'both'],
+    'yoda': [2, 'never'],
+    'prefer-const': 2,
+    'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
+    'object-curly-spacing': [2, 'always', {
+      objectsInObjects: false
+    }],
+    'array-bracket-spacing': [2, 'never']
+  }
+}

+ 24 - 0
.gitignore

@@ -0,0 +1,24 @@
+.DS_Store
+node_modules/
+dist/
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+**/*.log
+
+tests/**/coverage/
+tests/e2e/reports
+selenium-debug.log
+
+# Editor directories and files
+.idea
+*.suo
+*.ntvs*
+*.njsproj
+*.sln
+*.local
+
+package-lock.json
+pnpm-lock.yaml
+yarn.lock
+/dist.zip

+ 4 - 0
.prettierignore

@@ -0,0 +1,4 @@
+.eslintrc.js
+/dist/
+/node_modules/**
+/public/*

+ 10 - 0
.prettierrc.js

@@ -0,0 +1,10 @@
+module.exports = {
+  printWidth: 220,
+  singleQuote: true, // 使用单引号而不是双引号
+  semi: true, // 句尾是否加;
+  proseWrap: 'preserve',
+  tabWidth: 4,
+  trailingComma: 'es5', // 在对象或数组最后一个元素后面是否加逗号(在ES5中加尾逗号)
+  bracketSpacing: true, // 在对象,数组括号与文字之间加空格 "{ foo: bar }"
+  htmlWhitespaceSensitivity: 'ignore', // > 不乱换行
+};

+ 30 - 0
README.md

@@ -0,0 +1,30 @@
+## 开发
+
+```bash
+# 克隆项目
+git clone https://gitee.com/y_project/Yanfan-Vue
+
+# 进入项目目录
+cd yanfan-ui
+
+# 安装依赖
+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
+```

+ 13 - 0
babel.config.js

@@ -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']
+        }
+    }
+}

+ 12 - 0
bin/build.bat

@@ -0,0 +1,12 @@
+@echo off
+echo.
+echo [信息] 打包Web工程,生成dist文件。
+echo.
+
+%~d0
+cd %~dp0
+
+cd ..
+npm run build:prod
+
+pause

文件差异内容过多而无法显示
+ 0 - 0
bin/jessibuca/decoder.js


二进制
bin/jessibuca/decoder.wasm


+ 637 - 0
bin/jessibuca/jessibuca.d.ts

@@ -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;

文件差异内容过多而无法显示
+ 0 - 0
bin/jessibuca/jessibuca.js


+ 12 - 0
bin/package.bat

@@ -0,0 +1,12 @@
+@echo off
+echo.
+echo [信息] 安装Web工程,生成node_modules文件。
+echo.
+
+%~d0
+cd %~dp0
+
+cd ..
+npm install --registry=https://registry.npmmirror.com
+
+pause

+ 12 - 0
bin/run-web.bat

@@ -0,0 +1,12 @@
+@echo off
+echo.
+echo [信息] 使用 Vue CLI 命令运行 Web 工程。
+echo.
+
+%~d0
+cd %~dp0
+
+cd ..
+npm run dev
+
+pause

+ 35 - 0
build/index.js

@@ -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}`)
+}

+ 113 - 0
build/lang.js

@@ -0,0 +1,113 @@
+const ExcelJS = require('exceljs');
+const fs = require('fs');
+const path = require('path');
+// example: npm run genrate:lang public/lang.xlsx(读取excel文件的路径) src/lang(输出文件路径)
+
+function resolve(dir) {
+  return path.resolve(__dirname, '..', dir);
+}
+const rawArgv = process.argv.slice(2);
+
+let excelFilePath;
+let jsonFilePath;
+if (rawArgv.length === 0) {
+  console.log('请输入Excel文件路径');
+  process.exit(1);
+}
+
+if (rawArgv.length === 1) {
+  console.log('请输入语言包导出的文件路径');
+  process.exit(1);
+}
+
+// 文件路径
+excelFilePath = resolve(rawArgv[0]);
+jsonFilePath = resolve(rawArgv[1]);
+const langFileNameEnum = {
+  简体中文: 'zh-CN',
+  English: 'en-US',
+};
+const keyIndex = 1; // 键值所在列
+const headerRowIndex = 1; // 标题行所在行索引
+
+// 创建一个新的工作簿实例
+const workbook = new ExcelJS.Workbook();
+// 读取Excel文件
+workbook.xlsx
+  .readFile(excelFilePath)
+  .then(async () => {
+    // 生成json映射文件,new Map(){sheetName:{ lang:jsonData}}
+    const dataMap = getJsonDataMap(workbook)
+    // 生成json文件
+    await generateJsonFiles(dataMap)
+  })
+  .catch((error) => {
+    console.error('Error reading Excel file:', error);
+  });
+
+/**
+ * 从工作簿中获取JSON数据映射表
+ * @param {object} workbook - Excel工作簿对象,用于遍历工作表和工作表数据
+ * @returns {Map} dataMap - 包含工作表名称和对应数据对象的映射表,其中数据对象是语言文件名枚举和其键值对的映射
+ */
+function getJsonDataMap(workbook) {
+  const dataMap = new Map();
+  workbook.eachSheet(function (worksheet) {
+    // 初始化工作表名和文件对象
+    const sheetName = worksheet._name;
+    const fileObjects = {};
+    const cellIndexMap = {};
+    // 遍历每一行,首先处理表头,然后处理数据行
+    worksheet.eachRow((row, rowNumber) => {
+      if (rowNumber === headerRowIndex) {
+        // 处理表头,建立语言文件名和列索引的映射
+        row.eachCell((cell, colNumber) => {
+          if (colNumber !== keyIndex) {
+            fileObjects[langFileNameEnum[cell.value]] = {};
+            cellIndexMap[colNumber] = langFileNameEnum[cell.value];
+          }
+        });
+      } else {
+        // 处理数据行,根据列索引映射填充语言文件的数据键值对
+        Object.keys(cellIndexMap)
+          .map((item) => Number(item))
+          .map((colNumber) => {
+            const key = row.getCell(keyIndex).value;
+            const value = row.getCell(colNumber).value || '';
+            const lang = cellIndexMap[colNumber];
+            fileObjects[lang][key] = value;
+          });
+      }
+    });
+    // 将工作表数据对象映射到工作表名称
+    dataMap.set(sheetName, fileObjects);
+  });
+  return dataMap;
+}
+
+// 导出语言包文件到指定目录
+async function generateJsonFiles(dataMap) {
+  // 清空文件输出目录
+  const exist = fs.existsSync(jsonFilePath)
+  exist && await fs.rmSync(jsonFilePath, { recursive: true }, () => { })
+  // 逐个生成目录和文件
+  for (const [modules, objs] of dataMap.entries()) {
+    for (const [lang, jsonData] of Object.entries(objs)) {
+      const path = resolve(jsonFilePath + `/${lang}/${modules}.json`);
+      await writeJsonToFile(jsonData, path);
+    }
+  }
+  console.log('Excel file has been converted to JSON and saved to', jsonFilePath);
+}
+
+// 异步创建文件夹并写入JSON数据
+async function writeJsonToFile(jsonData, filePath) {
+  const dirPath = path.dirname(filePath); // 获取文件路径的目录部分
+  try {
+    await fs.mkdirSync(dirPath, { recursive: true }, () => { }); // 如果目录不存在,会递归创建
+    await fs.writeFileSync(filePath, JSON.stringify(jsonData, null, 2), 'utf8', () => { }); // 异步写入JSON数据
+    console.log(`JSON data written to ${filePath}`);
+  } catch (err) {
+    console.error(`Error writing JSON data to ${filePath}:`, err);
+  }
+}

+ 143 - 0
package.json

@@ -0,0 +1,143 @@
+{
+    "name": "yanfan",
+    "version": "3.8.5",
+    "description": "延凡科技物联网平台",
+    "author": "yanfan",
+    "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",
+        "genrate:lang": "node build/lang.js"
+    },
+    "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/Yanfan-Vue.git"
+    },
+    "dependencies": {
+        "@easydarwin/easywasmplayer": "^4.0.7",
+        "@jiaminghi/data-view": "^2.10.0",
+        "@logicflow/core": "^2.0.6",
+        "@logicflow/extension": "^2.0.10",
+        "@logicflow/vue-node-registry": "^1.0.7",
+        "@riophae/vue-treeselect": "0.4.0",
+        "@vue/composition-api": "^1.7.2",
+        "ace-builds": "^1.22.0",
+        "animejs": "^3.2.1",
+        "axios": "0.24.0",
+        "clipboard": "2.0.8",
+        "codemirror": "^5.65.2",
+        "core-js": "3.25.3",
+        "dhtmlx-gantt": "^6.3.7",
+        "echarts": "5.5.0",
+        "echarts-gl": "^2.0.9",
+        "echarts-liquidfill": "^3.0.6",
+        "element-china-area-data": "^4.1.1",
+        "element-ui": "2.15.10",
+        "ezuikit-js": "^7.7.10",
+        "file-saver": "2.0.5",
+        "flv.js": "^1.6.2",
+        "fuse.js": "6.4.3",
+        "highlight.js": "9.18.5",
+        "html-to-image": "^1.11.11",
+        "html2canvas": "^1.4.1",
+        "js-beautify": "1.13.0",
+        "js-cookie": "3.0.1",
+        "jsencrypt": "3.0.0-rc.1",
+        "jshint": "^2.13.4",
+        "json-loader": "^0.5.7",
+        "jsonlint": "^1.6.3",
+        "jszip": "^3.10.1",
+        "lodash": "^4.17.21",
+        "material-design-icons-iconfont": "^6.7.0",
+        "minimatch": "^3.1.2",
+        "moment": "^2.29.4",
+        "monaco-editor": "^0.27.0",
+        "monaco-editor-webpack-plugin": "^4.2.0",
+        "mqtt": "^4.3.3",
+        "nprogress": "0.2.0",
+        "photo-sphere-viewer": "^4.8.1",
+        "print-js": "^1.6.0",
+        "quasar": "^2.14.0",
+        "quill": "1.3.7",
+        "screenfull": "5.0.2",
+        "script-loader": "^0.7.2",
+        "sortablejs": "1.10.2",
+        "spark-md5": "^3.0.2",
+        "speak-tts": "^2.0.8",
+        "sql-formatter": "^4.0.2",
+        "three": "^0.142.0",
+        "vue": "2.6.12",
+        "vue-3d-model": "1.4.1",
+        "vue-axios": "^3.5.2",
+        "vue-baidu-map": "^0.21.22",
+        "vue-clipboard2": "^0.3.3",
+        "vue-codemirror": "^4.0.6",
+        "vue-contextmenujs": "^1.4.11",
+        "vue-count-to": "1.0.13",
+        "vue-cropper": "0.5.5",
+        "vue-easytable": "^2.14.0",
+        "vue-i18n": "^8.28.2",
+        "vue-json-viewer": "^2.2.21",
+        "vue-meta": "2.4.0",
+        "vue-qr": "^4.0.9",
+        "vue-router": "3.4.9",
+        "vue-ruler-tool": "^1.2.4",
+        "vue-seamless-scroll": "^1.1.23",
+        "vue-video-player": "^5.0.2",
+        "vue2-ace-editor": "^0.0.15",
+        "vuedraggable": "2.24.3",
+        "vuex": "3.6.2",
+        "xlsx": "^0.18.5"
+    },
+    "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",
+        "html-webpack-plugin": "^4.5.2",
+        "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"
+    ]
+}

二进制
public/favicon.ico


文件差异内容过多而无法显示
+ 21 - 0
public/html/ie.html


+ 156 - 0
public/index.html

@@ -0,0 +1,156 @@
+<!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>
+  <!-- 百度地图 -->
+  <script src="https://mp-bd83e627-0227-46f3-aef3-95bef99ce553.cdn.bspapp.com/mapvgl.min.js"></script>
+  <script src="https://api.map.baidu.com/api?v=2.0&type=webgl&ak=9oBcHDQqVQwxKJPySUa404jj4HcFwNdL"></script>
+  <!-- 高德地图 -->
+  <script language="javascript"
+    src="https://webapi.amap.com/maps?v=2.0&key=99e2186c28a9705424380db0d6d243f1&plugin=AMap.ControlBar,AMap.ToolBar"></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-wrapper {
+      background: #fff;
+    }
+
+    .loader-logo {
+      display: block;
+      position: fixed;
+      left: 50%;
+      top: 40%;
+      transform: translate(-50%, -50%);
+      width: 220px;
+      height: 60px;
+      z-index: 3;
+    }
+
+    .loader-icon {
+      display: block;
+      position: fixed;
+      left: 50%;
+      top: 50%;
+      transform: translate(-50%, -50%);
+      width: 160px;
+      height: 120px;
+      z-index: 1;
+    }
+
+    #loader-wrapper .load_title {
+      font-family: 'Open Sans';
+      color: #303133;
+      font-size: 19px;
+      width: 100%;
+      text-align: center;
+      z-index: 9999;
+      position: absolute;
+      top: 56%;
+      opacity: 1;
+      line-height: 30px;
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      font-weight: 550;
+
+    }
+
+    #loader-wrapper .load_title .load-point {
+      background-color: #303133;
+      width: 8px;
+      height: 8px;
+      border-radius: 50%;
+      margin-left: 10px;
+    }
+
+
+    @keyframes point2 {
+      0% {
+        opacity: 0;
+      }
+
+      32% {
+        opacity: 0;
+      }
+
+      33% {
+        opacity: 1;
+      }
+
+      100% {
+        opacity: 1;
+      }
+    }
+
+    @keyframes point3 {
+      0% {
+        opacity: 0;
+      }
+
+      66% {
+        opacity: 0;
+      }
+
+      67% {
+        opacity: 1;
+      }
+
+      100% {
+        opacity: 1;
+      }
+    }
+
+    #loader-wrapper .load_title .load-point.point2 {
+      animation: point2 3s linear infinite;
+    }
+
+    #loader-wrapper .load_title .load-point.point3 {
+      animation: point3 3s linear infinite;
+    }
+  </style>
+</head>
+
+<body>
+  <div id="app">
+    <div id="loader-wrapper">
+      <img class="loader-logo" src="./loading-logo.png"></img>
+      <img class="loader-icon" src="./loading.gif"></img>
+      <div class="load_title">正在努力加载中,请稍后</div>
+    </div>
+  </div>
+</body>
+
+</html>

二进制
public/js/EasyPlayer.swf


文件差异内容过多而无法显示
+ 0 - 0
public/js/EasyWasmPlayer.js


二进制
public/js/jessibuca-pro/bg.jpg


文件差异内容过多而无法显示
+ 0 - 0
public/js/jessibuca-pro/decoder-pro-audio.js


二进制
public/js/jessibuca-pro/decoder-pro-audio.wasm


文件差异内容过多而无法显示
+ 0 - 0
public/js/jessibuca-pro/decoder-pro-hard-not-wasm.js


文件差异内容过多而无法显示
+ 0 - 0
public/js/jessibuca-pro/decoder-pro-hard.js


文件差异内容过多而无法显示
+ 8 - 0
public/js/jessibuca-pro/decoder-pro-mt-worker.js


二进制
public/js/jessibuca-pro/decoder-pro-mt-worker.wasm


文件差异内容过多而无法显示
+ 0 - 0
public/js/jessibuca-pro/decoder-pro-mt-worker.worker.js


文件差异内容过多而无法显示
+ 0 - 0
public/js/jessibuca-pro/decoder-pro-mt.js


文件差异内容过多而无法显示
+ 7 - 0
public/js/jessibuca-pro/decoder-pro-simd-mt-worker.js


二进制
public/js/jessibuca-pro/decoder-pro-simd-mt-worker.wasm


文件差异内容过多而无法显示
+ 0 - 0
public/js/jessibuca-pro/decoder-pro-simd-mt-worker.worker.js


文件差异内容过多而无法显示
+ 0 - 0
public/js/jessibuca-pro/decoder-pro-simd-mt.js


文件差异内容过多而无法显示
+ 0 - 0
public/js/jessibuca-pro/decoder-pro-simd.js


二进制
public/js/jessibuca-pro/decoder-pro-simd.wasm


文件差异内容过多而无法显示
+ 0 - 0
public/js/jessibuca-pro/decoder-pro.js


二进制
public/js/jessibuca-pro/decoder-pro.wasm


二进制
public/js/jessibuca-pro/expand-hover.png


二进制
public/js/jessibuca-pro/expand.png


二进制
public/js/jessibuca-pro/jessibuca-logo.png


文件差异内容过多而无法显示
+ 0 - 0
public/js/jessibuca-pro/jessibuca-pro-multi.js


文件差异内容过多而无法显示
+ 0 - 0
public/js/jessibuca-pro/jessibuca-pro-talk.js


文件差异内容过多而无法显示
+ 0 - 0
public/js/jessibuca-pro/jessibuca-pro.js


二进制
public/js/jessibuca-pro/logo.png


二进制
public/js/jessibuca-pro/zoom-stop-hover.png


二进制
public/js/jessibuca-pro/zoom-stop.png


二进制
public/loading-bg.png


二进制
public/loading-logo.png


二进制
public/loading.gif


+ 2 - 0
public/robots.txt

@@ -0,0 +1,2 @@
+User-agent: *
+Disallow: /

+ 36 - 0
src/App.vue

@@ -0,0 +1,36 @@
+<template>
+  <div id="app" style="background-color:#0e2e87" v-if="$route.meta.bigScreen">
+    <router-view />
+  </div>
+  <div id="app" v-else>
+    <router-view :key="language"/>
+    <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
+      }
+    }
+  },
+  computed:{
+    language(){
+      return this.$store.state.settings.language
+    }
+  }
+};
+</script>
+<style scoped>
+#app .theme-picker {
+  display: none;
+}
+</style>

+ 37 - 0
src/api/case/case.js

@@ -0,0 +1,37 @@
+import request from '@/utils/request';
+
+// 查询案例
+export function listCaseApi(query) {
+    return request({
+        url: '/iot/case/list',
+        method: 'get',
+        params: query,
+    });
+}
+
+// 添加案例
+export function addCaseApi(data) {
+    return request({
+        url: '/iot/case/add',
+        method: 'post',
+        data
+    });
+}
+
+// 修改案例
+export function updateCaseApi(data) {
+    return request({
+        url: '/iot/case/update',
+        method: 'post',
+        data
+    });
+}
+
+// 删除案例
+export function deleteCaseApi(query) {
+    return request({
+        url: '/iot/case/delete',
+        method: 'get',
+        params: query,
+    });
+}

+ 46 - 0
src/api/data/center.js

@@ -0,0 +1,46 @@
+import request from '@/utils/request';
+
+// 查询设备的历史数据
+export function getDataCenterDeviceHistory(data) {
+    return request({
+        url: '/data/center/deviceHistory',
+        method: 'post',
+        data: data,
+    });
+}
+
+// 查询场景变量历史数据
+export function getDataCenterSceneHistory(query) {
+    return request({
+        url: '/data/center/sceneHistory',
+        method: 'get',
+        params: query,
+    });
+}
+
+// 统计告警处理信息
+export function getDataCenterCountAlertProcess(query) {
+    return request({
+        url: '/data/center/countAlertProcess',
+        method: 'get',
+        params: query,
+    });
+}
+
+// 统计告警级别信息
+export function getDataCenterCountAlertLevel(query) {
+    return request({
+        url: '/data/center/countAlertLevel',
+        method: 'get',
+        params: query,
+    });
+}
+
+// 统计设备物模型指令下发数量
+export function getDataCenterCountThingsModelInvoke(query) {
+    return request({
+        url: '/data/center/countThingsModelInvoke',
+        method: 'get',
+        params: query,
+    });
+}

+ 60 - 0
src/api/iot/alert.js

@@ -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',
+    });
+}

+ 87 - 0
src/api/iot/alertLog.js

@@ -0,0 +1,87 @@
+import request from '@/utils/request'
+
+// 查询设备告警列表
+export function listAlertLog(query) {
+  return request({
+    url: '/iot/alertLog/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询设备告警列表
+export function listAlertLogEcharts(query) {
+    return request({
+        url: '/iot/alertLog/listecharts',
+        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'
+  })
+}
+
+// 查询设备告警列表
+export function listAlertLogEchartsiot(query) {
+    return request({
+        url: '/iot/alertLog/iotlistecharts',
+        method: 'get',
+        params: query
+    })
+}
+
+// 统计前五个产品的告警数量
+export function iotProductCount() {
+  return request({
+      url: '/iot/alertLog/iotProductCount',
+      method: 'get',
+  })
+}
+
+export function listAlertLogEchartsByType(query) {
+  return request({
+      url: '/iot/alertLog/listAlertLogEchartsByType',
+      method: 'get',
+      params: query
+  })
+}
+
+// 统计设备告警处理情况
+export function listDeviceLogCount(query) {
+  return request({
+      url: '/iot/alertLog/listDeviceLogCount',
+      method: 'get',
+      params: query
+  })
+}

+ 36 - 0
src/api/iot/alertUser.js

@@ -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',
+    });
+}

+ 52 - 0
src/api/iot/authorize.js

@@ -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'
+  })
+}

+ 52 - 0
src/api/iot/bridge.js

@@ -0,0 +1,52 @@
+import request from '@/utils/request'
+
+// 查询数据桥接列表
+export function listBridge(query) {
+  return request({
+    url: '/iot/bridge/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询数据桥接详细
+export function getBridge(id) {
+  return request({
+    url: '/iot/bridge/' + id,
+    method: 'get'
+  })
+}
+
+// 新增数据桥接
+export function addBridge(data) {
+  return request({
+    url: '/iot/bridge',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改数据桥接
+export function updateBridge(data) {
+  return request({
+    url: '/iot/bridge',
+    method: 'put',
+    data: data
+  })
+}
+
+export function connectBridge(data) {
+  return request({
+    url: '/iot/bridge/connect',
+    method: 'post',
+    data: data
+  })
+}
+
+// 删除数据桥接
+export function delBridge(id) {
+  return request({
+    url: '/iot/bridge/' + id,
+    method: 'delete'
+  })
+}

+ 53 - 0
src/api/iot/category.js

@@ -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'
+  })
+}

+ 122 - 0
src/api/iot/channel.js

@@ -0,0 +1,122 @@
+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,
+    });
+}
+
+// 监控设备绑定设备或场景
+export function binding(data) {
+    return request({
+        url: '/iot/relation/addOrUp',
+        method: 'post',
+        data: data,
+    });
+}
+// 通过设备或场景查询监控设备通道信息
+export function listRelDeviceOrScene(query) {
+    return request({
+        url: '/sip/channel/listRelDeviceOrScene',
+        method: 'get',
+        params: query,
+    });
+}

+ 44 - 0
src/api/iot/clientDetails.js

@@ -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'
+  })
+}

+ 52 - 0
src/api/iot/control.js

@@ -0,0 +1,52 @@
+import request from '@/utils/request'
+
+// 查询指令权限控制列表
+export function listControl(query) {
+  return request({
+    url: '/order/control/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询指令权限控制详细
+export function getControl(id) {
+  return request({
+    url: '/order/control/' + id,
+    method: 'get'
+  })
+}
+
+// 新增指令权限控制
+export function addControl(data) {
+  return request({
+    url: '/order/control',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改指令权限控制
+export function updateControl(data) {
+  return request({
+    url: '/order/control',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除指令权限控制
+export function delControl(id) {
+  return request({
+    url: '/order/control/' + id,
+    method: 'delete'
+  })
+}
+// 查询指令权限
+export function getOrderControl(params) {
+  return request({
+    url: '/order/control/get',
+    method: 'get',
+    params: params
+  })
+}

+ 33 - 0
src/api/iot/dashBoard.js

@@ -0,0 +1,33 @@
+import request from '@/utils/request'
+
+// 查询产品固件信息
+export function firmwareInfo() {
+    return request({
+        url: '/template/firmwareInfo',
+        method: 'get'
+    })
+}
+
+// 查询采集点模板信息
+export function varTempInfo() {
+    return request({
+        url: '/template/varTempInfo',
+        method: 'get'
+    })
+}
+
+// 查询通知模板信息
+export function notifyTemplateInfo() {
+    return request({
+        url: '/template/notifyTemplateInfo',
+        method: 'get'
+    })
+}
+
+// 查询通知渠道信息
+export function notifyChannelInfo() {
+    return request({
+        url: '/template/notifyChannelInfo',
+        method: 'get'
+    })
+}

+ 333 - 0
src/api/iot/device.js

@@ -0,0 +1,333 @@
+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, recoveryDeptId) {
+    return request({
+        url: '/iot/device/recovery?deviceIds=' + deviceIds + '&recoveryDeptId=' + recoveryDeptId,
+        method: 'post',
+    });
+}
+//查询设备导入记录
+export function listImportRecord(params) {
+    return request({
+        url: '/iot/record/list',
+        method: 'get',
+        params: params,
+    });
+}
+//查询设备回收记录
+export function listRecycleRecord(params) {
+    return request({
+        url: '/iot/record/list',
+        method: 'get',
+        params: params,
+    });
+}
+//查询设备分配记录
+export function listAllotRecord(params) {
+    return request({
+        url: '/iot/record/list',
+        method: 'get',
+        params: params,
+    });
+}
+
+// 查询设备运行状态详细
+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,
+    });
+}
+
+
+// 查询设备变量概况
+export function listThingsModel(query) {
+    return request({
+        url: '/iot/device/listThingsModel',
+        method: 'get',
+        params: query,
+    });
+}
+
+// 查询设备历史轨迹
+export function getdevicehis(params) {
+    return request({
+        url: '/iot/device/devicehis',
+        method: 'get',
+        params: params,
+    });
+}
+
+// 测试dtu
+export function getDevDtu(data) {
+    return request({
+        url: '/iot/device/getDevDtu',
+        method: 'post',
+        data: data,
+    });
+}
+
+export function getDtuDeviceList(params) {
+    return request({
+        url: '/iot/device/getDtuDeviceList',
+        method: 'get',
+        params: params,
+    });
+}
+
+export function addDeviceUsers(data) {
+    return request({
+        url: '/iot/device/addDeviceUsers',
+        method: 'post',
+        data: data,
+    });
+}
+
+export function getDtuDeviceGroup() {
+    return request({
+        url: '/iot/device/getDtuDeviceGroup',
+        method: 'get',
+    });
+}
+
+export function updateDtuDevice(data) {
+    return request({
+        url: '/iot/device/updateDtuDevice',
+        method: 'post',
+        data: data,
+    });
+}
+
+export function deleteDtuDevice(data) {
+    return request({
+        url: '/iot/device/deleteDtuDevice',
+        method: 'post',
+        data: data,
+    });
+}
+
+export function getDtuDeviceGroupList(params) {
+    return request({
+        url: '/iot/device/getDtuDeviceGroupList',
+        method: 'get',
+        params: params,
+    });
+}
+
+export function addAndUpdateDtuDevGroup(data) {
+    return request({
+        url: '/iot/device/addAndUpdateDtuDevGroup',
+        method: 'post',
+        data: data,
+    });
+}
+
+export function deleteDtuDeviceGroup(params) {
+    return request({
+        url: '/iot/device/deleteDtuDeviceGroup',
+        method: 'get',
+        params: params,
+    });
+}
+
+export function selectDeviceAisfptList(params) {
+    return request({
+        url: '/iot/device/selectDeviceAisfptList',
+        method: 'get',
+        params: params,
+    });
+}
+
+export function addAndUpdateDeviceAisfpt(data) {
+    return request({
+        url: '/iot/device/addAndUpdateDeviceAisfpt',
+        method: 'post',
+        data: data,
+    });
+}
+
+export function deleteDeviceAisfpt(params) {
+    return request({
+        url: '/iot/device/deleteDeviceAisfpt',
+        method: 'get',
+        params: params,
+    });
+}
+
+export function getDeviceAbnormalList(query) {
+    return request({
+        url: `/iot/device/getDeviceAbnormalList`,
+        method: 'get',
+        params: query
+    })
+}
+
+export function updateMqttConnectData(query) {
+    return request({
+        url: `/iot/device/updateMqttConnectData`,
+        method: 'post',
+        data: query
+    })
+}
+
+// 查询设备统计信息
+export function getdeviceBoardList() {
+    return request({
+        url: '/iot/device/deviceBoardList',
+        method: 'get',
+    });
+}
+
+
+// 根据经纬度来查询地图上的数据
+export function deviceLongitudeAndLatitudeApi() {
+    return request({
+        url: '/iot/device/deviceLongitudeAndLatitude',
+        method: 'get',
+    });
+}

+ 44 - 0
src/api/iot/deviceDashBoard.js

@@ -0,0 +1,44 @@
+import request from '@/utils/request';
+
+
+// 查询产品统计
+export function selectDashBoardDeviceStatistic() {
+    return request({
+        url: '/iot/device/dashBoard/statistic',
+        method: 'get'
+    });
+}
+
+// 查询产品统计
+export function selectDashBoardFunctionStatistic() {
+    return request({
+        url: '/iot/device/dashBoard/functionStatistic',
+        method: 'get'
+    });
+}
+
+// 查询昨日设备消息总数
+export function selectDeviceLogYesterdayCount() {
+    return request({
+        url: '/iot/device/dashBoard/deviceLogYesterdayCount',
+        method: 'get'
+    });
+}
+
+// 查询设备消息统计信息
+export function selectDeviceLogDeviceLogStatistic(data) {
+    return request({
+        url: '/iot/device/dashBoard/deviceLogStatistic',
+        method: 'post',
+        data: data
+    });
+}
+
+// 查询设备消息最近一小时统计信息
+export function selectDeviceLogDeviceLogAnHourStatistic(data) {
+    return request({
+        url: '/iot/device/dashBoard/deviceLogAnHourStatistic',
+        method: 'post',
+        data: data
+    });
+}

+ 71 - 0
src/api/iot/deviceJob.js

@@ -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
+  })
+}

+ 80 - 0
src/api/iot/deviceLog.js

@@ -0,0 +1,80 @@
+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: 'post',
+        data: 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'
+    })
+}
+
+// 删除监测数据
+export function deleteHistoryList(query) {
+    return request({
+        url: '/iot/deviceLog/deleteHistoryList',
+        method: 'get',
+        params: query
+    })
+}
+
+// 编辑监测数据
+export function updateHistoryList(query) {
+    return request({
+        url: '/iot/deviceLog/updateHistoryList',
+        method: 'get',
+        params: query
+    })
+}

+ 63 - 0
src/api/iot/deviceuser.js

@@ -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,
+    });
+}

+ 380 - 0
src/api/iot/emqx.js

@@ -0,0 +1,380 @@
+import axios from 'axios'
+
+const username = process.env.VUE_APP_EMQX_API_USER_NAME || "admin";
+const password = process.env.VUE_APP_EMQX_API_PASSWORD || "public";
+
+// 集群下所有客户端列表
+export function listMqttClient(query) {
+    var url = "/api/v4/clients";
+    return axios({
+        method: 'get',
+        url: url,
+        auth: {
+            username: username,
+            password: password
+        },
+        params: query
+    })
+}
+
+// 集群下所有订阅信息
+export function listMqttSubscribe(query) {
+    var url = "/api/v4/subscriptions";
+    return axios({
+        method: 'get',
+        url: url,
+        auth: {
+            username: username,
+            password: password
+        },
+        params: query
+    })
+}
+
+// 集群下所有主题/路由信息
+export function listMqttTopic(query) {
+    var url = "/api/v4/routes";
+    return axios({
+        method: 'get',
+        url: url,
+        auth: {
+            username: username,
+            password: password
+        },
+        params: query
+    })
+}
+
+// 集群下所有插件信息
+export function listMqttPlugin() {
+    var url = "/api/v4/plugins";
+    return axios({
+        method: 'get',
+        url: url,
+        auth: {
+            username: username,
+            password: password
+        },
+    })
+}
+
+// 加载指定节点的指定插件
+export function loadMqttPlugin(node, plugin) {
+    var url = "/api/v4/nodes/" + node + "/plugins/" + plugin + "/load";
+    return axios({
+        method: 'put',
+        url: url,
+        auth: {
+            username: username,
+            password: password
+        },
+    })
+}
+
+// 卸载指定节点的指定插件
+export function unloadMqttPlugin(node, plugin) {
+    var url = "/api/v4/nodes/" + node + "/plugins/" + plugin + "/unload";
+    return axios({
+        method: 'put',
+        url: url,
+        auth: {
+            username: username,
+            password: password
+        },
+    })
+}
+
+// 集群下所有监听器信息
+export function listMqttListener() {
+    var url = "/api/v4/listeners";
+    return axios({
+        method: 'get',
+        url: url,
+        auth: {
+            username: username,
+            password: password
+        },
+    })
+}
+
+// 集群下所有统计指标数据
+export function statisticMqtt() {
+    var url = "/api/v4/metrics";
+    return axios({
+        method: 'get',
+        url: url,
+        auth: {
+            username: username,
+            password: password
+        },
+    })
+}
+
+// 集群下所有状态数据
+export function getMqttStats() {
+    var url = "/api/v4/stats";
+    return axios({
+        method: 'get',
+        url: url,
+        auth: {
+            username: username,
+            password: password
+        },
+    })
+}
+
+//断开客户端连接
+export function eliminateClient(clientId) {
+    var url = "/api/v4/clients/" + clientId;
+    return axios({
+        method: 'delete',
+        url: url,
+        auth: {
+            username: username,
+            password: password
+        },
+    })
+}
+
+//查看客户端详情
+export function getClientDetails(clientId) {
+    var url = "/api/v4/clients/" + clientId;
+    return axios({
+        method: 'get',
+        url: url,
+        auth: {
+            username: username,
+            password: password
+        },
+    })
+}
+
+//查看集群下指定客户端的订阅信息
+export function getSubscriptionsByClientId(clientId) {
+    var url = "/api/v4/subscriptions/" + clientId;
+    return axios({
+        method: 'get',
+        url: url,
+        auth: {
+            username: username,
+            password: password
+        },
+    })
+}
+
+//取消该客户端订阅
+export function unsubscribe(query) {
+    var url = "/api/v4/mqtt/unsubscribe";
+    return axios({
+        method: 'post',
+        url: url,
+        auth: {
+            username: username,
+            password: password
+        },
+        params: query
+    })
+}
+
+//添加该客户端订阅
+export function addSubscribe(query) {
+    var url = "/api/v4/mqtt/subscribe";
+    return axios({
+        method: 'post',
+        url: url,
+        auth: {
+            username: username,
+            password: password
+        },
+        params: query
+    })
+}
+
+//获取所有规则引擎的动作
+export function getRules(ruleid) {
+    let url = "";
+    if (typeof (ruleid) == 'undefined' || ruleid == '' || ruleid == null) {
+        url = "/api/v4/rules";
+    } else {
+        url = "/api/v4/rules/" + ruleid;
+    }
+    return axios({
+        method: 'get',
+        url: url,
+        auth: {
+            username: username,
+            password: password
+        },
+    })
+}
+
+
+//删除规则
+export function deleteRule(ruleid) {
+    var url = "/api/v4/rules/" + ruleid;
+    return axios({
+        method: 'delete',
+        url: url,
+        auth: {
+            username: username,
+            password: password
+        },
+    })
+}
+
+
+//获取资源列表或详情
+export function getResources(resourceid) {
+    let url = "";
+    if (typeof (resourceid) == 'undefined' || resourceid == '' || resourceid == null) {
+        url = "/api/v4/resources";
+    } else {
+        url = "/api/v4/resources/" + resourceid;
+    }
+    return axios({
+        method: 'get',
+        url: url,
+        auth: {
+            username: username,
+            password: password
+        },
+    })
+}
+
+//获取资源状态
+export function getResourcesStatus(resourceid) {
+    let url = "/api/v4/resources/" + resourceid;
+    return axios({
+        method: 'get',
+        url: url,
+        auth: {
+            username: username,
+            password: password
+        },
+    })
+}
+
+//连接资源
+export function getConnectResource(resourceid) {
+    let url = "/api/v4/resources/" + resourceid;
+    return axios({
+        method: 'post',
+        url: url,
+        auth: {
+            username: username,
+            password: password
+        },
+    })
+}
+
+//删除资源
+export function deleteResource(resourceid) {
+    let url = "/api/v4/resources/" + resourceid;
+    return axios({
+        method: 'delete',
+        url: url,
+        auth: {
+            username: username,
+            password: password
+        },
+    })
+}
+
+
+//获取资源类型
+export function getResourcesType() {
+    let url = "/api/v4/resource_types";
+    return axios({
+        method: 'get',
+        url: url,
+        auth: {
+            username: username,
+            password: password
+        },
+    })
+}
+
+
+//资源测试连接
+export function getResourcesConnect(query) {
+    let url = "/api/v4/resources?test=true";
+    return axios({
+        method: 'post',
+        url: url,
+        auth: {
+            username: username,
+            password: password
+        },
+        data: query
+    })
+}
+
+//新增资源
+export function saveResources(query) {
+    let url = "/api/v4/resources";
+    return axios({
+        method: 'post',
+        url: url,
+        auth: {
+            username: username,
+            password: password
+        },
+        data: query
+    })
+}
+
+
+//获取规则消息类型
+export function getRulesEvent() {
+    let url = "/api/v4/rule_events";
+    return axios({
+        method: 'get',
+        url: url,
+        auth: {
+            username: username,
+            password: password
+        },
+    })
+}
+
+//获取响应动作类型
+export function getActionsEvent() {
+    let url = "/api/v4/actions";
+    return axios({
+        method: 'get',
+        url: url,
+        auth: {
+            username: username,
+            password: password
+        },
+    })
+}
+
+
+//新增规则引擎
+export function saveRule(query) {
+    let url = "/api/v4/rules";
+    return axios({
+        method: 'post',
+        url: url,
+        auth: {
+            username: username,
+            password: password
+        },
+        data: query
+    })
+}
+
+//测试规则引擎
+export function testConnectRule(query) {
+    let url = "/api/v4/rules?test=true";
+    return axios({
+        method: 'post',
+        url: url,
+        auth: {
+            username: username,
+            password: password
+        },
+        data: query
+    })
+}

+ 45 - 0
src/api/iot/eventLog.js

@@ -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'
+  })
+}

+ 61 - 0
src/api/iot/firmware.js

@@ -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'
+  })
+}

+ 65 - 0
src/api/iot/firmwareTask.js

@@ -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
+  })
+}

+ 44 - 0
src/api/iot/functionLog.js

@@ -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'
+  })
+}

+ 71 - 0
src/api/iot/gateway.js

@@ -0,0 +1,71 @@
+import request from '@/utils/request'
+
+// 查询网关与子设备关联列表
+export function listGateway(query) {
+  return request({
+    url: '/sub/gateway/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询网关与子设备关联详细
+export function getGateway(id) {
+  return request({
+    url: '/sub/gateway/' + id,
+    method: 'get'
+  })
+}
+
+// 新增网关与子设备关联
+export function addGateway(data) {
+  return request({
+    url: '/sub/gateway',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改网关与子设备关联
+export function updateGateway(data) {
+  return request({
+    url: '/sub/gateway',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除网关与子设备关联
+export function delGateway(id) {
+  return request({
+    url: '/sub/gateway/' + id,
+    method: 'delete'
+  })
+}
+
+// 获取可选择的网关子设备列表
+export function listSubGateway(query) {
+  return request({
+    url: '/sub/gateway/subDevice',
+    method: 'get',
+    params: query
+  })
+}
+
+// 批量新增网关与子设备关联
+export function addGatewayBatch(data) {
+  return request({
+    url: '/sub/gateway/addBatch',
+    method: 'post',
+    data: data
+  })
+}
+
+// 批量新增网关与子设备关联
+export function editGatewayBatch(data) {
+  return request({
+    url: '/sub/gateway/editBatch',
+    method: 'post',
+    data: data
+  })
+}

+ 61 - 0
src/api/iot/group.js

@@ -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'
+  })
+}

+ 51 - 0
src/api/iot/httpClient.js

@@ -0,0 +1,51 @@
+import request from '@/utils/request';
+
+// 查询mqtt桥接http配置列表
+export function httpClientList(query) {
+    return request({
+        url: '/iot/httpClient/list',
+        method: 'get',
+        params: query,
+    });
+}
+
+// 查询mqtt桥接http配置详细
+export function getHttpClient(id) {
+    return request({
+        url: '/iot/httpClient/' + id,
+        method: 'get',
+    });
+}
+
+// 新增mqtt桥接http配置
+export function addHttpClient(data) {
+    return request({
+        url: '/iot/httpClient',
+        method: 'post',
+        data: data,
+    });
+}
+
+// 修改mqtt桥接http配置
+export function updateHttpClient(data) {
+    return request({
+        url: '/iot/httpClient',
+        method: 'put',
+        data: data,
+    });
+}
+
+// 删除mqtt桥接http配置
+export function delHttpClient(id) {
+    return request({
+        url: '/iot/httpClient/' + id,
+        method: 'delete',
+    });
+}
+export function bridgeClient(data) {
+    return request({
+        url: '/iot/httpClient/bridge',
+        method: 'post',
+        data: data,
+    });
+}

+ 44 - 0
src/api/iot/log.js

@@ -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'
+  })
+}

+ 52 - 0
src/api/iot/mediaServer.js

@@ -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
+  })
+}

+ 61 - 0
src/api/iot/modbusConfig.js

@@ -0,0 +1,61 @@
+import request from '@/utils/request'
+
+// 查询modbus配置列表
+export function listConfig(query) {
+  return request({
+    url: '/modbus/config/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询modbus配置详细
+export function getConfig(id) {
+  return request({
+    url: '/modbus/config/' + id,
+    method: 'get'
+  })
+}
+
+// 新增modbus配置
+export function addConfig(data) {
+  return request({
+    url: '/modbus/config',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改modbus配置
+export function updateConfig(data) {
+  return request({
+    url: '/modbus/config',
+    method: 'put',
+    data: data
+  })
+}
+//批量新增modbus1配置
+export function addBatch(data) {
+  return request({
+    url: '/modbus/config/addBatch',
+    method: 'post',
+    data: data
+  })
+}
+
+//批量更新modbus1配置
+export function editBatch(data) {
+  return request({
+    url: '/modbus/config/editBatch',
+    method: 'post',
+    data: data
+  })
+}
+
+// 删除modbus配置
+export function delConfig(id) {
+  return request({
+    url: '/modbus/config/' + id,
+    method: 'delete'
+  })
+}

+ 49 - 0
src/api/iot/modbusJob.js

@@ -0,0 +1,49 @@
+import request from '@/utils/request'
+
+// 查询轮训任务列列表
+export function listJob(query) {
+  return request({
+    url: '/modbus/job/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询轮训任务列详细
+export function getJob(taskId) {
+  return request({
+    url: '/modbus/job/' + taskId,
+    method: 'get'
+  })
+}
+
+// 新增轮训任务列
+export function addJob(data) {
+  return request({
+    url: '/modbus/job',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改轮训任务列
+export function updateJob(taskId,status) {
+  const data = {
+    taskId: taskId,
+    status: status
+  }
+  return request({
+    url: '/modbus/job',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除轮训任务列
+export function delJob(data) {
+  return request({
+    url: '/modbus/job/del',
+    method: 'post',
+    data: data
+  })
+}

+ 106 - 0
src/api/iot/model.js

@@ -0,0 +1,106 @@
+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,
+  });
+}
+
+// 导入excel物模型
+export function importExcel(data) {
+    return request({
+        url: '/iot/model/importExcel',
+        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,
+  });
+}
+
+// 根据产品ID获取缓存的物模型
+export function getlListModbus(query) {
+  return request({
+    url: '/iot/model/listModbus',
+    method: 'get',
+    params: query,
+  });
+}
+
+// 根据产品ID获取缓存的物模型
+export function getWriteList(query) {
+  return request({
+    url: '/iot/model/write',
+    method: 'get',
+    params: query,
+  });
+}

+ 51 - 0
src/api/iot/mqttClient.js

@@ -0,0 +1,51 @@
+import request from '@/utils/request';
+
+// 查询mqtt桥接配置表列表
+export function mqttClientList(query) {
+    return request({
+        url: '/iot/mqttClient/list',
+        method: 'get',
+        params: query,
+    });
+}
+
+// 查询mqtt桥接配置表详细
+export function getClient(id) {
+    return request({
+        url: '/iot/mqttClient/' + id,
+        method: 'get',
+    });
+}
+
+// 新增mqtt桥接配置表
+export function addClient(data) {
+    return request({
+        url: '/iot/mqttClient',
+        method: 'post',
+        data: data,
+    });
+}
+
+// 修改mqtt桥接配置表
+export function updateClient(data) {
+    return request({
+        url: '/iot/mqttClient',
+        method: 'put',
+        data: data,
+    });
+}
+
+// 删除mqtt桥接配置表
+export function delClient(id) {
+    return request({
+        url: '/iot/mqttClient/' + id,
+        method: 'delete',
+    });
+}
+export function bridgeClient(data) {
+    return request({
+        url: '/iot/mqttClient/bridge',
+        method: 'post',
+        data: data,
+    });
+}

+ 63 - 0
src/api/iot/mqttTest.js

@@ -0,0 +1,63 @@
+import request from '@/utils/request';
+
+// 指令编码
+export function encode(query) {
+  return request({
+    url: '/iot/message/encode',
+    method: 'get',
+    params: query,
+  });
+}
+
+// 指令解码
+export function decode(query) {
+  return request({
+    url: '/iot/message/decode',
+    method: 'get',
+    params: query,
+  });
+}
+
+// 平台下发指令
+export function messagePost(data) {
+  return request({
+    url: '/iot/message/post',
+    method: 'post',
+    data: data,
+  });
+}
+
+// 查询设备指令偏好设置列表
+export function preferencesList(query) {
+  return request({
+    url: '/iot/preferences/list',
+    method: 'get',
+    params: query,
+  });
+}
+
+// 新增设备指令偏好设置
+export function addPreferences(data) {
+  return request({
+    url: '/iot/preferences',
+    method: 'post',
+    data: data,
+  });
+}
+
+// 修改设备指令偏好设置
+export function editPreferences(data) {
+  return request({
+    url: '/iot/preferences',
+    method: 'put',
+    data: data,
+  });
+}
+
+// 删除设备指令偏好设置
+export function delPreferences(data) {
+  return request({
+    url: `/iot/preferences/${data.id}`,
+    method: 'DELETE'
+  });
+}

+ 36 - 0
src/api/iot/netty.js

@@ -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
+  })
+}
+

+ 44 - 0
src/api/iot/news.js

@@ -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'
+  })
+}

+ 52 - 0
src/api/iot/newsCategory.js

@@ -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'
+  })
+}

+ 53 - 0
src/api/iot/params.js

@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 查询产品modbus配置参数列表
+export function listParams(query) {
+  return request({
+    url: '/modbus/params/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询产品modbus配置参数详细
+export function getParams(id) {
+  return request({
+    url: '/modbus/params/' + id,
+    method: 'get'
+  })
+}
+
+// 新增产品modbus配置参数
+export function addParams(data) {
+  return request({
+    url: '/modbus/params',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改产品modbus配置参数
+export function updateParams(data) {
+  return request({
+    url: '/modbus/params',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除产品modbus配置参数
+export function delParams(id) {
+  return request({
+    url: '/modbus/params/' + id,
+    method: 'delete'
+  })
+}
+
+// 根据产品io获取modbus配置
+export function getByProductId(params) {
+  return request({
+    url: '/modbus/params/getByProductId',
+    method: 'get',
+    params:params
+  })
+}

+ 68 - 0
src/api/iot/platform.js

@@ -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'
+  })
+}

+ 62 - 0
src/api/iot/point.js

@@ -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
+  })
+}

+ 78 - 0
src/api/iot/product.js

@@ -0,0 +1,78 @@
+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
+  })
+}

+ 44 - 0
src/api/iot/protocol.js

@@ -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'
+  })
+}

+ 88 - 0
src/api/iot/record.js

@@ -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
+  })
+}

+ 54 - 0
src/api/iot/runstatus.js

@@ -0,0 +1,54 @@
+import request from '@/utils/request'
+
+//查询设备实时数据
+export function runStatus(params) {
+    return request({
+        url: '/iot/runtime/runState',
+        method: 'get',
+        params: params,
+    })
+}
+
+
+//服务调用,等待设备响应
+export function serviceInvokeReply(data) {
+    return request({
+        url: '/iot/runtime/service/invokeReply',
+        method: 'post',
+        data: data,
+    });
+}
+
+//查询设备服务下发日志
+export function funcLog(params) {
+    return request({
+        url: '/iot/runtime/funcLog',
+        method: 'get',
+        params: params,
+    });
+}
+
+export function runningStatus(params) {
+    return request({
+        url: '/iot/runtime/running',
+        method: 'get',
+        params: params,
+    });
+}
+
+export function propGet(params) {
+    return request({
+        url: '/iot/runtime/prop/get',
+        method: 'get',
+        params: params,
+    });
+}
+
+//服务调用,不等待设备响应
+export function serviceInvoke(data) {
+    return request({
+        url: '/iot/runtime/service/invoke',
+        method: 'post',
+        data: data,
+    });
+}

+ 53 - 0
src/api/iot/salve.js

@@ -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,
+    })
+}

部分文件因为文件数量过多而无法显示