Commit 0b3f5b68 authored by xinzhedeai's avatar xinzhedeai

神木智慧农业

parents
Pipeline #429 failed with stages
{
"presets": [
["env", {
"modules": false,
"targets": {
"browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
}
}],
"stage-2"
],
"plugins":["transform-vue-jsx", "transform-runtime"],
"env": {
"development":{
"plugins": ["dynamic-import-node"]
}
}
}
# http://editorconfig.org
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
[*.md]
insert_final_newline = false
trim_trailing_whitespace = false
build/*.js
config/*.js
src/assets
\ No newline at end of file
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/name-property-casing": ["error", "PascalCase"],
'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': [2, 'allow-null'],
'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': 2,
'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']
}
}
.DS_Store
node_modules/
dist/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
package-lock.json
yarn.lock
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
// https://github.com/michael-ciniawsky/postcss-load-config
module.exports = {
"plugins": {
"postcss-import": {},
"postcss-url": {},
// to edit target browsers: use "browserslist" field in package.json
"autoprefixer": {}
}
}
language: node_js
node_js: stable
script: npm run test
notifications:
email: false
This diff is collapsed.
# SmartAgricWeb
#### Build Setup
``` bash
# 安装依赖
npm install
# 启动服务 localhost:8013
npm run dev
# 构建生产环境
npm run build
```
\ No newline at end of file
'use strict'
require('./check-versions')()
const ora = require('ora')
const rm = require('rimraf')
const path = require('path')
const chalk = require('chalk')
const webpack = require('webpack')
const config = require('../config')
const webpackConfig = require('./webpack.prod.conf')
var connect = require('connect')
var serveStatic = require('serve-static')
const spinner = ora(
'building for ' + process.env.env_config + ' environment...'
)
spinner.start()
rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => {
if (err) throw err
webpack(webpackConfig, (err, stats) => {
spinner.stop()
if (err) throw err
process.stdout.write(
stats.toString({
colors: true,
modules: false,
children: false,
chunks: false,
chunkModules: false
}) + '\n\n'
)
if (stats.hasErrors()) {
console.log(chalk.red(' Build failed with errors.\n'))
process.exit(1)
}
console.log(chalk.cyan(' Build complete.\n'))
console.log(
chalk.yellow(
' Tip: built files are meant to be served over an HTTP server.\n' +
" Opening index.html over file:// won't work.\n"
)
)
if (process.env.npm_config_preview) {
const port = 9526
const host = 'http://localhost:' + port
const basePath = config.build.assetsPublicPath
const app = connect()
app.use(
basePath,
serveStatic('./dist', {
index: ['index.html', '/']
})
)
app.listen(port, function() {
console.log(
chalk.green(`> Listening at http://localhost:${port}${basePath}`)
)
})
}
})
})
'use strict'
const chalk = require('chalk')
const semver = require('semver')
const packageConfig = require('../package.json')
const shell = require('shelljs')
function exec(cmd) {
return require('child_process')
.execSync(cmd)
.toString()
.trim()
}
const versionRequirements = [
{
name: 'node',
currentVersion: semver.clean(process.version),
versionRequirement: packageConfig.engines.node
}
]
if (shell.which('npm')) {
versionRequirements.push({
name: 'npm',
currentVersion: exec('npm --version'),
versionRequirement: packageConfig.engines.npm
})
}
module.exports = function() {
const warnings = []
for (let i = 0; i < versionRequirements.length; i++) {
const mod = versionRequirements[i]
if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) {
warnings.push(
mod.name +
': ' +
chalk.red(mod.currentVersion) +
' should be ' +
chalk.green(mod.versionRequirement)
)
}
}
if (warnings.length) {
console.log('')
console.log(
chalk.yellow(
'To use this template, you must update following to modules:'
)
)
for (let i = 0; i < warnings.length; i++) {
const warning = warnings[i]
console.log(' ' + warning)
}
process.exit(1)
}
}
'use strict'
const path = require('path')
const config = require('../config')
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
const packageConfig = require('../package.json')
exports.assetsPath = function(_path) {
const assetsSubDirectory =
process.env.NODE_ENV === 'production'
? config.build.assetsSubDirectory
: config.dev.assetsSubDirectory
return path.posix.join(assetsSubDirectory, _path)
}
exports.cssLoaders = function(options) {
options = options || {}
const cssLoader = {
loader: 'css-loader',
options: {
sourceMap: options.sourceMap
}
}
const postcssLoader = {
loader: 'postcss-loader',
options: {
sourceMap: options.sourceMap
}
}
// generate loader string to be used with extract text plugin
function generateLoaders(loader, loaderOptions) {
const loaders = []
// Extract CSS when that option is specified
// (which is the case during production build)
if (options.extract) {
loaders.push(MiniCssExtractPlugin.loader)
} else {
loaders.push('vue-style-loader')
}
loaders.push(cssLoader)
if (options.usePostCSS) {
loaders.push(postcssLoader)
}
if (loader) {
loaders.push({
loader: loader + '-loader',
options: Object.assign({}, loaderOptions, {
sourceMap: options.sourceMap
})
})
}
return loaders
}
// https://vue-loader.vuejs.org/en/configurations/extract-css.html
return {
css: generateLoaders(),
postcss: generateLoaders(),
less: generateLoaders('less'),
sass: generateLoaders('sass', {
indentedSyntax: true
}),
scss: generateLoaders('sass'),
stylus: generateLoaders('stylus'),
styl: generateLoaders('stylus')
}
}
// Generate loaders for standalone style files (outside of .vue)
exports.styleLoaders = function(options) {
const output = []
const loaders = exports.cssLoaders(options)
for (const extension in loaders) {
const loader = loaders[extension]
output.push({
test: new RegExp('\\.' + extension + '$'),
use: loader
})
}
return output
}
exports.createNotifierCallback = () => {
const notifier = require('node-notifier')
return (severity, errors) => {
if (severity !== 'error') return
const error = errors[0]
const filename = error.file && error.file.split('!').pop()
notifier.notify({
title: packageConfig.name,
message: severity + ': ' + error.name,
subtitle: filename || '',
icon: path.join(__dirname, 'logo.png')
})
}
}
'use strict'
module.exports = {
//You can set the vue-loader configuration by yourself.
}
'use strict'
const path = require('path')
const utils = require('./utils')
const config = require('../config')
const { VueLoaderPlugin } = require('vue-loader')
const os = require('os');
const HappyPack = require('happypack');
const happThreadPool = HappyPack.ThreadPool({size: os.cpus().length});
function resolve(dir) {
return path.join(__dirname, '..', dir)
}
const createLintingRule = () => ({
// test: /\.(js|vue)$/,
// loader: 'eslint-loader',
// enforce: 'pre',
// include: [resolve('src'), resolve('test')],
// options: {
// formatter: require('eslint-friendly-formatter'),
// emitWarning: !config.dev.showEslintErrorsInOverlay
// }
})
module.exports = {
cache: true,
context: path.resolve(__dirname, '../'),
entry:["babel-polyfill","./src/main.js"],
output: {
path: config.build.assetsRoot,
filename: '[name].js',
publicPath:
process.env.NODE_ENV === 'production'
? config.build.assetsPublicPath
: config.dev.assetsPublicPath
},
resolve: {
modules: [path.resolve(__dirname, '../node_modules')],
extensions: ['.js', '.vue', '.json'],
alias: {
'@': resolve('src'),
api: path.resolve(__dirname, '../src/api')
}
},
module: {
rules: [
...(config.dev.useEslint ? [createLintingRule()] : []),
{
test: /\.vue$/,
loader: 'vue-loader',
options: {
loaders: {
js: 'happypack/loader?id=js' // 将loader换成happypack
}
}
},
{
test: /\.js$/,
loader: ['happypack/loader?id=js'], // 将loader换成happypack
include: [
resolve('src')
], // src是项目开发的目录
exclude: [path.resolve('../node_modules')] // 不需要编译node_modules下的js
},
{
test: /\.svg$/,
loader: 'svg-sprite-loader',
include: [resolve('src/icons')],
options: {
symbolId: 'icon-[name]'
}
},
{
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
loader: 'url-loader',
exclude: [resolve('src/icons')],
options: {
limit: 10000,
name: utils.assetsPath('img/[name].[hash:7].[ext]')
}
},
{
test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/,
loader: 'url-loader',
options: {
limit: 10000,
name: utils.assetsPath('media/[name].[hash:7].[ext]')
}
},
{
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
loader: 'url-loader',
options: {
limit: 10000,
name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
}
}
]
},
plugins: [
new VueLoaderPlugin(),
new HappyPack({
id: 'js',
cache: true,
loaders: ['babel-loader?cacheDirectory=true'],
threadPool: happThreadPool
})
],
node: {
// prevent webpack from injecting useless setImmediate polyfill because Vue
// source contains it (although only uses it if it's native).
setImmediate: false,
// prevent webpack from injecting mocks to Node native modules
// that does not make sense for the client
dgram: 'empty',
fs: 'empty',
net: 'empty',
tls: 'empty',
child_process: 'empty'
}
}
'use strict'
const path = require('path')
const utils = require('./utils')
const webpack = require('webpack')
const config = require('../config')
const merge = require('webpack-merge')
const baseWebpackConfig = require('./webpack.base.conf')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin')
const portfinder = require('portfinder')
function resolve(dir) {
return path.join(__dirname, '..', dir)
}
const HOST = process.env.HOST
const PORT = process.env.PORT && Number(process.env.PORT)
const devWebpackConfig = merge(baseWebpackConfig, {
mode: 'development',
module: {
rules: utils.styleLoaders({
sourceMap: config.dev.cssSourceMap,
usePostCSS: true
})
},
// cheap-module-eval-source-map is faster for development
devtool: config.dev.devtool,
// these devServer options should be customized in /config/index.js
devServer: {
clientLogLevel: 'warning',
historyApiFallback: true,
hot: true,
compress: true,
host: HOST || config.dev.host,
port: PORT || config.dev.port,
open: config.dev.autoOpenBrowser,
overlay: config.dev.errorOverlay
? { warnings: false, errors: true }
: false,
publicPath: config.dev.assetsPublicPath,
proxy: config.dev.proxyTable,
quiet: true, // necessary for FriendlyErrorsPlugin
watchOptions: {
poll: config.dev.poll
}
},
plugins: [
new webpack.DefinePlugin({
'process.env': require('../config/dev.env')
}),
new webpack.HotModuleReplacementPlugin(),
// https://github.com/ampedandwired/html-webpack-plugin
new HtmlWebpackPlugin({
filename: 'index.html',
template: 'index.html',
inject: true,
favicon: resolve('favicon.ico'),
title: 'vue-element-admin',
templateParameters: {
BASE_URL: config.dev.assetsPublicPath + config.dev.assetsSubDirectory,
},
}),
]
})
module.exports = new Promise((resolve, reject) => {
portfinder.basePort = process.env.PORT || config.dev.port
portfinder.getPort((err, port) => {
if (err) {
reject(err)
} else {
// publish the new Port, necessary for e2e tests
process.env.PORT = port
// add port to devServer config
devWebpackConfig.devServer.port = port
// Add FriendlyErrorsPlugin
devWebpackConfig.plugins.push(
new FriendlyErrorsPlugin({
compilationSuccessInfo: {
messages: [
`Your application is running here: http://${
devWebpackConfig.devServer.host
}:${port}`
]
},
onErrors: config.dev.notifyOnErrors
? utils.createNotifierCallback()
: undefined
})
)
resolve(devWebpackConfig)
}
})
})
'use strict'
const path = require('path')
const utils = require('./utils')
const webpack = require('webpack')
const config = require('../config')
const merge = require('webpack-merge')
const baseWebpackConfig = require('./webpack.base.conf')
const CopyWebpackPlugin = require('copy-webpack-plugin')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const ScriptExtHtmlWebpackPlugin = require('script-ext-html-webpack-plugin')
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin')
const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
function resolve(dir) {
return path.join(__dirname, '..', dir)
}
const env = require('../config/' + process.env.env_config + '.env')
// For NamedChunksPlugin
const seen = new Set()
const nameLength = 4
const webpackConfig = merge(baseWebpackConfig, {
mode: 'production',
module: {
rules: utils.styleLoaders({
sourceMap: config.build.productionSourceMap,
extract: true,
usePostCSS: true
})
},
devtool: config.build.productionSourceMap ? config.build.devtool : false,
output: {
path: config.build.assetsRoot,
filename: utils.assetsPath('js/[name].[chunkhash:8].js'),
chunkFilename: utils.assetsPath('js/[name].[chunkhash:8].js')
},
plugins: [
// http://vuejs.github.io/vue-loader/en/workflow/production.html
new webpack.DefinePlugin({
'process.env': env
}),
// extract css into its own file
new MiniCssExtractPlugin({
filename: utils.assetsPath('css/[name].[contenthash:8].css'),
chunkFilename: utils.assetsPath('css/[name].[contenthash:8].css')
}),
// generate dist index.html with correct asset hash for caching.
// you can customize output by editing /index.html
// see https://github.com/ampedandwired/html-webpack-plugin
new HtmlWebpackPlugin({
filename: config.build.index,
template: 'index.html',
inject: true,
favicon: resolve('favicon.ico'),
title: 'vue-element-admin',
templateParameters: {
BASE_URL: config.build.assetsPublicPath + config.build.assetsSubDirectory,
},
minify: {
removeComments: true,
collapseWhitespace: true,
removeAttributeQuotes: true
// more options:
// https://github.com/kangax/html-minifier#options-quick-reference
}
// default sort mode uses toposort which cannot handle cyclic deps
// in certain cases, and in webpack 4, chunk order in HTML doesn't
// matter anyway
}),
new ScriptExtHtmlWebpackPlugin({
//`runtime` must same as runtimeChunk name. default is `runtime`
inline: /runtime\..*\.js$/
}),
// keep chunk.id stable when chunk has no name
new webpack.NamedChunksPlugin(chunk => {
if (chunk.name) {
return chunk.name
}
const modules = Array.from(chunk.modulesIterable)
if (modules.length > 1) {
const hash = require('hash-sum')
const joinedHash = hash(modules.map(m => m.id).join('_'))
let len = nameLength
while (seen.has(joinedHash.substr(0, len))) len++
seen.add(joinedHash.substr(0, len))
return `chunk-${joinedHash.substr(0, len)}`
} else {
return modules[0].id
}
}),
// keep module.id stable when vender modules does not change
new webpack.HashedModuleIdsPlugin(),
// copy custom static assets
new CopyWebpackPlugin([
{
from: path.resolve(__dirname, '../static'),
to: config.build.assetsSubDirectory,
ignore: ['.*']
}
])
],
optimization: {
splitChunks: {
chunks: 'all',
cacheGroups: {
libs: {
name: 'chunk-libs',
test: /[\\/]node_modules[\\/]/,
priority: 10,
chunks: 'initial' // 只打包初始时依赖的第三方
},
elementUI: {
name: 'chunk-elementUI', // 单独将 elementUI 拆包
priority: 20, // 权重要大于 libs 和 app 不然会被打包进 libs 或者 app
test: /[\\/]node_modules[\\/]element-ui[\\/]/
},
commons: {
name: 'chunk-commons',
test: resolve('src/components'), // 可自定义拓展你的规则
minChunks: 3, // 最小公用次数
priority: 5,
reuseExistingChunk: true
}
}
},
runtimeChunk: 'single',
minimizer: [
new UglifyJsPlugin({
uglifyOptions: {
mangle: {
safari10: true
}
},
sourceMap: config.build.productionSourceMap,
cache: true,
parallel: true
}),
// Compress extracted CSS. We are using this plugin so that possible
// duplicated CSS from different components can be deduped.
new OptimizeCSSAssetsPlugin()
]
}
})
if (config.build.productionGzip) {
const CompressionWebpackPlugin = require('compression-webpack-plugin')
webpackConfig.plugins.push(
new CompressionWebpackPlugin({
asset: '[path].gz[query]',
algorithm: 'gzip',
test: new RegExp(
'\\.(' + config.build.productionGzipExtensions.join('|') + ')$'
),
threshold: 10240,
minRatio: 0.8
})
)
}
if (config.build.generateAnalyzerReport || config.build.bundleAnalyzerReport) {
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer')
.BundleAnalyzerPlugin
if (config.build.bundleAnalyzerReport) {
webpackConfig.plugins.push(
new BundleAnalyzerPlugin({
analyzerPort: 8080,
generateStatsFile: false
})
)
}
if (config.build.generateAnalyzerReport) {
webpackConfig.plugins.push(
new BundleAnalyzerPlugin({
analyzerMode: 'static',
reportFilename: 'bundle-report.html',
openAnalyzer: false
})
)
}
}
module.exports = webpackConfig
'use strict'
const merge = require('webpack-merge')
const prodEnv = require('./prod.env')
module.exports = merge(prodEnv, {
NODE_ENV: '"development"',
// BASE_API: '"http://192.168.3.23:8086"'
BASE_API: '"http://117.34.103.191:8086"'
// BASE_API: '"http://117.34.103.191:8086"'
// BASE_API: '"http://jingkongyun.com:8000"'
// BASE_API: '"https://api.auauz.net"'
})
'use strict'
// Template version: 1.2.6
const devEnv = require('./dev.env')
// 获取接口地址
const base_url = devEnv.BASE_API.replace(/"/g,'')
const path = require('path')
module.exports = {
dev: {
// Paths
assetsSubDirectory: 'static',
assetsPublicPath: '/',
// 配置代理
proxyTable: {
'/auth': {
// 测试环境
target: base_url,
secure: true,
changeOrigin: true,
pathRewrite: {
'^/auth': 'auth'
}
},
'/api': {
// 测试环境
target: base_url,
secure: true,
changeOrigin: true,
pathRewrite: {
'^/api': 'api'
}
},
// 天气接口
'/weather': {
target: 'https://i.tianqi.com/', // 真实请求URl
changeOrigin: true, // 允许跨域
pathRewrite: { // 替换,通配/api的替换成/
'^/weather': '/'
}
}
},
// Various Dev Server settings
// host: '192.168.3.23', // can be overwritten by process.env.HOST
host: '192.168.3.38',
port: 8018, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
//host: '192.168.3.23', // can be overwritten by process.env.HOST
// host: '192.168.3.226', // can be overwritten by process.env.HOST
// port: 8013, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser: true,
errorOverlay: true,
notifyOnErrors: false,
poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
// Use Eslint Loader?
// If true, your code will be linted during bundling and
// linting errors and warnings will be shown in the console.
useEslint: true,
// If true, eslint errors and warnings will also be shown in the error overlay
// in the browser.
showEslintErrorsInOverlay: false,
/**
* Source Maps
*/
// https://webpack.js.org/configuration/devtool/#development
devtool: 'cheap-source-map',
// CSS Sourcemaps off by default because relative paths are "buggy"
// with this option, according to the CSS-Loader README
// (https://github.com/webpack/css-loader#sourcemaps)
// In our experience, they generally work as expected,
// just be aware of this issue when enabling this option.
cssSourceMap: false
},
build: {
// Template for index.html
index: path.resolve(__dirname, '../dist/index.html'),
// Paths
assetsRoot: path.resolve(__dirname, '../dist'),
assetsSubDirectory: 'static',
/**
* You can set by youself according to actual condition
* You will need to set this if you plan to deploy your site under a sub path,
* for example GitHub pages. If you plan to deploy your site to https://foo.github.io/bar/,
* then assetsPublicPath should be set to "/bar/".
* In most cases please use '/' !!!
*/
assetsPublicPath: '/',
/**
* Source Maps
*/
productionSourceMap: false,
// https://webpack.js.org/configuration/devtool/#production
devtool: 'source-map',
// Gzip off by default as many popular static hosts such as
// Surge or Netlify already gzip all static assets for you.
// Before setting to `true`, make sure to:
// npm install --save-dev compression-webpack-plugin
productionGzip: false,
productionGzipExtensions: ['js', 'css'],
// Run the build command with an extra argument to
// View the bundle analyzer report after build finishes:
// `npm run build --report`
// Set to `true` or `false` to always turn it on or off
bundleAnalyzerReport: process.env.npm_config_report || false,
// `npm run build:prod --generate_report`
generateAnalyzerReport: process.env.npm_config_generate_report || false
}
}
'use strict'
module.exports = {
NODE_ENV: '"production"',
BASE_API: '"http://117.34.103.191:8086"'
// BASE_API: '"http://jingkongyun.com:8000"'
//BASE_API: '"http://39.103.149.47:8000"'
// BASE_API: '"http://chendao.jingkongyun.com:8000"' // (old)
}
favicon.ico

66.1 KB

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<style>
.sampleContainer{position:fixed;top:50%;left:50%;-webkit-transform:translateX(-50%) translateY(-50%);width:75px;height:100px}.loader{position:relative;width:44px;height:8px;margin:12px auto}.dot{display:inline-block;width:8px;height:8px;border-radius:4px;background:#ccc;position:absolute}.dot_1{animation:animateDot1 1.5s linear infinite;left:12px;background:#e579b8}.dot_2{animation:animateDot2 1.5s linear infinite;animation-delay:.5s;left:24px}.dot_3{animation:animateDot3 1.5s linear infinite;left:12px}.dot_4{animation:animateDot4 1.5s linear infinite;animation-delay:.5s;left:24px}@keyframes animateDot1{0%{transform:rotate(0) translateX(-12px)}25%{transform:rotate(180deg) translateX(-12px)}75%{transform:rotate(180deg) translateX(-12px)}100%{transform:rotate(360deg) translateX(-12px)}}@keyframes animateDot2{0%{transform:rotate(0) translateX(-12px)}25%{transform:rotate(-180deg) translateX(-12px)}75%{transform:rotate(-180deg) translateX(-12px)}100%{transform:rotate(-360deg) translateX(-12px)}}@keyframes animateDot3{0%{transform:rotate(0) translateX(12px)}25%{transform:rotate(180deg) translateX(12px)}75%{transform:rotate(180deg) translateX(12px)}100%{transform:rotate(360deg) translateX(12px)}}@keyframes animateDot4{0%{transform:rotate(0) translateX(12px)}25%{transform:rotate(-180deg) translateX(12px)}75%{transform:rotate(-180deg) translateX(12px)}100%{transform:rotate(-360deg) translateX(12px)}}
</style>
<script
src="https://webapi.amap.com/maps?v=1.4.15&key=bfa930cbec820fc1c16f8f54348f98e3&plugin=Map3D,AMap.DistrictSearch,AMap.Geocoder,AMap.GraspRoad,AMap.CircleEditor">
</script>
</head>
<body>
<div id="app">
<div class="sampleContainer">
<div class="loader">
<span class="dot dot_1"></span>
<span class="dot dot_2"></span>
<span class="dot dot_3"></span>
<span class="dot dot_4"></span>
</div>
</div>
</div>
</body>
</html>
{
"name": "eladmin",
"version": "2.2.0",
"license": "Apache-2.0",
"description": "eladmin 前端代码",
"author": "jie <elunez@qq.com>",
"scripts": {
"dev": "cross-env BABEL_ENV=development webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
"build": "cross-env NODE_ENV=production env_config=prod node build/build.js",
"lint": "eslint --ext .js,.vue src",
"test": "npm run lint",
"precommit": "lint-staged",
"svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml"
},
"repository": {
"type": "git",
"url": "https://github.com/elunez/eladmin-qd"
},
"dependencies": {
"@riophae/vue-treeselect": "0.0.38",
"axios": "^0.19.0",
"clipboard": "1.7.1",
"codemirror": "^5.38.0",
"connect": "3.6.6",
"echarts": "4.7.0",
"echarts-liquidfill": "^2.0.5",
"element-ui": "^2.12.0",
"ezuikit": "^1.0.0",
"file-saver": "1.3.8",
"js-cookie": "2.2.0",
"jsencrypt": "^3.0.0-rc.1",
"jszip": "3.1.5",
"mavon-editor": "^2.7.0",
"normalize.css": "7.0.0",
"nprogress": "0.2.0",
"path-to-regexp": "2.4.0",
"screenfull": "3.3.3",
"swiper": "^6.4.15",
"vue": "2.5.17",
"vue-awesome-swiper": "^4.1.1",
"vue-baidu-map": "^0.21.22",
"vue-count-to": "1.0.13",
"vue-router": "3.1.3",
"vue-video-player": "^5.0.2",
"vuex": "3.0.1",
"wangeditor": ">=3.0.0",
"xlsx": "^0.11.16"
},
"devDependencies": {
"autoprefixer": "8.5.0",
"babel-core": "6.26.3",
"babel-eslint": "8.2.6",
"babel-helper-vue-jsx-merge-props": "2.0.3",
"babel-loader": "7.1.5",
"babel-plugin-dynamic-import-node": "2.0.0",
"babel-plugin-syntax-jsx": "6.18.0",
"babel-plugin-transform-runtime": "6.23.0",
"babel-plugin-transform-vue-jsx": "3.7.0",
"babel-polyfill": "^6.26.0",
"babel-preset-env": "1.7.0",
"babel-preset-stage-2": "6.24.1",
"chalk": "2.4.1",
"copy-webpack-plugin": "4.5.2",
"cross-env": "5.2.0",
"css-loader": "1.0.0",
"eslint": "4.19.1",
"eslint-friendly-formatter": "4.0.1",
"eslint-loader": "2.0.0",
"eslint-plugin-vue": "4.7.1",
"eventsource-polyfill": "0.9.6",
"ezuikit-js": "^0.2.9",
"file-loader": "1.1.11",
"friendly-errors-webpack-plugin": "1.7.0",
"happypack": "^5.0.1",
"html-webpack-plugin": "4.0.0-alpha",
"mini-css-extract-plugin": "0.4.1",
"node-notifier": "5.2.1",
"node-sass": "^4.14.0",
"sass-loader": "^8.0.0",
"optimize-css-assets-webpack-plugin": "5.0.0",
"ora": "3.0.0",
"portfinder": "1.0.16",
"postcss-import": "12.0.0",
"postcss-loader": "2.1.6",
"postcss-url": "7.3.2",
"rimraf": "2.6.2",
"script-ext-html-webpack-plugin": "2.0.1",
"script-loader": "0.7.2",
"semver": "5.5.0",
"shelljs": "^0.8.3",
"svg-sprite-loader": "3.8.0",
"svgo": "1.2.2",
"uglifyjs-webpack-plugin": "1.2.7",
"url-loader": "1.0.1",
"vue-loader": "15.3.0",
"vue-style-loader": "4.1.2",
"vue-template-compiler": "2.5.17",
"webpack": "^4.41.3",
"webpack-bundle-analyzer": "3.3.2",
"webpack-cli": "3.1.0",
"webpack-dev-server": "3.3.1",
"webpack-merge": "4.1.4"
},
"engines": {
"node": ">= 6.0.0",
"npm": ">= 3.0.0"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 8"
]
}
module.exports = {
printWidth: 300, // 行长规则通常设置为100或120
singleQuote: true, // 使用单引号, 默认false
semi: false, // 使用分号, 默认true
arrowParens: "avoid", // 箭头函数参数添加括号
trailingComma: "es5", // 在ES5中有效的结尾逗号(对象,数组等)
useTabs: true // 在ES5中有效的结尾逗号(对象,数组等)
}
<template>
<div id="app">
<router-view />
</div>
</template>
<script>
export default {
name: 'App',
}
</script>
<style lang="scss">
.el-table th {
background:#3c78ff !important;
color:#fff;
}
</style>
import request from '@/utils/request'
export function get() {
return request({
url: 'api/aliPay',
method: 'get'
})
}
export function update(data) {
return request({
url: 'api/aliPay',
data,
method: 'put'
})
}
// 支付
export function toAliPay(url, data) {
return request({
url: 'api/' + url,
data,
method: 'post'
})
}
import request from '@/utils/request'
export function resetEmail(data) {
return request({
url: 'api/code/resetEmail',
method: 'post',
data
})
}
export function updatePass(pass) {
return request({
url: 'api/users/updatePass/' + pass,
method: 'get'
})
}
import request from '@/utils/request'
import qs from 'qs'
export const HttpReq = {
// 后台管理接口列表
backstageApi: {
getLinkSrcList: function(params) {
return request({
url: 'api/hyperLink?' + qs.stringify(params, { indices: false }),
method: 'get'
})
},
updateLinkSrc: function(data) {
return request({
url: 'api/hyperLink',
method: 'put',
data: data
}).then((res) => {
return res
})
},
addLinkSrc: function(data) {
return request({
url: 'api/hyperLink',
method: 'post',
data: data
}).then((res) => {
return res
})
},
deleteLinkSrc: function(data) {
return request({
url: 'api/hyperLink',
method: 'delete',
data: data
}).then((res) => {
return res
})
},
api: null
},
// web端接口列表
webClientApi: {
getStatic: function(params) {
return request({
url: 'api/static?' + qs.stringify(params, { indices: false }),
method: 'get'
})
},
population: function(params) {
return request({
url: 'api/population?' + qs.stringify(params, { indices: false }),
method: 'get'
})
},
dynamic: function(params) {
return request({
url: 'api/dynamic?' + qs.stringify(params, { indices: false }),
method: 'get'
})
},
findDataByDeviceId: function(params) {
return request({
url: 'api/dynamic/findDataByDeviceId?' + qs.stringify(params, { indices: false }),
method: 'get'
})
},
api: null
}
}
import request from '@/utils/request'
export function initData(url, params) {
return request({
url: url,
method: 'get',
params
})
}
import request from '@/utils/request'
export function getDepts(params) {
return request({
url: 'api/dept',
method: 'get',
params
})
}
export function add(data) {
return request({
url: 'api/dept',
method: 'post',
data
})
}
export function del(id) {
return request({
url: 'api/dept/' + id,
method: 'delete'
})
}
export function edit(data) {
return request({
url: 'api/dept',
method: 'put',
data
})
}
export function deptByUseridNoPage() {
return request({
url: 'api/deptByUseridNoPage',
method: 'get'
})
}
import request from '@/utils/request'
export function add(data) {
return request({
url: 'api/dict',
method: 'post',
data
})
}
export function del(id) {
return request({
url: 'api/dict/' + id,
method: 'delete'
})
}
export function edit(data) {
return request({
url: 'api/dict',
method: 'put',
data
})
}
import request from '@/utils/request'
export function get(dictName) {
const params = {
dictName,
page: 0,
size: 9999
}
return request({
url: 'api/dictDetail',
method: 'get',
params
})
}
export function getDictMap(dictName) {
const params = {
dictName,
page: 0,
size: 9999
}
return request({
url: 'api/dictDetail/map',
method: 'get',
params
})
}
export function add(data) {
return request({
url: 'api/dictDetail',
method: 'post',
data
})
}
export function del(id) {
return request({
url: 'api/dictDetail/' + id,
method: 'delete'
})
}
export function edit(data) {
return request({
url: 'api/dictDetail',
method: 'put',
data
})
}
import request from '@/utils/request'
export function get() {
return request({
url: 'api/email',
method: 'get'
})
}
export function update(data) {
return request({
url: 'api/email',
data,
method: 'put'
})
}
export function send(data) {
return request({
url: 'api/email',
data,
method: 'post'
})
}
import request from '@/utils/request'
export function get() {
return request({
url: 'api/genConfig',
method: 'get'
})
}
export function update(data) {
return request({
url: 'api/genConfig',
data,
method: 'put'
})
}
import request from '@/utils/request'
export function generator(data, tableName) {
return request({
url: 'api/generator?tableName=' + tableName,
data,
method: 'post'
})
}
import request from '@/utils/request'
export function loadNowDataByUserid() {
return request({
url: 'api/loadNowDataByUserid',
method: 'get',
})
}
export function sItem(data) {
return request({
url: 'api/sItem',
method: 'get',
params: data,
})
}
export function sWarnmsgByUserid(data) {
return request({
url: 'api/sWarnmsgByUserid',
method: 'get',
params: data,
})
}
// 设备
export function sDeviceByUseridNotdevType(data) {
return request({
url: 'api/sDeviceByUseridNotdevType',
method: 'get',
params: data,
})
}
// 控制器
export function sDeviceByUseridAnddevType(data) {
return request({
url: 'api/sDeviceByUseridAnddevType',
method: 'get',
params: data,
})
}
export function getData(deviceid, item, starttime, endtime, params) {
return request({
url: 'api/getData',
method: 'post',
data: {
deviceid,
item,
starttime,
endtime,
},
params,
})
}
export function getWarnmsgCountByUserid() {
return request({
url: 'api/getWarnmsgCountByUserid',
method: 'get',
})
}
import request from '@/utils/request'
export function getAllJob(deptId) {
const params = {
deptId,
page: 0,
size: 9999
}
return request({
url: 'api/job',
method: 'get',
params
})
}
export function add(data) {
return request({
url: 'api/job',
method: 'post',
data
})
}
export function del(id) {
return request({
url: 'api/job/' + id,
method: 'delete'
})
}
export function edit(data) {
return request({
url: 'api/job',
method: 'put',
data
})
}
import request from '@/utils/request'
export function add(data) {
return request({
url: 'api/localStorage',
method: 'post',
data
})
}
export function del(id) {
return request({
url: 'api/localStorage/' + id,
method: 'delete'
})
}
export function delAll(ids) {
return request({
url: 'api/localStorage/',
method: 'delete',
data: ids
})
}
export function edit(data) {
return request({
url: 'api/localStorage',
method: 'put',
data
})
}
import request from '@/utils/request'
export function getErrDetail(id) {
return request({
url: 'api/logs/error/' + id,
method: 'get'
})
}
import request from '@/utils/request'
export function login(username, password, code, uuid) {
return request({
url: 'auth/login',
method: 'post',
data: {
username,
password,
code,
uuid
}
})
}
export function getInfo() {
return request({
url: 'auth/info',
method: 'get'
})
}
export function getCodeImg() {
return request({
url: 'auth/vCode',
method: 'get'
})
}
import request from '@/utils/request'
// 获取所有的菜单树
export function getMenusTree() {
return request({
url: 'api/menus/tree',
method: 'get'
})
}
export function buildMenus() {
return request({
url: 'api/menus/build',
method: 'get'
})
}
export function add(data) {
return request({
url: 'api/menus',
method: 'post',
data
})
}
export function del(id) {
return request({
url: 'api/menus/' + id,
method: 'delete'
})
}
export function edit(data) {
return request({
url: 'api/menus',
method: 'put',
data
})
}
import request from '@/utils/request'
export function getMonitor() {
return request({
url: 'api/monitorvideo',
method: 'get'
})
}
export function updateMonitor(data) {
return request({
url: 'api/monitorvideo',
method: 'put',
data
})
}
\ No newline at end of file
import request from '@/utils/request'
// 获取所有的权限树
export function getPermissionTree() {
return request({
url: 'api/permissions/tree',
method: 'get'
})
}
export function add(data) {
return request({
url: 'api/permissions',
method: 'post',
data
})
}
export function del(id) {
return request({
url: 'api/permissions/' + id,
method: 'delete'
})
}
export function edit(data) {
return request({
url: 'api/permissions',
method: 'put',
data
})
}
import request from '@/utils/request'
export function del(id) {
return request({
url: 'api/pictures/' + id,
method: 'delete'
})
}
export function delAll(ids) {
return request({
url: 'api/pictures/',
method: 'delete',
data: ids
})
}
import request from '@/utils/request'
export function get() {
return request({
url: 'api/qiNiuConfig',
method: 'get'
})
}
export function update(data) {
return request({
url: 'api/qiNiuConfig',
data,
method: 'put'
})
}
export function del(id) {
return request({
url: 'api/qiNiuContent/' + id,
method: 'delete'
})
}
export function download(id) {
return request({
url: 'api/qiNiuContent/download/' + id,
method: 'get'
})
}
export function sync() {
return request({
url: 'api/qiNiuContent/synchronize',
method: 'post'
})
}
export function delAll(ids) {
return request({
url: 'api/qiNiuContent/',
method: 'delete',
data: ids
})
}
import request from '@/utils/request'
export function add(data) {
return request({
url: 'api/redis',
method: 'post',
data
})
}
export function del(key) {
const data = {
key
}
return request({
url: 'api/redis/',
method: 'delete',
data
})
}
export function delAll() {
return request({
url: 'api/redis/all',
method: 'delete'
})
}
export function edit(data) {
return request({
url: 'api/redis',
method: 'put',
data
})
}
import request from '@/utils/request'
// 获取所有的Role
export function getAll() {
return request({
url: 'api/roles/all',
method: 'get'
})
}
export function add(data) {
return request({
url: 'api/roles',
method: 'post',
data
})
}
export function get(id) {
return request({
url: 'api/roles/' + id,
method: 'get'
})
}
export function getLevel() {
return request({
url: 'api/roles/level',
method: 'get'
})
}
export function del(id) {
return request({
url: 'api/roles/' + id,
method: 'delete'
})
}
export function edit(data) {
return request({
url: 'api/roles',
method: 'put',
data
})
}
export function editPermission(data) {
return request({
url: 'api/roles/permission',
method: 'put',
data
})
}
export function editMenu(data) {
return request({
url: 'api/roles/menu',
method: 'put',
data
})
}
import request from '@/utils/request'
export function add(data) {
return request({
url: 'api/sAttendance',
method: 'post',
data
})
}
export function del(id) {
return request({
url: 'api/sAttendance/' + id,
method: 'delete'
})
}
export function edit(data) {
return request({
url: 'api/sAttendance',
method: 'put',
data
})
}
export function queryAttendanceByDate(projectid) {
return request({
url: 'api/queryAttendanceByDate/' + projectid,
method: 'get'
})
}
import request from '@/utils/request'
export function add(data) {
return request({
url: 'api/sCrop',
method: 'post',
data
})
}
export function del(id) {
return request({
url: 'api/sCrop/' + id,
method: 'delete'
})
}
export function edit(data) {
return request({
url: 'api/sCrop',
method: 'put',
data
})
}
export function getSCropsNoPage() {
return request({
url: 'api/getSCropsNoPage',
method: 'get'
})
}
export function getSCropsNoPageByproid(projectid) {
return request({
url: 'api/getSCropsNoPageByproid/' + projectid,
method: 'get'
})
}
export function getAreachartdata(projectid) {
return request({
url: 'api/getAreachartdata/' + projectid,
method: 'get'
})
}
import request from '@/utils/request'
export function add(data) {
return request({
url: 'api/sData',
method: 'post',
data
})
}
export function del(id) {
return request({
url: 'api/sData/' + id,
method: 'delete'
})
}
export function edit(data) {
return request({
url: 'api/sData',
method: 'put',
data
})
}
export function getData(deviceid, item, starttime, endtime, params) {
return request({
url: 'api/getData',
method: 'post',
data: {
deviceid,
item,
starttime,
endtime
},
params
})
}
export function getIllData(deviceid, item, starttime, endtime, params) {
return request({
url: 'api/getIllData',
method: 'post',
data: {
deviceid,
item,
starttime,
endtime
},
params
})
}
export function exportExcel(deviceid, item, starttime, endtime) {
return request({
url: 'api/exportExcel',
method: 'post',
data: {
deviceid,
item,
starttime,
endtime
},
responseType: 'blob'
})
}
export function loadCDataByDeviceid(deviceid) {
return request({
url: 'api/loadCDataByDeviceid',
method: 'post',
data: {
deviceid
}
})
}
export function loadNowDataByDeviceid(deviceid) {
return request({
url: 'api/loadNowDataByDeviceid/' + deviceid,
method: 'get'
})
}
export function loadNowDataByUserid() {
return request({
url: 'api/loadNowDataByUserid',
method: 'get'
})
}
import request from '@/utils/request'
export function add(data) {
return request({
url: 'api/sDevice',
method: 'post',
data
})
}
export function del(id) {
return request({
url: 'api/sDevice/' + id,
method: 'delete'
})
}
export function edit(data) {
return request({
url: 'api/sDevice',
method: 'put',
data
})
}
export function bindingDevice(data) {
return request({
url: 'api/bindingDevice',
method: 'post',
data
})
}
export function weather1(data) {
return request({
url: 'api/weather',
method: 'post',
data
})
}
export function getWeather(data) {
return request({
url: 'api/weather',
method: 'post',
data: data
})
}
export function loaddevice(deptparam) {
return request({
url: 'api/loaddevice',
method: 'post',
data: {
deptparam
}
})
}
export function queryAllRelayByUseridNoPage() {
return request({
url: 'api/queryAllRelayByUseridNoPage',
method: 'post',
data: {
}
})
}
export function queryAllByUseridNoPage() {
return request({
url: 'api/queryAllByUseridNoPage',
method: 'post',
data: {
}
})
}
export function getOnOffCount() {
return request({
url: 'api/getOnOffCount',
method: 'post',
data: {
}
})
}
export function getDeviceByProjectid(projectid) {
return request({
url: 'api/getDeviceByProjectid/' + projectid,
method: 'get'
})
}
import request from '@/utils/request'
export function add(data) {
return request({
url: 'api/sDeviceLog',
method: 'post',
data
})
}
export function del(id) {
return request({
url: 'api/sDeviceLog/' + id,
method: 'delete'
})
}
export function edit(data) {
return request({
url: 'api/sDeviceLog',
method: 'put',
data
})
}
export function loadLogByDeviceid(data, params) {
return request({
url: 'api/loadLogByDeviceid',
method: 'post',
data,
params
})
}
import request from '@/utils/request'
import request5 from '@/utils/request5'
export function add(data) {
return request({
url: 'api/sDeviceWay',
method: 'post',
data
})
}
export function del(id) {
return request({
url: 'api/sDeviceWay/' + id,
method: 'delete'
})
}
export function deleteByDeviceid(deviceid) {
return request({
url: 'api/deleteByDeviceid/' + deviceid,
method: 'delete'
})
}
export function edit(data) {
return request({
url: 'api/sDeviceWay',
method: 'put',
data
})
}
export function loadByDeviceid(data) {
return request({
url: 'api/loadByDeviceid',
method: 'post',
data
})
}
export function loadTaskwayByDeviceid(relayid) {
return request({
url: 'api/loadTaskwayByDeviceid/' + relayid,
method: 'get'
})
}
export function controlWay(data) {
return request({
url: 'api/controlWay',
method: 'post',
data
})
}
export function sDeviceWayNoPage() {
return request({
url: 'api/sDeviceWayNoPage',
method: 'post'
})
}
export function loadRemoteCtrl(data) {
return request({
url: 'api/loadByDeviceid',
method: 'post',
data
})
}
export function getRemoteControl(param) {
return request5({
url: 'api/project/getProjectMachineVisitUrl',
method: 'post',
data: param
})
}
\ No newline at end of file
import request from '@/utils/request'
export function add(data) {
return request({
url: 'api/sDevicecLog',
method: 'post',
data
})
}
export function del(id) {
return request({
url: 'api/sDevicecLog/' + id,
method: 'delete'
})
}
export function edit(data) {
return request({
url: 'api/sDevicecLog',
method: 'put',
data
})
}
import request from '@/utils/request'
export function add(data) {
return request({
url: 'api/sDevicetype',
method: 'post',
data
})
}
export function del(id) {
return request({
url: 'api/sDevicetype/' + id,
method: 'delete'
})
}
export function edit(data) {
return request({
url: 'api/sDevicetype',
method: 'put',
data
})
}
export function addReviewDeviceType(data) {
return request({
url: 'api/sDevicetypeReview',
method: 'post',
data: {
deviceType: data
}
})
}
export function EditReviewDevice(data) {
return request({
url: 'api/sEditDevicetypeReview',
method: 'post',
data: {
data: data
}
})
}
export function getDevicetypeNopage() {
return request({
url: 'api/getDevicetypeNopage',
method: 'post'
})
}
import request from '@/utils/request'
export function add(data) {
return request({
url: 'api/sItem',
method: 'post',
data
})
}
export function del(id) {
return request({
url: 'api/sItem/' + id,
method: 'delete'
})
}
export function edit(data) {
return request({
url: 'api/sItem',
method: 'put',
data
})
}
export function selectAll() {
return request({
url: 'api/sAllItem',
method: 'get'
})
}
import request from '@/utils/request'
export function add(data) {
return request({
url: 'api/sPersonnel',
method: 'post',
data
})
}
export function del(id) {
return request({
url: 'api/sPersonnel/' + id,
method: 'delete'
})
}
export function edit(data) {
return request({
url: 'api/sPersonnel',
method: 'put',
data
})
}
import request from '@/utils/request'
export function add(data) {
return request({
url: 'api/sPlantingArea',
method: 'post',
data
})
}
export function del(id) {
return request({
url: 'api/sPlantingArea/' + id,
method: 'delete'
})
}
export function edit(data) {
return request({
url: 'api/sPlantingArea',
method: 'put',
data
})
}
import request from '@/utils/request'
export function add(data) {
return request({
url: 'api/sProject',
method: 'post',
data
})
}
export function addProject(data) {
return request({
url: 'api/sProject',
method: 'post',
data
})
}
export function del(id) {
return request({
url: 'api/sProject/' + id,
method: 'delete'
})
}
export function edit(data) {
return request({
url: 'api/sProject',
method: 'put',
data
})
}
export function findProjectByUserid() {
return request({
url: 'api/findProjectByUserid',
method: 'post'
})
}
export function getSProjectsNopage() {
return request({
url: 'api/getSProjectsNopage',
method: 'post'
})
}
import request from '@/utils/request'
export function add(data) {
return request({
url: 'api/sProjectDevice',
method: 'post',
data
})
}
export function del(id) {
return request({
url: 'api/sProjectDevice/' + id,
method: 'delete'
})
}
export function deleteByProjectidAndDeviceid(data) {
return request({
url: 'api/deleteByProjectidAndDeviceid',
method: 'post',
data
})
}
export function edit(data) {
return request({
url: 'api/sProjectDevice',
method: 'put',
data
})
}
import request from '@/utils/request'
export function add(data) {
return request({
url: 'api/sProjectUser',
method: 'post',
data
})
}
export function del(id) {
return request({
url: 'api/sProjectUser/' + id,
method: 'delete'
})
}
export function edit(data) {
return request({
url: 'api/sProjectUser',
method: 'put',
data
})
}
import request from '@/utils/request'
export function add(data) {
return request({
url: 'api/sSysmanage',
method: 'post',
data
})
}
export function del(id) {
return request({
url: 'api/sSysmanage/' + id,
method: 'delete'
})
}
export function edit(data) {
return request({
url: 'api/sSysmanage',
method: 'put',
data
})
}
export function loadSysByUserid() {
return request({
url: 'api/loadSysByUserid',
method: 'post'
})
}
import request from '@/utils/request'
export function add(sTask, taskways) {
return request({
url: 'api/sTask',
method: 'post',
data: {
sTask,
taskways
}
})
}
export function del(id) {
return request({
url: 'api/sTask/' + id,
method: 'delete'
})
}
export function edit(sTask, taskways) {
return request({
url: 'api/sTask',
method: 'put',
data: {
sTask,
taskways
}
})
}
export function updateIsPause(id) {
return request({
url: 'api/updateIsPause/' + id,
method: 'put'
})
}
export function execution(id) {
return request({
url: 'api/execution/' + id,
method: 'put'
})
}
export function sTaskNoPage() {
return request({
url: 'api/sTaskNoPage',
method: 'post',
data: {
}
})
}
import request from '@/utils/request'
export function add(data) {
return request({
url: 'api/sTaskLog',
method: 'post',
data
})
}
export function del(id) {
return request({
url: 'api/sTaskLog/' + id,
method: 'delete'
})
}
export function edit(data) {
return request({
url: 'api/sTaskLog',
method: 'put',
data
})
}
import request from '@/utils/request'
export function add(data) {
return request({
url: 'api/sTaskWay',
method: 'post',
data
})
}
export function del(id) {
return request({
url: 'api/sTaskWay/' + id,
method: 'delete'
})
}
export function edit(data) {
return request({
url: 'api/sTaskWay',
method: 'put',
data
})
}
export function loadByTaskid(id) {
return request({
url: 'api/loadByTaskid/',
method: 'post',
data: {
taskid: id
}
})
}
import request from '@/utils/request'
export function add(sWarn, warnwaysmin, warnwaysmax) {
return request({
url: 'api/sWarn',
method: 'post',
data: {
sWarn,
warnwaysmin,
warnwaysmax
}
})
}
export function del(id) {
return request({
url: 'api/sWarn/' + id,
method: 'delete'
})
}
export function edit(sWarn, warnwaysmin, warnwaysmax) {
return request({
url: 'api/sWarn',
method: 'put',
data: {
sWarn,
warnwaysmin,
warnwaysmax
}
})
}
export function sWarnAll() {
return request({
url: 'api/sWarnNoPage',
method: 'get'
})
}
import request from '@/utils/request'
export function add(data) {
return request({
url: 'api/sWarnLog',
method: 'post',
data
})
}
export function del(id) {
return request({
url: 'api/sWarnLog/' + id,
method: 'delete'
})
}
export function edit(data) {
return request({
url: 'api/sWarnLog',
method: 'put',
data
})
}
import request from '@/utils/request'
export function add(data) {
return request({
url: 'api/sWarnWay',
method: 'post',
data
})
}
export function del(id) {
return request({
url: 'api/sWarnWay/' + id,
method: 'delete'
})
}
export function edit(data) {
return request({
url: 'api/sWarnWay',
method: 'put',
data
})
}
export function loadByWarnidAndFlag(id, flag) {
return request({
url: 'api/loadByWarnidAndFlag/',
method: 'post',
data: {
warnid: id,
flag: flag
}
})
}
import request from '@/utils/request'
export function add(data) {
return request({
url: 'api/sWarnmsg',
method: 'post',
data
})
}
export function del(id) {
return request({
url: 'api/sWarnmsg/' + id,
method: 'delete'
})
}
export function edit(data) {
return request({
url: 'api/sWarnmsg',
method: 'put',
data
})
}
export function getWarnmsgCount() {
return request({
url: 'api/getWarnmsgCount',
method: 'get'
})
}
export function getWarnmsgCountByUserid() {
return request({
url: 'api/getWarnmsgCountByUserid',
method: 'get'
})
}
import request6 from '@/utils/request6'
var reqApi = function(){
return ({
sfytLogin:function(param){
return request6({
url: 'api/configure',
method: 'post',
params:param
})
},
sfytDiv:function(param){
return request6({
url: 'api/valve',
method: 'post',
params:param
})
},
sfytEdit:function(param){
return request6({
url: 'api/update',
method: 'post',
params:param
})
},
sfytUpdate:function(param){
return request6({
url: 'api/updatebase',
method: 'post',
params:param
})
},
sfytDel:function(param){
return request6({
url: 'api/delete',
method: 'get',
params:param
})
},
sfytOnline:function(param){
return request6({
url: 'api/operation',
method: 'post',
params:param
})
},
sfytHis:function(param){
return request6({
url: 'api/record',
method: 'post',
params:param
})
},
sfytReset:function(param){
return request6({
url: 'api/reset',
method: 'get',
params:param
})
},
aiAdd:function(data){
return request6({
url: 'api/autoNew',
method: 'post',
data,
})
},
aiShow:function(param){
return request6({
url: 'api/autoQuery',
method: 'post',
params:param
})
},
aiDel:function(param){
return request6({
url: 'api/deteleAuto',
method: 'get',
params:param
})
},
aiEdit:function(data){
return request6({
url: 'api/updateAuto',
method: 'post',
data
})
},
aiEditTab:function(param){
return request6({
url: 'api/updateQuery',
method: 'get',
params:param
})
},
aiopRecord:function(param){
return request6({
url: 'api/opRecord',
method: 'post',
params:param
})
},
aiSearch:function(param){
return request6({
url: 'api/search',
method: 'post',
params:param
})
},
})
}
export var reqApi = reqApi();
import request from '@/utils/request';
import axios from 'axios';
export function queryAllByUseridNoPage() {
return request({
url: 'api/queryAllByUseridNoPage',
method: 'post',
data: {
}
})
}
export function getByUserid(params) {
return request({
url: 'api/getSProjectsByUserid',
method: 'get',
params
})
}
export function getByProjectId(id) {
return request({
url: 'api/getDeviceByProjectid/' + id,
method: 'get'
})
}
export function getDeviceIdByProName(params) {
return request({
url: 'api/getDeviceIdByProName/',
method: 'get',
params
})
}
export function getDeviceDataById(id) {
return request({
url: 'api/loadNowDataByDeviceid/' + id,
method: 'get'
})
}
export function sAllItem(id) {
return request({
url: 'api/sAllItem',
method: 'get'
})
}
export function get24HoursData(id) {
return request({
url: 'api/loadCDataByDeviceid',
method: 'post',
data: {
deviceid:id
}
})
}
export function getContrlorList(id) {
return request({
url: 'api/loadByDeviceid',
method: 'post',
data: {
deviceid:id
}
})
}
export function getData2(data) {
return request({
url: 'api/getData2',
method: 'post',
data:data
})
}
/* export function getWeather(params) {
return axios.get('weather', {
params: params
})
} */
export function controlWay(data) {
return request({
url: 'api/controlWay',
method: 'post',
data
})
}
\ No newline at end of file
import request from '@/utils/request'
export function add(data) {
return request({
url: 'api/jobs',
method: 'post',
data
})
}
export function del(id) {
return request({
url: 'api/jobs/' + id,
method: 'delete'
})
}
export function edit(data) {
return request({
url: 'api/jobs',
method: 'put',
data
})
}
export function updateIsPause(id) {
return request({
url: 'api/jobs/' + id,
method: 'put'
})
}
export function execution(id) {
return request({
url: 'api/jobs/exec/' + id,
method: 'put'
})
}
import request from '@/utils/request'
export function getTitle() {
return request({
url: 'api/mename',
method: 'get'
})
}
export function updateTitle(data) {
return request({
url: 'api/mename',
method: 'put',
data
})
}
\ No newline at end of file
import request from '@/utils/request'
export function add(data) {
return request({
url: 'api/users',
method: 'post',
data
})
}
export function downloadUser() {
return request({
url: 'api/users/download',
method: 'get',
responseType: 'blob'
})
}
export function del(id) {
return request({
url: 'api/users/' + id,
method: 'delete'
})
}
export function edit(data) {
return request({
url: 'api/users',
method: 'put',
data
})
}
export function updatePass(user) {
const data = {
oldPass: user.oldPass,
newPass: user.newPass
}
return request({
url: 'api/users/updatePass/',
method: 'post',
data
})
}
export function updateEmail(code, data) {
return request({
url: 'api/users/updateEmail/' + code,
method: 'post',
data
})
}
import request from '@/utils/request'
export function count() {
return request({
url: 'api/visits',
method: 'post'
})
}
export function get() {
return request({
url: 'api/visits',
method: 'get'
})
}
export function getChartData() {
return request({
url: 'api/visits/chartData',
method: 'get'
})
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment