This commit is contained in:
wangzenghua 2025-04-16 02:20:40 +01:00
commit 99d196d283
838 changed files with 632453 additions and 0 deletions

24
.editorconfig Normal file
View File

@ -0,0 +1,24 @@
# 告诉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
# 代码行最大字符数
max_line_length = 120
# 匹配md结尾的文件
[*.md]
insert_final_newline = false
trim_trailing_whitespace = false

27
.env.development Normal file
View File

@ -0,0 +1,27 @@
# 页面标题
VUE_APP_TITLE = 青蛙农业租户版
# 开发环境配置
ENV = 'development'
# 开发环境
VUE_APP_BASE_API = '/dev-api'
# 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true
# 后端接口地址
VUE_APP_SERVER_API_URL = 'http://localhost:8080'
# EMQX接口地址和账号EMQX安装默认账号密码为admin public
VUE_APP_EMQX_API_URL = 'http://localhost:8081'
VUE_APP_EMQX_API_USER_NAME = 'admin'
VUE_APP_EMQX_API_PASSWORD = 'public'
# EMQX消息服务器连接地址
VUE_APP_EMQX_SERVER_URL = 'ws://localhost:8083/mqtt'
# 高德地图参数
VUE_APP_GAO_DE_SECURITYJSCODE = '77ef0c4c95553799630ad60dd9b692d7'
VUE_APP_GAO_DE_KEY = '661ce1b2c811daca029685d9ae25ee6d'

19
.env.production Normal file
View File

@ -0,0 +1,19 @@
# 页面标题
VUE_APP_TITLE = 青蛙农业租户版
# 生产环境配置
ENV = 'production'
# 智慧农业智能控制系统/生产环境
VUE_APP_BASE_API = '/prod-api'
# EMQX接口账号后端地址和EMQX接口地址部署时通过nginx配置代理
VUE_APP_EMQX_API_USER_NAME = 'admin'
VUE_APP_EMQX_API_PASSWORD = 'public'
# EMQX消息服务器连接地址,使用空字符串则会自动获取服务器地址
VUE_APP_EMQX_SERVER_URL = 'ws://47.117.148.147:8083/mqtt'
# 高德地图参数
VUE_APP_GAO_DE_SECURITYJSCODE = '77ef0c4c95553799630ad60dd9b692d7'
VUE_APP_GAO_DE_KEY = '661ce1b2c811daca029685d9ae25ee6d'

22
.env.staging Normal file
View File

@ -0,0 +1,22 @@
# 页面标题
VUE_APP_TITLE = 青蛙智慧农业
NODE_ENV = production
# 测试环境配置
ENV = 'staging'
# 智慧农业智能控制系统/测试环境
VUE_APP_BASE_API = '/stage-api'
# EMQX接口账号后端地址和EMQX接口地址部署时通过nginx配置代理
VUE_APP_EMQX_API_USER_NAME = 'admin'
VUE_APP_EMQX_API_PASSWORD = 'public'
# EMQX消息服务器连接地址
VUE_APP_EMQX_SERVER_URL = 'ws://localhost:8083/mqtt'
# 高德地图参数
VUE_APP_GAO_DE_SECURITYJSCODE = 'nAtaBg9FYzav6c8P9rF9qXXXXXX'
VUE_APP_GAO_DE_KEY = '7f59a099e2a0a0c9b360d35fed10af19'

10
.eslintignore Normal file
View File

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

199
.eslintrc.js Normal file
View File

@ -0,0 +1,199 @@
// ESlint 检查配置
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
//it is base on https://github.com/vuejs/eslint-config-vue
rules: {
"vue/max-attributes-per-line": [2, {
"singleline": 10,
"multiline": {
"max": 1,
"allowFirstLine": false
}
}],
"vue/singleline-html-element-content-newline": "off",
"vue/multiline-html-element-content-newline":"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, 'never'],
'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, 'never'],
'semi-spacing': [2, {
'before': false,
'after': true
}],
'space-before-blocks': [2, 'always'],
'space-before-function-paren': [2, 'never'],
'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']
}
}

26
.gitignore vendored Normal file
View File

@ -0,0 +1,26 @@
.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
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.local
package-lock.json
yarn.lock
.DS_Store
**/.DS_Store
.DS_Store?

1
README.md Normal file
View File

@ -0,0 +1 @@
当前版本2.0.1

13
babel.config.js Normal file
View File

@ -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
bin/build.bat Normal file
View File

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

12
bin/package.bat Normal file
View File

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

12
bin/run-web.bat Normal file
View File

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

35
build/index.js Normal file
View File

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

117
package.json Normal file
View File

@ -0,0 +1,117 @@
{
"name": "digital-agriculture-admin",
"version": "2.1.2",
"description": "数字农业后台管理系统",
"author": "nealtsiao",
"license": "GPL3.0",
"scripts": {
"dev": "vue-cli-service serve",
"build:prod": "vue-cli-service build",
"build:stage": "vue-cli-service build --mode staging",
"preview": "node build/index.js --preview",
"lint": "eslint --ext .js,.vue src"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"src/**/*.{js,vue}": [
"eslint --fix",
"git add"
]
},
"keywords": [
"vue",
"admin",
"dashboard",
"element-ui",
"boilerplate",
"admin-template",
"management-system"
],
"repository": {
"type": "git",
"url": "https://gitee.com/y_project/RuoYi-Vue.git"
},
"dependencies": {
"@amap/amap-jsapi-loader": "^1.0.1",
"@easydarwin/easywasmplayer": "^4.0.7",
"@jiaminghi/data-view": "^2.10.0",
"@riophae/vue-treeselect": "0.4.0",
"axios": "0.24.0",
"clipboard": "2.0.6",
"codemirror": "^5.65.2",
"core-js": "3.19.1",
"dhtmlx-gantt": "^8.0.1",
"echarts": "^5.3.1",
"echarts-gl": "^2.0.9",
"element-china-area-data": "^4.1.1",
"element-resize-detector": "^1.2.4",
"element-ui": "2.15.6",
"ezuikit-js": "^7.7.10",
"file-saver": "2.0.5",
"fuse.js": "6.4.3",
"highlight.js": "9.18.5",
"js-beautify": "1.13.0",
"js-cookie": "3.0.1",
"jsencrypt": "3.2.1",
"jshint": "^2.13.4",
"jsonlint": "^1.6.3",
"lodash": "^4.17.21",
"monaco-editor": "^0.52.2",
"mqtt": "^4.3.3",
"nprogress": "0.2.0",
"qrcode.vue": "^1.7.0",
"qs": "^6.13.1",
"quill": "^1.3.7",
"screenfull": "5.0.2",
"script-loader": "^0.7.2",
"sql-formatter": "^4.0.2",
"v-calendar": "^2.4.2",
"vconsole": "^3.15.1",
"vue": "2.6.12",
"vue-clipboard2": "^0.3.3",
"vue-codemirror": "^4.0.6",
"vue-count-to": "1.0.13",
"vue-cropper": "0.5.5",
"vue-draggable-resizable": "^2.3.0",
"vue-easytable": "^2.14.0",
"vue-json-editor": "^1.4.3",
"vue-json-viewer": "^2.2.21",
"vue-meta": "2.4.0",
"vue-monaco-editor": "0.0.19",
"vue-qr": "^4.0.9",
"vue-router": "3.4.9",
"vue-seamless-scroll": "^1.1.23",
"vue2-ace-editor": "0.0.15",
"vuedraggable": "2.24.3",
"vuex": "3.6.0"
},
"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",
"chalk": "4.1.0",
"connect": "3.6.6",
"eslint": "7.15.0",
"eslint-plugin-vue": "7.2.0",
"lint-staged": "10.5.3",
"runjs": "4.4.2",
"sass": "1.32.13",
"sass-loader": "10.1.1",
"script-ext-html-webpack-plugin": "2.1.5",
"svg-sprite-loader": "5.1.1",
"vue-template-compiler": "2.6.12"
},
"engines": {
"node": ">=8.9",
"npm": ">= 3.0.0"
},
"browserslist": [
"> 1%",
"last 2 versions"
]
}

BIN
public/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

46
public/html/ie.html Normal file

File diff suppressed because one or more lines are too long

230
public/index.html Normal file
View File

@ -0,0 +1,230 @@
<!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-multi.js"></script>
<script src="/js/jessibuca-pro/jessibuca-pro.js"></script>
<title>
<%= webpackConfig.name %>
</title>
<!--[if lt IE 11]><script>window.location.href='/html/ie.html';</script><![endif]-->
<style>
html,
body,
#app {
height: 100%;
margin: 0px;
padding: 0px;
}
.chromeframe {
margin: 0.2em 0;
background: #ccc;
color: #000;
padding: 0.2em 0;
}
#loader-wrapper {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 999999;
}
#loader {
display: block;
position: relative;
left: 50%;
top: 50%;
width: 150px;
height: 150px;
margin: -75px 0 0 -75px;
border-radius: 50%;
border: 3px solid transparent;
border-top-color: #FFF;
-webkit-animation: spin 2s linear infinite;
-ms-animation: spin 2s linear infinite;
-moz-animation: spin 2s linear infinite;
-o-animation: spin 2s linear infinite;
animation: spin 2s linear infinite;
z-index: 1001;
}
#loader:before {
content: "";
position: absolute;
top: 5px;
left: 5px;
right: 5px;
bottom: 5px;
border-radius: 50%;
border: 3px solid transparent;
border-top-color: #FFF;
-webkit-animation: spin 3s linear infinite;
-moz-animation: spin 3s linear infinite;
-o-animation: spin 3s linear infinite;
-ms-animation: spin 3s linear infinite;
animation: spin 3s linear infinite;
}
#loader:after {
content: "";
position: absolute;
top: 15px;
left: 15px;
right: 15px;
bottom: 15px;
border-radius: 50%;
border: 3px solid transparent;
border-top-color: #FFF;
-moz-animation: spin 1.5s linear infinite;
-o-animation: spin 1.5s linear infinite;
-ms-animation: spin 1.5s linear infinite;
-webkit-animation: spin 1.5s linear infinite;
animation: spin 1.5s linear infinite;
}
@-webkit-keyframes spin {
0% {
-webkit-transform: rotate(0deg);
-ms-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
-ms-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@keyframes spin {
0% {
-webkit-transform: rotate(0deg);
-ms-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
-ms-transform: rotate(360deg);
transform: rotate(360deg);
}
}
#loader-wrapper .loader-section {
position: fixed;
top: 0;
width: 51%;
height: 100%;
background: #2b7;
z-index: 1000;
-webkit-transform: translateX(0);
-ms-transform: translateX(0);
transform: translateX(0);
}
#loader-wrapper .loader-section.section-left {
left: 0;
}
#loader-wrapper .loader-section.section-right {
right: 0;
}
.loaded #loader-wrapper .loader-section.section-left {
-webkit-transform: translateX(-100%);
-ms-transform: translateX(-100%);
transform: translateX(-100%);
-webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
}
.loaded #loader-wrapper .loader-section.section-right {
-webkit-transform: translateX(100%);
-ms-transform: translateX(100%);
transform: translateX(100%);
-webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
}
.loaded #loader {
opacity: 0;
-webkit-transition: all 0.3s ease-out;
transition: all 0.3s ease-out;
}
.loaded #loader-wrapper {
visibility: hidden;
-webkit-transform: translateY(-100%);
-ms-transform: translateY(-100%);
transform: translateY(-100%);
-webkit-transition: all 0.3s 1s ease-out;
transition: all 0.3s 1s ease-out;
}
.no-js #loader-wrapper {
display: none;
}
.no-js h1 {
color: #222222;
}
#loader-wrapper .load_title {
font-family: 'Open Sans';
color: #FFF;
font-size: 19px;
width: 100%;
text-align: center;
z-index: 9999999999999;
position: absolute;
top: 60%;
opacity: 1;
line-height: 30px;
}
#loader-wrapper .load_title span {
font-weight: normal;
font-style: italic;
font-size: 13px;
color: #FFF;
opacity: 0.5;
}
img {
max-width: 100%;
}
/* 清除地图LOGO */
/* .BMap_cpyCtrl {
display: none!important;
}
.anchorBL {
display: none!important;
} */
</style>
</head>
<body>
<div id="app">
<div id="loader-wrapper">
<div id="loader"></div>
<div class="loader-section section-left"></div>
<div class="loader-section section-right"></div>
<div class="load_title">正在加载系统资源,请耐心等待</div>
</div>
</div>
</body>
</html>

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@ -0,0 +1 @@
"use strict";var Module={};var ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string";if(ENVIRONMENT_IS_NODE){var nodeWorkerThreads=require("worker_threads");var parentPort=nodeWorkerThreads.parentPort;parentPort.on("message",data=>onmessage({data:data}));var fs=require("fs");Object.assign(global,{self:global,require:require,Module:Module,location:{href:__filename},Worker:nodeWorkerThreads.Worker,importScripts:function(f){(0,eval)(fs.readFileSync(f,"utf8"))},postMessage:function(msg){parentPort.postMessage(msg)},performance:global.performance||{now:function(){return Date.now()}}})}var initializedJS=false;var pendingNotifiedProxyingQueues=[];function threadPrintErr(){var text=Array.prototype.slice.call(arguments).join(" ");if(ENVIRONMENT_IS_NODE){fs.writeSync(2,text+"\n");return}console.error(text)}function threadAlert(){var text=Array.prototype.slice.call(arguments).join(" ");postMessage({cmd:"alert",text:text,threadId:Module["_pthread_self"]()})}var err=threadPrintErr;self.alert=threadAlert;Module["instantiateWasm"]=(info,receiveInstance)=>{var instance=new WebAssembly.Instance(Module["wasmModule"],info);receiveInstance(instance);Module["wasmModule"]=null;return instance.exports};self.onmessage=e=>{try{if(e.data.cmd==="load"){Module["wasmModule"]=e.data.wasmModule;Module["wasmMemory"]=e.data.wasmMemory;Module["buffer"]=Module["wasmMemory"].buffer;Module["ENVIRONMENT_IS_PTHREAD"]=true;(e.data.urlOrBlob?import(e.data.urlOrBlob):import("./decoder-pro-mt-worker.js")).then(function(exports){return exports.default(Module)}).then(function(instance){Module=instance})}else if(e.data.cmd==="run"){Module["__performance_now_clock_drift"]=performance.now()-e.data.time;Module["__emscripten_thread_init"](e.data.pthread_ptr,0,0,1);Module["establishStackSpace"]();Module["PThread"].receiveObjectTransfer(e.data);Module["PThread"].threadInitTLS();if(!initializedJS){Module["___embind_register_native_and_builtin_types"]();pendingNotifiedProxyingQueues.forEach(queue=>{Module["executeNotifiedProxyingQueue"](queue)});pendingNotifiedProxyingQueues=[];initializedJS=true}try{Module["invokeEntryPoint"](e.data.start_routine,e.data.arg)}catch(ex){if(ex!="unwind"){if(ex instanceof Module["ExitStatus"]){if(Module["keepRuntimeAlive"]()){}else{Module["__emscripten_thread_exit"](ex.status)}}else{throw ex}}}}else if(e.data.cmd==="cancel"){if(Module["_pthread_self"]()){Module["__emscripten_thread_exit"](-1)}}else if(e.data.target==="setimmediate"){}else if(e.data.cmd==="processProxyingQueue"){if(initializedJS){Module["executeNotifiedProxyingQueue"](e.data.queue)}else{pendingNotifiedProxyingQueues.push(e.data.queue)}}else{err("worker.js received unknown command "+e.data.cmd);err(e.data)}}catch(ex){err("worker.js onmessage() captured an uncaught exception: "+ex);if(ex&&ex.stack)err(ex.stack);if(Module["__emscripten_thread_crashed"]){Module["__emscripten_thread_crashed"]()}throw ex}};

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
"use strict";var Module={};var ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string";if(ENVIRONMENT_IS_NODE){var nodeWorkerThreads=require("worker_threads");var parentPort=nodeWorkerThreads.parentPort;parentPort.on("message",data=>onmessage({data:data}));var fs=require("fs");Object.assign(global,{self:global,require:require,Module:Module,location:{href:__filename},Worker:nodeWorkerThreads.Worker,importScripts:f=>(0,eval)(fs.readFileSync(f,"utf8")+"//# sourceURL="+f),postMessage:msg=>parentPort.postMessage(msg),performance:global.performance||{now:Date.now}})}var initializedJS=false;function threadPrintErr(){var text=Array.prototype.slice.call(arguments).join(" ");if(ENVIRONMENT_IS_NODE){fs.writeSync(2,text+"\n");return}console.error(text)}function threadAlert(){var text=Array.prototype.slice.call(arguments).join(" ");postMessage({cmd:"alert",text:text,threadId:Module["_pthread_self"]()})}var err=threadPrintErr;self.alert=threadAlert;Module["instantiateWasm"]=(info,receiveInstance)=>{var module=Module["wasmModule"];Module["wasmModule"]=null;var instance=new WebAssembly.Instance(module,info);return receiveInstance(instance)};self.onunhandledrejection=e=>{throw e.reason||e};function handleMessage(e){try{if(e.data.cmd==="load"){let messageQueue=[];self.onmessage=e=>messageQueue.push(e);self.startWorker=instance=>{Module=instance;postMessage({"cmd":"loaded"});for(let msg of messageQueue){handleMessage(msg)}self.onmessage=handleMessage};Module["wasmModule"]=e.data.wasmModule;for(const handler of e.data.handlers){Module[handler]=(...args)=>{postMessage({cmd:"callHandler",handler:handler,args:args})}}Module["wasmMemory"]=e.data.wasmMemory;Module["buffer"]=Module["wasmMemory"].buffer;Module["ENVIRONMENT_IS_PTHREAD"]=true;(e.data.urlOrBlob?import(e.data.urlOrBlob):import("./decoder-pro-simd-mt-worker.js")).then(exports=>exports.default(Module))}else if(e.data.cmd==="run"){Module["__emscripten_thread_init"](e.data.pthread_ptr,0,0,1);Module["__emscripten_thread_mailbox_await"](e.data.pthread_ptr);Module["establishStackSpace"]();Module["PThread"].receiveObjectTransfer(e.data);Module["PThread"].threadInitTLS();if(!initializedJS){Module["__embind_initialize_bindings"]();initializedJS=true}try{Module["invokeEntryPoint"](e.data.start_routine,e.data.arg)}catch(ex){if(ex!="unwind"){throw ex}}}else if(e.data.cmd==="cancel"){if(Module["_pthread_self"]()){Module["__emscripten_thread_exit"](-1)}}else if(e.data.target==="setimmediate"){}else if(e.data.cmd==="checkMailbox"){if(initializedJS){Module["checkMailbox"]()}}else if(e.data.cmd){err(`worker.js received unknown command ${e.data.cmd}`);err(e.data)}}catch(ex){if(Module["__emscripten_thread_crashed"]){Module["__emscripten_thread_crashed"]()}throw ex}}self.onmessage=handleMessage;

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2
public/robots.txt Normal file
View File

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

2972
public/video/axios.js Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,40 @@
@font-face {
font-family: "iconfont"; /* Project id 2880328 */
/* src: url('iconfont.woff2?t=1691113634840') format('woff2'),
url('iconfont.woff?t=1691113634840') format('woff'),
url('iconfont.ttf?t=1691113634840') format('truetype'); */
src: url("./iconfont.ttf");
}
.iconfont {
font-family: "iconfont" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-dianying:before {
content: "\e605";
}
.icon-zhaoxiangji:before {
content: "\e663";
}
.icon-tupian:before {
content: "\e610";
}
.icon-erjiyasuojichuanganqiguzhang:before {
content: "\e611";
}
.icon-luxiangyingpeng:before {
content: "\e6af";
}
.icon-new:before {
content: "\e647";
}

40
public/video/iconfont.css Normal file
View File

@ -0,0 +1,40 @@
@font-face {
font-family: "iconfont"; /* Project id 2880328 */
/* src: url('iconfont.woff2?t=1691113634840') format('woff2'),
url('iconfont.woff?t=1691113634840') format('woff'),
url('iconfont.ttf?t=1691113634840') format('truetype'); */
src: url("./iconfont.ttf");
}
.iconfont {
font-family: "iconfont" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-dianying:before {
content: "\e605";
}
.icon-zhaoxiangji:before {
content: "\e663";
}
.icon-tupian:before {
content: "\e610";
}
.icon-erjiyasuojichuanganqiguzhang:before {
content: "\e611";
}
.icon-luxiangyingpeng:before {
content: "\e6af";
}
.icon-new:before {
content: "\e647";
}

1
public/video/iconfont.js Normal file

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,51 @@
{
"id": "2880328",
"name": "态势感知",
"font_family": "iconfont",
"css_prefix_text": "icon-",
"description": "",
"glyphs": [
{
"icon_id": "180897",
"name": "电影",
"font_class": "dianying",
"unicode": "e605",
"unicode_decimal": 58885
},
{
"icon_id": "630128",
"name": "照相机",
"font_class": "zhaoxiangji",
"unicode": "e663",
"unicode_decimal": 58979
},
{
"icon_id": "5270582",
"name": "图片-产品详情",
"font_class": "tupian",
"unicode": "e610",
"unicode_decimal": 58896
},
{
"icon_id": "20299502",
"name": "二级压缩机传感器故障",
"font_class": "erjiyasuojichuanganqiguzhang",
"unicode": "e611",
"unicode_decimal": 58897
},
{
"icon_id": "20736120",
"name": "录像影棚",
"font_class": "luxiangyingpeng",
"unicode": "e6af",
"unicode_decimal": 59055
},
{
"icon_id": "9930896",
"name": "new",
"font_class": "new",
"unicode": "e647",
"unicode_decimal": 58951
}
]
}

BIN
public/video/iconfont.ttf Normal file

Binary file not shown.

BIN
public/video/iconfont.woff Normal file

Binary file not shown.

BIN
public/video/iconfont.woff2 Normal file

Binary file not shown.

461
public/video/index.html Normal file
View File

@ -0,0 +1,461 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no,viewport-fit=cover">
<link rel="stylesheet" href="./iconfont.css">
<link rel="stylesheet" href="https://unpkg.com/vant@2.12/lib/index.css"/>
<style>
* {
-webkit-touch-callout:none;
-webkit-user-select:none;
-khtml-user-select:none;
-moz-user-select:none;
-ms-user-select:none;
user-select:none;
}
[v-cloak] {
display: none;
}
#player .container {
height: 250px;
width: 100%;
background: rgba(13, 14, 27, 0.7);
}
#player .tabs{
width: 100%;
display: flex;
justify-content: space-between;
height: 50px;
line-height: 50px;
border-bottom: 10px solid #eee;
}
#player .tabs .iconfont{
flex: 1;
text-align: center;
}
#player .tabs .iconfont.active{
color: #69BB73;
}
#player .title{
height: 50px;
line-height: 50px;
padding:0 20px;
display: flex;
align-items: center;
justify-content: space-between;
}
#player .title .channel{
display: flex;
align-items: center;
font-size: 12px;
}
#player .title .date{
display: flex;
border: 2px solid #eee;
width: 50%;
height: 25px;
line-height: 25px;
border-radius: 8px;
overflow: hidden;
}
#player .title .date .time{
width: 80%;
font-size: 14px;
text-align: center;
}
#player .title .date .icon{
height: 100%;
width: 20%;
background: #69BB73;
display: flex;
align-items: center;
justify-content: center;
}
#player .controller .rocker{
margin: 15px auto;
width: 200px;
height: 200px;
border-radius: 50%;
position: relative;
box-sizing: border-box;
border: 8px solid #f1f7ed;
display: flex;
align-items: center;
justify-content: center;
}
#player .controller .rocker>div{
border-radius: 50%;
overflow: hidden;
}
#player .controller .rocker .left{
position: absolute;
top: 50%;
left: 0;
transform: translate(0,-50%);
}
#player .controller .rocker .right{
position: absolute;
top: 50%;
right: 0;
transform: translate(0,-50%);
}
#player .controller .rocker .up{
position: absolute;
top: 0;
left: 50%;
transform: translate(-50%,0);
}
#player .controller .rocker .down{
position: absolute;
bottom: 0;
left: 50%;
transform: translate(-50%,0);
}
#player .controller .rocker .circle{
position: relative;
width: 30px;
height: 30px;
border-radius: 50%;
border: 1px solid #eee;
background-color: #eee;
}
#player .controller .zoom{
display: flex;
justify-content: space-between;
align-items: center;
height: 50px;
width: 70%;
margin: 0 auto;
border-radius: 25px;
box-shadow: 0 -8px 5px #eee;
overflow: hidden;
}
#player .controller .zoom .van-button{
height: 100%;
}
#player .controller .zoom .text{
width: 100%;
margin: 0 5px;
text-align: center;
color: #69BB73;
}
#player .playback{
padding: 0 20px;
box-sizing: border-box;
}
#player .playback .recordItems{
border: 1px solid #eee;
padding: 10px;
border-radius: 8px;
box-sizing: border-box;
display: flex;
align-items: center;
margin-bottom: 20px;
}
</style>
</head>
<body>
<div id="player" v-cloak>
<div ref="container" class="container"></div>
<!-- <div class="tabs">
<div v-for="(item,index) in tabsList" :key="index" @click="changTabs(item,index)"
:class="['iconfont',item.icon,{active:currentName==item.name}]"></div>
</div> -->
<div class="title">
<div class="">
{{currentName}}
</div>
<div class="channel" @click="show=true" v-show="currentName=='云台控制'">
{{channelName}}<van-icon name="arrow-down" />
</div>
</div>
<div class="controller" v-show="currentName=='云台控制'">
<div class="rocker">
<div class="up" @touchstart ="handleDirection('up')" @touchend ="handleDirection('stop')">
<van-button plain round icon="arrow-up"></van-button>
</div>
<div class="down" @touchstart ="handleDirection('down')" @touchend ="handleDirection('stop')">
<van-button plain round icon="arrow-down"></van-button>
</div>
<div class="left" @touchstart ="handleDirection('left')" @touchend ="handleDirection('stop')">
<van-button plain round icon="arrow-left"></van-button>
</div>
<div class="right" @touchstart ="handleDirection('right')" @touchend ="handleDirection('stop')">
<van-button plain round icon="arrow"></van-button>
</div>
<div class="circle"></div>
</div>
<div class="zoom">
<van-button plain round icon="plus" @touchstart="ptzScale(1)" @touchend.native="ptzStop"></van-button>
<div class="text"> 缩放 </div>
<van-button plain round icon="minus" @touchstart="ptzScale(2)" @touchend.native="ptzStop"></van-button>
</div>
</div>
<van-popup v-model="show" position="bottom">
<van-picker show-toolbar :columns="channelList" @cancel="show = false" @confirm="select"/>
</van-popup>
</div>
<script>
(function(doc, win) {
var docEl = doc.documentElement,
resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
recalc = function() {
var clientWidth = docEl.clientWidth;
if(!clientWidth) return;
};
if(!doc.addEventListener) return;
win.addEventListener(resizeEvt, recalc, false);
doc.addEventListener('DOMContentLoaded', recalc, false);
})(document, window);
</script>
<script type="text/javascript" src="../js/jessibuca-pro/jessibuca-pro.js"></script>
<script type="text/javascript" src="./axios.js"></script>
<script type="text/javascript" src="./uni.webview.1.5.4.js"></script>
<script type="text/javascript" src="./vue.js"></script>
<script type="text/javascript" src="./uuidv4.min.js"></script>
<script src="https://unpkg.com/vant@2.12/lib/vant.min.js"></script>
<script >
let vue = Vue
document.addEventListener("UniAppJSBridgeReady", function() {
vue.prototype.myUni = uni
});
new vue({
el: '#player',
data: {
loading: false,
channelSipId:'',
serialNumber:'',
params:{},
tabsList:[
{
icon:"icon-erjiyasuojichuanganqiguzhang",
name:"云台控制",
},
{
icon:"icon-zhaoxiangji",
},
],
currentName:"云台控制",
channelName:"无通道",
channelList:[],
show:false,
request:null,
},
async mounted() {
var str = window.location.search.substr(1)
var params = {};
str.split('&').forEach((item)=>{
let kv = item.split('=');
params[kv[0]] = kv[1];
});
this.params = params
await this.createAxios(params.fetchUrl)
await this.getDeviceInfo(params.deviceId)
await this.create();
},
methods:{
createAxios(fetchUrl){
axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
this.request = axios.create({
baseURL:fetchUrl,//setting.fetchUrl,
timeout: 5000
})
this.request.interceptors.request.use(config => {
if (this.params.token) {
config.headers['Authorization'] = 'Bearer ' + this.params.token // 让每个请求携带自定义token 请根据实际情况自行修改
}
return config
}, error => {
Promise.reject(error)
})
this.request.interceptors.response.use(res => {
const code = res.data.code || 200;
const msg = res.data.msg
if (code === 401) {
this.myUni.postMessage({
data: {
code:code
},
})
return Promise.reject('401 error')
} else if (code === 500) {
this.myUni.postMessage({
data: {
code:code
},
})
return Promise.reject(new Error(msg))
} else if (code === 502) {
this.myUni.postMessage({
data: {
code:code
},
})
return Promise.reject('error')
} else if (code !== 200) {
this.myUni.postMessage({
data: {
code:code
},
})
return Promise.reject('error')
} else {
return res.data
}
return res.data
},
error => {
let { message } = error;
if (message == "Network Error") {
message = "后端接口连接异常";
}
else if (message.includes("timeout")) {
message = "系统接口请求超时";
}
else if (message.includes("Request failed with status code")) {
message = "系统接口" + message.substr(message.length - 3) + "异常";
}
this.myUni.postMessage({
data: {
msg:message
},
})
return Promise.reject(message)
}
)
},
async getDeviceInfo(deviceId) {
const {data} = await this.request({
method:'get',
url:'/iot/device/'+deviceId
});
this.serialNumber = data.serialNumber;
this.channelList=data.children.filter(item=>item.sipStatus==3).map(item=>({
text:item.channelName,
channelSipId:item.channelSipId
}));
},
select(data,index){
this.channelName=data.text
this.channelSipId=data.channelSipId
this.show=false
this.play()
},
async create(type) {
this.$jessibucaPro && await this.$jessibucaPro.destroy();
let config = {
container: this.$refs.container,
videoBuffer: 0.1, // 缓存时长
videoBufferDelay: 0.2, //
loadingText: '加载中',
decoder: "../js/jessibuca-pro/decoder-pro.js",
isResize: false,
isFlv: true,
debug: false,
useMSE: false,
useSIMD: true,
useWebFullScreen:true,
debugLevel: 'debug',
showBandwidth: false, // 显示网速
showPerformance: false, // 显示性能
showPlaybackOperate: true,
operateBtns: {
fullscreen: true,
screenshot: false,
play: true,
audio: false,
record: false,
ptz: false,
performance: false,
},
ptzClickType: 'mouseDownAndUp'
}
const jessibucaPro = new JessibucaPro(config);
this.$jessibucaPro = jessibucaPro;
},
/** 直播 */
async play() {
if (this.serialNumber && this.channelSipId) {
//通知设备推流
const {data} = await this.request({
method:'get',
url:`/sip/player/play/${this.serialNumber}/${this.channelSipId}`
});
data.playurl && this.$jessibucaPro.play(data.playurl);
}
},
/** 方向控制 */
ptzDirection(leftRight, upDown) {
var data = {
leftRight: leftRight,
upDown: upDown,
moveSpeed: 125,
};
if (this.serialNumber && this.channelSipId) {
this.request({
method:'post',
url:'/sip/ptz/direction/'+ this.serialNumber + "/" + this.channelSipId ,
data:data
})
}
},
handleDirection(d){
switch (d) {
case 'up':
this.ptzDirection(0, 1);
break;
case 'down':
this.ptzDirection(0, 2);
break;
case 'left':
this.ptzDirection(2, 0);
break;
case 'right':
this.ptzDirection(1, 0);
break;
case 'stop':
this.ptzDirection(0, 0);
break;
}
},
async changTabs(data,index){
if(index==1){
this.screenShot()
}
},
// 缩放发送
ptzScale(inOut){
let data = {
inOut:inOut,
scaleSpeed:30
}
if (this.serialNumber && this.channelSipId) {
this.request({
method:'post',
url:'/sip/ptz/scale/'+ this.serialNumber + "/" + this.channelSipId,
data:data
})
}
},
// 缩放停止
ptzStop(){
this.request({
method:'post',
url:'/sip/ptz/scale/'+ this.serialNumber + "/" + this.channelSipId,
data:{
inOut:0,
scaleSpeed:30
}
})
}
}
})
</script>
</body>
</html>

File diff suppressed because one or more lines are too long

1
public/video/uuidv4.min.js vendored Normal file
View File

@ -0,0 +1 @@
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).uuidv4=e()}(this,(function(){"use strict";var t,e=new Uint8Array(16);function o(){if(!t&&!(t="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return t(e)}var n=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function r(t){return"string"==typeof t&&n.test(t)}for(var i=[],u=0;u<256;++u)i.push((u+256).toString(16).substr(1));return function(t,e,n){var u=(t=t||{}).random||(t.rng||o)();if(u[6]=15&u[6]|64,u[8]=63&u[8]|128,e){n=n||0;for(var f=0;f<16;++f)e[n+f]=u[f];return e}return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=(i[t[e+0]]+i[t[e+1]]+i[t[e+2]]+i[t[e+3]]+"-"+i[t[e+4]]+i[t[e+5]]+"-"+i[t[e+6]]+i[t[e+7]]+"-"+i[t[e+8]]+i[t[e+9]]+"-"+i[t[e+10]]+i[t[e+11]]+i[t[e+12]]+i[t[e+13]]+i[t[e+14]]+i[t[e+15]]).toLowerCase();if(!r(o))throw TypeError("Stringified UUID is invalid");return o}(u)}}));

11909
public/video/vue.js Normal file

File diff suppressed because it is too large Load Diff

22
src/App.vue Normal file
View File

@ -0,0 +1,22 @@
<template>
<div id="app" style="background-color:#0e2e87" v-if="$route.meta.bigScreen">
<router-view />
</div>
<div id="app" v-else>
<router-view />
</div>
</template>
<script>
export default {
name: 'App',
metaInfo() {
return {
title: this.$store.state.settings.dynamicTitle && this.$store.state.settings.title,
titleTemplate: title => {
return title ? `${title} - ${process.env.VUE_APP_TITLE}` : process.env.VUE_APP_TITLE
}
}
}
}
</script>

View File

@ -0,0 +1,68 @@
import request from '@/utils/request'
// 查询基地信息列表
export function listBaseinfo(query) {
return request({
url: '/agriculture/baseinfo/list',
method: 'get',
params: query
})
}
// 根据角色查询基地信息列表
export function selectBaseinfoListByRoles() {
return request({
url: '/agriculture/baseinfo/selectBaseinfoListByRoles',
method: 'get'
})
}
// 根据角色查询基地信息列表(表格)
export function selectBaseinfoListByRolesForTable(query) {
return request({
url: '/agriculture/baseinfo/selectBaseinfoListByRolesForTable',
method: 'get',
params:query
})
}
// 查询基地信息详细
export function getBaseinfo(baseId) {
return request({
url: '/agriculture/baseinfo/' + baseId,
method: 'get'
})
}
// 查询基地信息详细
export function getBaseinfoByDeptId(baseId) {
return request({
url: '/agriculture/baseinfo/getBaseinfoByDeptId/' + baseId,
method: 'get'
})
}
// 新增基地信息
export function addBaseinfo(data) {
return request({
url: '/agriculture/baseinfo',
method: 'post',
data: data
})
}
// 修改基地信息
export function updateBaseinfo(data) {
return request({
url: '/agriculture/baseinfo',
method: 'put',
data: data
})
}
// 删除基地信息
export function delBaseinfo(baseId) {
return request({
url: '/agriculture/baseinfo/' + baseId,
method: 'delete'
})
}

View File

@ -0,0 +1,53 @@
import request from '@/utils/request'
// 查询作物批次列表
export function listBatch(query) {
return request({
url: '/agriculture/batch/list',
method: 'get',
params: query
})
}
// 查询自己的作物批次列表
export function listBatchOfMine(query) {
return request({
url: '/agriculture/batch/listOfMine',
method: 'get',
params: query
})
}
// 查询作物批次详细
export function getBatch(batchId) {
return request({
url: '/agriculture/batch/' + batchId,
method: 'get'
})
}
// 新增作物批次
export function addBatch(data) {
return request({
url: '/agriculture/batch',
method: 'post',
data: data
})
}
// 修改作物批次
export function updateBatch(data) {
return request({
url: '/agriculture/batch',
method: 'put',
data: data
})
}
// 删除作物批次
export function delBatch(batchId) {
return request({
url: '/agriculture/batch/' + batchId,
method: 'delete'
})
}

View File

@ -0,0 +1,52 @@
import request from '@/utils/request'
// 查询批次任务列表
export function listBatchTask(query) {
return request({
url: '/agriculture/batchTask/list',
method: 'get',
params: query
})
}
// 查询批次任务列表
export function listBatchTaskOfMine(query) {
return request({
url: '/agriculture/batchTask/listOfMine',
method: 'get',
params: query
})
}
// 查询批次任务详细
export function getBatchTask(taskId) {
return request({
url: '/agriculture/batchTask/' + taskId,
method: 'get'
})
}
// 新增批次任务
export function addBatchTask(data) {
return request({
url: '/agriculture/batchTask',
method: 'post',
data: data
})
}
// 修改批次任务
export function updateBatchTask(data) {
return request({
url: '/agriculture/batchTask',
method: 'put',
data: data
})
}
// 删除批次任务
export function delBatchTask(taskId) {
return request({
url: '/agriculture/batchTask/' + taskId,
method: 'delete'
})
}

View File

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询人工工时列表
export function listCostEmployee(query) {
return request({
url: '/agriculture/costEmployee/list',
method: 'get',
params: query
})
}
// 查询人工工时详细
export function getCostEmployee(costId) {
return request({
url: '/agriculture/costEmployee/' + costId,
method: 'get'
})
}
// 新增人工工时
export function addCostEmployee(data) {
return request({
url: '/agriculture/costEmployee',
method: 'post',
data: data
})
}
// 修改人工工时
export function updateCostEmployee(data) {
return request({
url: '/agriculture/costEmployee',
method: 'put',
data: data
})
}
// 删除人工工时
export function delCostEmployee(costId) {
return request({
url: '/agriculture/costEmployee/' + costId,
method: 'delete'
})
}

View File

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询机械工时列表
export function listCostMachine(query) {
return request({
url: '/agriculture/costMachine/list',
method: 'get',
params: query
})
}
// 查询机械工时详细
export function getCostMachine(costId) {
return request({
url: '/agriculture/costMachine/' + costId,
method: 'get'
})
}
// 新增机械工时
export function addCostMachine(data) {
return request({
url: '/agriculture/costMachine',
method: 'post',
data: data
})
}
// 修改机械工时
export function updateCostMachine(data) {
return request({
url: '/agriculture/costMachine',
method: 'put',
data: data
})
}
// 删除机械工时
export function delCostMachine(costId) {
return request({
url: '/agriculture/costMachine/' + costId,
method: 'delete'
})
}

View File

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询农资用量列表
export function listCostMaterial(query) {
return request({
url: '/agriculture/costMaterial/list',
method: 'get',
params: query
})
}
// 查询农资用量详细
export function getCostMaterial(costId) {
return request({
url: '/agriculture/costMaterial/' + costId,
method: 'get'
})
}
// 新增农资用量
export function addCostMaterial(data) {
return request({
url: '/agriculture/costMaterial',
method: 'post',
data: data
})
}
// 修改农资用量
export function updateCostMaterial(data) {
return request({
url: '/agriculture/costMaterial',
method: 'put',
data: data
})
}
// 删除农资用量
export function delCostMaterial(costId) {
return request({
url: '/agriculture/costMaterial/' + costId,
method: 'delete'
})
}

View File

@ -0,0 +1,36 @@
import request from '@/utils/request'
export function selectBaseInfo(baseId) {
return request({
url: '/agriculture/statistics/selectBaseInfo/'+baseId,
method: 'get'
})
}
export function selectDeviceInfo(baseId) {
return request({
url: '/agriculture/statistics/selectDeviceInfo/'+baseId,
method: 'get'
})
}
export function selectDeviceLog(baseId) {
return request({
url: '/agriculture/statistics/selectDeviceLog/'+baseId,
method: 'get'
})
}
export function selectTaskInfo(baseId) {
return request({
url: '/agriculture/statistics/selectTaskInfo/'+baseId,
method: 'get'
})
}
export function selectBatchInfo(baseId) {
return request({
url: '/agriculture/statistics/selectBatchInfo/'+baseId,
method: 'get'
})
}

View File

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询雇员列表
export function listEmployee(query) {
return request({
url: '/agriculture/employee/list',
method: 'get',
params: query
})
}
// 查询雇员详细
export function getEmployee(employeeId) {
return request({
url: '/agriculture/employee/' + employeeId,
method: 'get'
})
}
// 新增雇员
export function addEmployee(data) {
return request({
url: '/agriculture/employee',
method: 'post',
data: data
})
}
// 修改雇员
export function updateEmployee(data) {
return request({
url: '/agriculture/employee',
method: 'put',
data: data
})
}
// 删除雇员
export function delEmployee(employeeId) {
return request({
url: '/agriculture/employee/' + employeeId,
method: 'delete'
})
}

View File

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询种质列表
export function listGermplasm(query) {
return request({
url: '/agriculture/germplasm/list',
method: 'get',
params: query
})
}
// 查询种质详细
export function getGermplasm(germplasmId) {
return request({
url: '/agriculture/germplasm/' + germplasmId,
method: 'get'
})
}
// 新增种质
export function addGermplasm(data) {
return request({
url: '/agriculture/germplasm',
method: 'post',
data: data
})
}
// 修改种质
export function updateGermplasm(data) {
return request({
url: '/agriculture/germplasm',
method: 'put',
data: data
})
}
// 删除种质
export function delGermplasm(germplasmId) {
return request({
url: '/agriculture/germplasm/' + germplasmId,
method: 'delete'
})
}

View File

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询种质介绍列表
export function listIntro(query) {
return request({
url: '/agriculture/intro/list',
method: 'get',
params: query
})
}
// 查询种质介绍详细
export function getIntro(introId) {
return request({
url: '/agriculture/intro/' + introId,
method: 'get'
})
}
// 新增种质介绍
export function addIntro(data) {
return request({
url: '/agriculture/intro',
method: 'post',
data: data
})
}
// 修改种质介绍
export function updateIntro(data) {
return request({
url: '/agriculture/intro',
method: 'put',
data: data
})
}
// 删除种质介绍
export function delIntro(introId) {
return request({
url: '/agriculture/intro/' + introId,
method: 'delete'
})
}

View File

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询地块列表
export function listLand(query) {
return request({
url: '/agriculture/land/list',
method: 'get',
params: query
})
}
// 查询地块详细
export function getLand(landId) {
return request({
url: '/agriculture/land/' + landId,
method: 'get'
})
}
// 新增地块
export function addLand(data) {
return request({
url: '/agriculture/land',
method: 'post',
data: data
})
}
// 修改地块
export function updateLand(data) {
return request({
url: '/agriculture/land',
method: 'put',
data: data
})
}
// 删除地块
export function delLand(landId) {
return request({
url: '/agriculture/land/' + landId,
method: 'delete'
})
}

View File

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询批次任务日志列表
export function listLog(query) {
return request({
url: '/agriculture/log/list',
method: 'get',
params: query
})
}
// 查询批次任务日志详细
export function getLog(logId) {
return request({
url: '/agriculture/log/' + logId,
method: 'get'
})
}
// 新增批次任务日志
export function addLog(data) {
return request({
url: '/agriculture/log',
method: 'post',
data: data
})
}
// 修改批次任务日志
export function updateLog(data) {
return request({
url: '/agriculture/log',
method: 'put',
data: data
})
}
// 删除批次任务日志
export function delLog(logId) {
return request({
url: '/agriculture/log/' + logId,
method: 'delete'
})
}

View File

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询机械信息列表
export function listMachineInfo(query) {
return request({
url: '/agriculture/machineInfo/list',
method: 'get',
params: query
})
}
// 查询机械信息详细
export function getMachineInfo(machineId) {
return request({
url: '/agriculture/machineInfo/' + machineId,
method: 'get'
})
}
// 新增机械信息
export function addMachineInfo(data) {
return request({
url: '/agriculture/machineInfo',
method: 'post',
data: data
})
}
// 修改机械信息
export function updateMachineInfo(data) {
return request({
url: '/agriculture/machineInfo',
method: 'put',
data: data
})
}
// 删除机械信息
export function delMachineInfo(machineId) {
return request({
url: '/agriculture/machineInfo/' + machineId,
method: 'delete'
})
}

View File

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询机械类别列表
export function listMachineType(query) {
return request({
url: '/agriculture/machineType/list',
method: 'get',
params: query
})
}
// 查询机械类别详细
export function getMachineType(machineTypeId) {
return request({
url: '/agriculture/machineType/' + machineTypeId,
method: 'get'
})
}
// 新增机械类别
export function addMachineType(data) {
return request({
url: '/agriculture/machineType',
method: 'post',
data: data
})
}
// 修改机械类别
export function updateMachineType(data) {
return request({
url: '/agriculture/machineType',
method: 'put',
data: data
})
}
// 删除机械类别
export function delMachineType(machineTypeId) {
return request({
url: '/agriculture/machineType/' + machineTypeId,
method: 'delete'
})
}

View File

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询农资信息列表
export function listMaterialInfo(query) {
return request({
url: '/agriculture/materialInfo/list',
method: 'get',
params: query
})
}
// 查询农资信息详细
export function getMaterialInfo(materialId) {
return request({
url: '/agriculture/materialInfo/' + materialId,
method: 'get'
})
}
// 新增农资信息
export function addMaterialInfo(data) {
return request({
url: '/agriculture/materialInfo',
method: 'post',
data: data
})
}
// 修改农资信息
export function updateMaterialInfo(data) {
return request({
url: '/agriculture/materialInfo',
method: 'put',
data: data
})
}
// 删除农资信息
export function delMaterialInfo(materialId) {
return request({
url: '/agriculture/materialInfo/' + materialId,
method: 'delete'
})
}

View File

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询农资类别列表
export function listMaterialType(query) {
return request({
url: '/agriculture/materialType/list',
method: 'get',
params: query
})
}
// 查询农资类别详细
export function getMaterialType(materialTypeId) {
return request({
url: '/agriculture/materialType/' + materialTypeId,
method: 'get'
})
}
// 新增农资类别
export function addMaterialType(data) {
return request({
url: '/agriculture/materialType',
method: 'post',
data: data
})
}
// 修改农资类别
export function updateMaterialType(data) {
return request({
url: '/agriculture/materialType',
method: 'put',
data: data
})
}
// 删除农资类别
export function delMaterialType(materialTypeId) {
return request({
url: '/agriculture/materialType/' + materialTypeId,
method: 'delete'
})
}

View File

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询种植方法列表
export function listMethod(query) {
return request({
url: '/agriculture/method/list',
method: 'get',
params: query
})
}
// 查询种植方法详细
export function getMethod(methodId) {
return request({
url: '/agriculture/method/' + methodId,
method: 'get'
})
}
// 新增种植方法
export function addMethod(data) {
return request({
url: '/agriculture/method',
method: 'post',
data: data
})
}
// 修改种植方法
export function updateMethod(data) {
return request({
url: '/agriculture/method',
method: 'put',
data: data
})
}
// 删除种植方法
export function delMethod(methodId) {
return request({
url: '/agriculture/method/' + methodId,
method: 'delete'
})
}

View File

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询标准作业任务列表
export function listStandardJob(query) {
return request({
url: '/agriculture/standardJob/list',
method: 'get',
params: query
})
}
// 查询标准作业任务详细
export function getStandardJob(jobId) {
return request({
url: '/agriculture/standardJob/' + jobId,
method: 'get'
})
}
// 新增标准作业任务
export function addStandardJob(data) {
return request({
url: '/agriculture/standardJob',
method: 'post',
data: data
})
}
// 修改标准作业任务
export function updateStandardJob(data) {
return request({
url: '/agriculture/standardJob',
method: 'put',
data: data
})
}
// 删除标准作业任务
export function delStandardJob(jobId) {
return request({
url: '/agriculture/standardJob/' + jobId,
method: 'delete'
})
}

View File

@ -0,0 +1,52 @@
import request from '@/utils/request'
// 查询批次任务工人列表
export function listTaskEmployee(query) {
return request({
url: '/agriculture/taskEmployee/list',
method: 'get',
params: query
})
}
// 查询批次任务工人详细
export function getTaskEmployee(id) {
return request({
url: '/agriculture/taskEmployee/' + id,
method: 'get'
})
}
// 新增批次任务工人
export function addTaskEmployee(data) {
return request({
url: '/agriculture/taskEmployee',
method: 'post',
data: data
})
}
// 修改批次任务工人
export function updateTaskEmployee(data) {
return request({
url: '/agriculture/taskEmployee',
method: 'put',
data: data
})
}
// 根据id删除批次任务工人
export function delTaskEmployee(id) {
return request({
url: '/agriculture/taskEmployee/' + id,
method: 'delete'
})
}
// 根据taskId和employeeId删除批次任务工人
export function delTaskEmployeeByTaskIdAndEmployeeId(taskId,employeeId) {
return request({
url: '/agriculture/taskEmployee/' + taskId+'/'+employeeId,
method: 'delete'
})
}

View File

@ -0,0 +1,59 @@
import request from '@/utils/request'
// 配置种植单元
export function cfgUnit(data) {
return request({
url: '/agriculture/unit/cfg',
method: 'POST',
data
})
}
//获取种植单元
export function getUnit(landId) {
return request({
url: '/agriculture/unit/getUnit/'+landId,
method: 'GET',
})
}
//获取设备
export function selectDeviceList(landId) {
return request({
url: '/agriculture/unit/selectDeviceList/'+landId,
method: 'GET',
})
}
//获取监控
export function selectCameraList(landId) {
return request({
url: '/agriculture/unit/selectCameraList/'+landId,
method: 'GET',
})
}
//获取种植批次
export function selectBatchList(landId) {
return request({
url: '/agriculture/unit/selectBatchList/'+landId,
method: 'GET',
})
}
//获取场景
export function selectSceneList(landId) {
return request({
url: '/agriculture/unit/selectSceneList/'+landId,
method: 'GET',
})
}
//获取告警日志
export function selectAlertLogList(query) {
return request({
url: '/agriculture/unit/selectAlertLogList/',
method: 'GET',
params: query
})
}

44
src/api/iot/alert.js Normal file
View File

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询设备告警列表
export function listAlert(query) {
return request({
url: '/iot/alert/list',
method: 'get',
params: query
})
}
// 查询设备告警详细
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'
})
}

44
src/api/iot/alertLog.js Normal file
View File

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询设备告警列表
export function listAlertLog(query) {
return request({
url: '/iot/alertLog/list',
method: 'get',
params: query
})
}
// 查询设备告警详细
export function getAlertLog(alertLogId) {
return request({
url: '/iot/alertLog/' + alertLogId,
method: 'get'
})
}
// 新增设备告警
export function addAlertLog(data) {
return request({
url: '/iot/alertLog',
method: 'post',
data: data
})
}
// 修改设备告警
export function updateAlertLog(data) {
return request({
url: '/iot/alertLog',
method: 'put',
data: data
})
}
// 删除设备告警
export function delAlertLog(alertLogId) {
return request({
url: '/iot/alertLog/' + alertLogId,
method: 'delete'
})
}

52
src/api/iot/authorize.js Normal file
View File

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

44
src/api/iot/category.js Normal file
View File

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询产品分类列表
export function listCategory(query) {
return request({
url: '/iot/category/list',
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'
})
}

121
src/api/iot/channel.js Normal file
View File

@ -0,0 +1,121 @@
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 addChannelToDevice(createNum, data) {
return request({
url: '/sip/channel/addToDevice/' + 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 stopPlay(deviceId, channelId, streamId) {
return request({
url: '/sip/player/playstop/' + deviceId + "/" + channelId + "/" + streamId,
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 playbackStop(deviceId, channelId, streamId) {
return request({
url: '/sip/player/playbackStop/' + 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
})
}

View File

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

97
src/api/iot/device.js Normal file
View File

@ -0,0 +1,97 @@
import request from '@/utils/request'
// 查询设备列表
export function listDevice(query) {
return request({
url: '/iot/device/list',
method: 'get',
params: query
})
}
//摄像头列表
export function listCamera(query){
return request({
url:'/iot/device/list',
method:'get',
params:{
isCamera:1,
...query
}
})
}
// 查询设备详细
export function getDevice(deviceId) {
return request({
url: '/iot/device/' + deviceId,
method: 'get'
})
}
// 根据设备编号查询设备详细
export function getDeviceBySerialNumber(serialNumber) {
return request({
url: '/iot/device/getDeviceBySerialNumber/' + serialNumber,
method: 'get'
})
}
// 查询设备运行状态详细
export function getDeviceRunningStatus(deviceId) {
return request({
url: '/iot/device/runningStatus/' + deviceId,
method: 'get'
})
}
// 查询设备运行状态单层模型
export function getDeviceRunningStatusSingle(deviceId,removeNotRecord) {
return request({
url: '/iot/device/runningStatusSingle/' + deviceId+'/'+removeNotRecord,
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() {
return request({
url: '/iot/device/generator',
method: 'get'
})
}
// 生成设备编号
export function importDevice(data) {
return request({
url: '/iot/device/import',
method: 'post',
data: data
})
}

71
src/api/iot/deviceJob.js Normal file
View File

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

View File

@ -0,0 +1,22 @@
import request from '@/utils/request'
// 查询设备定时任务日志列表
export function listLog(query) {
return request({
url: '/iot/deviceJobLog/list',
method: 'get',
params: query
})
}
// 查询设备定时任务日志详细
export function getLog(jobLogId) {
return request({
url: '/iot/deviceJobLog/' + jobLogId,
method: 'get'
})
}

53
src/api/iot/deviceLog.js Normal file
View File

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

54
src/api/iot/deviceuser.js Normal file
View File

@ -0,0 +1,54 @@
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/deviceUser/' + deviceId + '/' + userId,
method: 'get'
})
}
// 新增设备用户
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
})
}

378
src/api/iot/emqx.js Normal file
View File

@ -0,0 +1,378 @@
import axios from 'axios'
const username = process.env.VUE_APP_EMQX_API_USER_NAME;
const password = process.env.VUE_APP_EMQX_API_PASSWORD;
// 集群下所有客户端列表
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
})
}

52
src/api/iot/firmware.js Normal file
View File

@ -0,0 +1,52 @@
import request from '@/utils/request'
// 查询产品固件列表
export function listFirmware(query) {
return request({
url: '/iot/firmware/list',
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'
})
}

30
src/api/iot/layout.js Normal file
View File

@ -0,0 +1,30 @@
import request from '@/utils/request'
// 查询产品布局列表
export function listLayout(query) {
return request({
url: '/iot/layout/list',
method: 'get',
params: query
})
}
// 新增产品布局
export function addLayout(data) {
return request({
url: '/iot/layout',
method: 'post',
data: data
})
}
// 删除产品布局
export function delLayout(productId) {
return request({
url: '/iot/layout/' + productId,
method: 'delete'
})
}

Some files were not shown because too many files have changed in this diff Show More