askin 2 years ago
parent
commit
26f5cb70bd
56 changed files with 5533 additions and 29882 deletions
  1. 0 12
      sources/client/vrv-platform/.babelrc
  2. 2 0
      sources/client/vrv-platform/.browserslistrc
  3. 0 9
      sources/client/vrv-platform/.editorconfig
  4. 17 0
      sources/client/vrv-platform/.eslintrc.js
  5. 9 2
      sources/client/vrv-platform/.gitignore
  6. 0 10
      sources/client/vrv-platform/.postcssrc.js
  7. 22 14
      sources/client/vrv-platform/README.md
  8. 5 0
      sources/client/vrv-platform/babel.config.js
  9. 0 41
      sources/client/vrv-platform/build/build.js
  10. 0 54
      sources/client/vrv-platform/build/check-versions.js
  11. BIN
      sources/client/vrv-platform/build/logo.png
  12. 0 101
      sources/client/vrv-platform/build/utils.js
  13. 0 22
      sources/client/vrv-platform/build/vue-loader.conf.js
  14. 0 82
      sources/client/vrv-platform/build/webpack.base.conf.js
  15. 0 95
      sources/client/vrv-platform/build/webpack.dev.conf.js
  16. 0 145
      sources/client/vrv-platform/build/webpack.prod.conf.js
  17. 0 7
      sources/client/vrv-platform/config/dev.env.js
  18. 0 69
      sources/client/vrv-platform/config/index.js
  19. 0 4
      sources/client/vrv-platform/config/prod.env.js
  20. 0 12
      sources/client/vrv-platform/index.html
  21. 0 26009
      sources/client/vrv-platform/package-lock.json
  22. 31 55
      sources/client/vrv-platform/package.json
  23. 5 0
      sources/client/vrv-platform/postcss.config.js
  24. BIN
      sources/client/vrv-platform/public/favicon.ico
  25. 17 0
      sources/client/vrv-platform/public/index.html
  26. 12 16
      sources/client/vrv-platform/src/App.vue
  27. 0 0
      sources/client/vrv-platform/src/assets/.gitignore
  28. BIN
      sources/client/vrv-platform/src/assets/cloudgo_logo.png
  29. BIN
      sources/client/vrv-platform/src/assets/login_bg.png
  30. BIN
      sources/client/vrv-platform/src/assets/logo.png
  31. BIN
      sources/client/vrv-platform/src/assets/logo_banner.jpg
  32. 0 0
      sources/client/vrv-platform/src/components/.gitignore
  33. 0 113
      sources/client/vrv-platform/src/components/HelloWorld.vue
  34. 111 111
      sources/client/vrv-platform/src/config/api.js
  35. 171 16
      sources/client/vrv-platform/src/main.js
  36. 73 149
      sources/client/vrv-platform/src/router/index.js
  37. 16 0
      sources/client/vrv-platform/src/store.js
  38. 94 0
      sources/client/vrv-platform/src/util/utils.js
  39. 0 0
      sources/client/vrv-platform/src/views/.gitignore
  40. 13 7
      sources/client/vrv-platform/src/views/device/list.vue
  41. 17 11
      sources/client/vrv-platform/src/views/deviceAlarmRecord/list.vue
  42. 16 8
      sources/client/vrv-platform/src/views/gateway/list.vue
  43. 0 3
      sources/client/vrv-platform/src/views/home/home.vue
  44. 285 91
      sources/client/vrv-platform/src/views/login/login.vue
  45. 36 51
      sources/client/vrv-platform/src/views/menu/menu.vue
  46. 17 10
      sources/client/vrv-platform/src/views/operator/list.vue
  47. 15 8
      sources/client/vrv-platform/src/views/operatorLog/list.vue
  48. 13 7
      sources/client/vrv-platform/src/views/powerSet/list.vue
  49. 107 89
      sources/client/vrv-platform/src/views/project/project.vue
  50. 13 7
      sources/client/vrv-platform/src/views/roleSet/list.vue
  51. 11 6
      sources/client/vrv-platform/src/views/user/list.vue
  52. 21 0
      sources/client/vrv-platform/vue.config.js
  53. 4369 2430
      sources/client/vrv-platform/yarn.lock
  54. 4 0
      sources/server/vrv/vrv-core-service/src/main/java/com/kuyuntech/vrv/coreservice/service/core/impl/ProjectServiceImpl.java
  55. 6 2
      sources/server/vrv/vrv-platform/src/main/java/com/kuyuntech/vrv/platform/controller/auth/AuthController.java
  56. 5 4
      sources/server/vrv/vrv-platform/src/main/resources/application-dev.properties

+ 0 - 12
sources/client/vrv-platform/.babelrc

@@ -1,12 +0,0 @@
-{
-  "presets": [
-    ["env", {
-      "modules": false,
-      "targets": {
-        "browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
-      }
-    }],
-    "stage-2"
-  ],
-  "plugins": ["transform-vue-jsx", "transform-runtime"]
-}

+ 2 - 0
sources/client/vrv-platform/.browserslistrc

@@ -0,0 +1,2 @@
+> 1%
+last 2 versions

+ 0 - 9
sources/client/vrv-platform/.editorconfig

@@ -1,9 +0,0 @@
-root = true
-
-[*]
-charset = utf-8
-indent_style = space
-indent_size = 2
-end_of_line = lf
-insert_final_newline = true
-trim_trailing_whitespace = true

+ 17 - 0
sources/client/vrv-platform/.eslintrc.js

@@ -0,0 +1,17 @@
+module.exports = {
+  root: true,
+  env: {
+    node: true
+  },
+  'extends': [
+    'plugin:vue/essential',
+    'eslint:recommended'
+  ],
+  rules: {
+    'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
+    'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
+  },
+  parserOptions: {
+    parser: 'babel-eslint'
+  }
+}

+ 9 - 2
sources/client/vrv-platform/.gitignore

@@ -1,6 +1,12 @@
 .DS_Store
-node_modules/
-/dist/
+node_modules
+/dist
+
+# local env files
+.env.local
+.env.*.local
+
+# Log files
 npm-debug.log*
 yarn-debug.log*
 yarn-error.log*
@@ -12,3 +18,4 @@ yarn-error.log*
 *.ntvs*
 *.njsproj
 *.sln
+*.sw?

+ 0 - 10
sources/client/vrv-platform/.postcssrc.js

@@ -1,10 +0,0 @@
-// 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": {}
-  }
-}

+ 22 - 14
sources/client/vrv-platform/README.md

@@ -1,21 +1,29 @@
-# demo_project
+# gov-scafe-platform
 
-> A Vue.js project
-
-## Build Setup
+## Project setup
+```
+yarn install
+```
 
-``` bash
-# install dependencies
-npm install
+### Compiles and hot-reloads for development
+```
+yarn run serve
+```
 
-# serve with hot reload at localhost:8080
-npm run dev
+### Compiles and minifies for production
+```
+yarn run build
+```
 
-# build for production with minification
-npm run build
+### Run your tests
+```
+yarn run test
+```
 
-# build for production and view the bundle analyzer report
-npm run build --report
+### Lints and fixes files
+```
+yarn run lint
 ```
 
-For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).
+### Customize configuration
+See [Configuration Reference](https://cli.vuejs.org/config/).

+ 5 - 0
sources/client/vrv-platform/babel.config.js

@@ -0,0 +1,5 @@
+module.exports = {
+  presets: [
+    '@vue/app'
+  ]
+}

+ 0 - 41
sources/client/vrv-platform/build/build.js

@@ -1,41 +0,0 @@
-'use strict'
-require('./check-versions')()
-
-process.env.NODE_ENV = 'production'
-
-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')
-
-const spinner = ora('building for production...')
-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, // If you are using ts-loader, setting this to true will make TypeScript errors show up during build.
-      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'
-    ))
-  })
-})

+ 0 - 54
sources/client/vrv-platform/build/check-versions.js

@@ -1,54 +0,0 @@
-'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:'))
-    console.log()
-
-    for (let i = 0; i < warnings.length; i++) {
-      const warning = warnings[i]
-      console.log('  ' + warning)
-    }
-
-    console.log()
-    process.exit(1)
-  }
-}

BIN
sources/client/vrv-platform/build/logo.png


+ 0 - 101
sources/client/vrv-platform/build/utils.js

@@ -1,101 +0,0 @@
-'use strict'
-const path = require('path')
-const config = require('../config')
-const ExtractTextPlugin = require('extract-text-webpack-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 = options.usePostCSS ? [cssLoader, postcssLoader] : [cssLoader]
-
-    if (loader) {
-      loaders.push({
-        loader: loader + '-loader',
-        options: Object.assign({}, loaderOptions, {
-          sourceMap: options.sourceMap
-        })
-      })
-    }
-
-    // Extract CSS when that option is specified
-    // (which is the case during production build)
-    if (options.extract) {
-      return ExtractTextPlugin.extract({
-        use: loaders,
-        fallback: 'vue-style-loader'
-      })
-    } else {
-      return ['vue-style-loader'].concat(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')
-    })
-  }
-}

+ 0 - 22
sources/client/vrv-platform/build/vue-loader.conf.js

@@ -1,22 +0,0 @@
-'use strict'
-const utils = require('./utils')
-const config = require('../config')
-const isProduction = process.env.NODE_ENV === 'production'
-const sourceMapEnabled = isProduction
-  ? config.build.productionSourceMap
-  : config.dev.cssSourceMap
-
-module.exports = {
-  loaders: utils.cssLoaders({
-    sourceMap: sourceMapEnabled,
-    extract: isProduction
-  }),
-  cssSourceMap: sourceMapEnabled,
-  cacheBusting: config.dev.cacheBusting,
-  transformToRequire: {
-    video: ['src', 'poster'],
-    source: 'src',
-    img: 'src',
-    image: 'xlink:href'
-  }
-}

+ 0 - 82
sources/client/vrv-platform/build/webpack.base.conf.js

@@ -1,82 +0,0 @@
-'use strict'
-const path = require('path')
-const utils = require('./utils')
-const config = require('../config')
-const vueLoaderConfig = require('./vue-loader.conf')
-
-function resolve (dir) {
-  return path.join(__dirname, '..', dir)
-}
-
-
-
-module.exports = {
-  context: path.resolve(__dirname, '../'),
-  entry: {
-    app: './src/main.js'
-  },
-  output: {
-    path: config.build.assetsRoot,
-    filename: '[name].js',
-    publicPath: process.env.NODE_ENV === 'production'
-      ? config.build.assetsPublicPath
-      : config.dev.assetsPublicPath
-  },
-  resolve: {
-    extensions: ['.js', '.vue', '.json'],
-    alias: {
-      'vue$': 'vue/dist/vue.esm.js',
-      '@': resolve('src'),
-    }
-  },
-  module: {
-    rules: [
-      {
-        test: /\.vue$/,
-        loader: 'vue-loader',
-        options: vueLoaderConfig
-      },
-      {
-        test: /\.js$/,
-        loader: 'babel-loader',
-        include: [resolve('src'), resolve('test'), resolve('node_modules/webpack-dev-server/client')]
-      },
-      {
-        test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
-        loader: 'url-loader',
-        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]')
-        }
-      }
-    ]
-  },
-  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'
-  }
-}

+ 0 - 95
sources/client/vrv-platform/build/webpack.dev.conf.js

@@ -1,95 +0,0 @@
-'use strict'
-const utils = require('./utils')
-const webpack = require('webpack')
-const config = require('../config')
-const merge = require('webpack-merge')
-const path = require('path')
-const baseWebpackConfig = require('./webpack.base.conf')
-const CopyWebpackPlugin = require('copy-webpack-plugin')
-const HtmlWebpackPlugin = require('html-webpack-plugin')
-const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin')
-const portfinder = require('portfinder')
-
-const HOST = process.env.HOST
-const PORT = process.env.PORT && Number(process.env.PORT)
-
-const devWebpackConfig = merge(baseWebpackConfig, {
-  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: {
-      rewrites: [
-        { from: /.*/, to: path.posix.join(config.dev.assetsPublicPath, 'index.html') },
-      ],
-    },
-    hot: true,
-    contentBase: false, // since we use CopyWebpackPlugin.
-    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(),
-    new webpack.NamedModulesPlugin(), // HMR shows correct file names in console on update.
-    new webpack.NoEmitOnErrorsPlugin(),
-    // https://github.com/ampedandwired/html-webpack-plugin
-    new HtmlWebpackPlugin({
-      filename: 'index.html',
-      template: 'index.html',
-      inject: true
-    }),
-    // copy custom static assets
-    new CopyWebpackPlugin([
-      {
-        from: path.resolve(__dirname, '../static'),
-        to: config.dev.assetsSubDirectory,
-        ignore: ['.*']
-      }
-    ])
-  ]
-})
-
-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)
-    }
-  })
-})

+ 0 - 145
sources/client/vrv-platform/build/webpack.prod.conf.js

@@ -1,145 +0,0 @@
-'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 ExtractTextPlugin = require('extract-text-webpack-plugin')
-const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin')
-const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
-
-const env = require('../config/prod.env')
-
-const webpackConfig = merge(baseWebpackConfig, {
-  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].js'),
-    chunkFilename: utils.assetsPath('js/[id].[chunkhash].js')
-  },
-  plugins: [
-    // http://vuejs.github.io/vue-loader/en/workflow/production.html
-    new webpack.DefinePlugin({
-      'process.env': env
-    }),
-    new UglifyJsPlugin({
-      uglifyOptions: {
-        compress: {
-          warnings: false
-        }
-      },
-      sourceMap: config.build.productionSourceMap,
-      parallel: true
-    }),
-    // extract css into its own file
-    new ExtractTextPlugin({
-      filename: utils.assetsPath('css/[name].[contenthash].css'),
-      // Setting the following option to `false` will not extract CSS from codesplit chunks.
-      // Their CSS will instead be inserted dynamically with style-loader when the codesplit chunk has been loaded by webpack.
-      // It's currently set to `true` because we are seeing that sourcemaps are included in the codesplit bundle as well when it's `false`, 
-      // increasing file size: https://github.com/vuejs-templates/webpack/issues/1110
-      allChunks: true,
-    }),
-    // Compress extracted CSS. We are using this plugin so that possible
-    // duplicated CSS from different components can be deduped.
-    new OptimizeCSSPlugin({
-      cssProcessorOptions: config.build.productionSourceMap
-        ? { safe: true, map: { inline: false } }
-        : { safe: true }
-    }),
-    // 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,
-      minify: {
-        removeComments: true,
-        collapseWhitespace: true,
-        removeAttributeQuotes: true
-        // more options:
-        // https://github.com/kangax/html-minifier#options-quick-reference
-      },
-      // necessary to consistently work with multiple chunks via CommonsChunkPlugin
-      chunksSortMode: 'dependency'
-    }),
-    // keep module.id stable when vendor modules does not change
-    new webpack.HashedModuleIdsPlugin(),
-    // enable scope hoisting
-    new webpack.optimize.ModuleConcatenationPlugin(),
-    // split vendor js into its own file
-    new webpack.optimize.CommonsChunkPlugin({
-      name: 'vendor',
-      minChunks (module) {
-        // any required modules inside node_modules are extracted to vendor
-        return (
-          module.resource &&
-          /\.js$/.test(module.resource) &&
-          module.resource.indexOf(
-            path.join(__dirname, '../node_modules')
-          ) === 0
-        )
-      }
-    }),
-    // extract webpack runtime and module manifest to its own file in order to
-    // prevent vendor hash from being updated whenever app bundle is updated
-    new webpack.optimize.CommonsChunkPlugin({
-      name: 'manifest',
-      minChunks: Infinity
-    }),
-    // This instance extracts shared chunks from code splitted chunks and bundles them
-    // in a separate chunk, similar to the vendor chunk
-    // see: https://webpack.js.org/plugins/commons-chunk-plugin/#extra-async-commons-chunk
-    new webpack.optimize.CommonsChunkPlugin({
-      name: 'app',
-      async: 'vendor-async',
-      children: true,
-      minChunks: 3
-    }),
-
-    // copy custom static assets
-    new CopyWebpackPlugin([
-      {
-        from: path.resolve(__dirname, '../static'),
-        to: config.build.assetsSubDirectory,
-        ignore: ['.*']
-      }
-    ])
-  ]
-})
-
-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.bundleAnalyzerReport) {
-  const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
-  webpackConfig.plugins.push(new BundleAnalyzerPlugin())
-}
-
-module.exports = webpackConfig

+ 0 - 7
sources/client/vrv-platform/config/dev.env.js

@@ -1,7 +0,0 @@
-'use strict'
-const merge = require('webpack-merge')
-const prodEnv = require('./prod.env')
-
-module.exports = merge(prodEnv, {
-  NODE_ENV: '"development"'
-})

+ 0 - 69
sources/client/vrv-platform/config/index.js

@@ -1,69 +0,0 @@
-'use strict'
-// Template version: 1.3.1
-// see http://vuejs-templates.github.io/webpack for documentation.
-
-const path = require('path')
-
-module.exports = {
-  dev: {
-
-    // Paths
-    assetsSubDirectory: 'static',
-    assetsPublicPath: '/',
-    proxyTable: {},
-
-    // Various Dev Server settings
-    host: 'localhost', // can be overwritten by process.env.HOST
-    port: 8081, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
-    autoOpenBrowser: false,
-    errorOverlay: true,
-    notifyOnErrors: true,
-    poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
-
-
-    /**
-     * Source Maps
-     */
-
-    // https://webpack.js.org/configuration/devtool/#development
-    devtool: 'cheap-module-eval-source-map',
-
-    // If you have problems debugging vue-files in devtools,
-    // set this to false - it *may* help
-    // https://vue-loader.vuejs.org/en/options.html#cachebusting
-    cacheBusting: true,
-
-    cssSourceMap: true
-  },
-
-  build: {
-    // Template for index.html
-    index: path.resolve(__dirname, '../dist/index.html'),
-
-    // Paths
-    assetsRoot: path.resolve(__dirname, '../dist'),
-    assetsSubDirectory: 'static',
-    assetsPublicPath: '/',
-
-    /**
-     * Source Maps
-     */
-
-    productionSourceMap: true,
-    // 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
-  }
-}

+ 0 - 4
sources/client/vrv-platform/config/prod.env.js

@@ -1,4 +0,0 @@
-'use strict'
-module.exports = {
-  NODE_ENV: '"production"'
-}

+ 0 - 12
sources/client/vrv-platform/index.html

@@ -1,12 +0,0 @@
-<!DOCTYPE html>
-<html>
-  <head>
-    <meta charset="utf-8">
-    <meta name="viewport" content="width=device-width,initial-scale=1.0">
-    <title>demo_project</title>
-  </head>
-  <body>
-    <div id="app"></div>
-    <!-- built files will be auto injected -->
-  </body>
-</html>

File diff suppressed because it is too large
+ 0 - 26009
sources/client/vrv-platform/package-lock.json


+ 31 - 55
sources/client/vrv-platform/package.json

@@ -1,64 +1,40 @@
 {
   "name": "vrv-platform",
-  "version": "1.0.0",
-  "description": "A Vue.js project",
-  "author": "askin <1762896524@qq.com>",
+  "version": "0.1.0",
   "private": true,
   "scripts": {
-    "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
-    "start": "npm run dev",
-    "build": "node build/build.js"
+    "serve": "vue-cli-service serve",
+    "build": "vue-cli-service build",
+    "lint": "vue-cli-service lint"
   },
   "dependencies": {
-    "axios": "^0.27.2",
-    "element-ui": "^2.15.9",
-    "vue": "^2.5.2",
-    "vue-router": "^3.0.1"
+    "ace-builds": "^1.4.5",
+    "axios": "^0.19.0",
+    "core-js": "^2.6.5",
+    "echarts": "^4.2.1",
+    "element-ui": "^2.12.0",
+    "lodash": "^4.17.15",
+    "moment": "^2.24.0",
+    "mqtt": "^3.0.0",
+    "numeral": "^2.0.6",
+    "qs": "^6.7.0",
+    "vue": "^2.6.10",
+    "vue-codemirror": "^4.0.6",
+    "vue-echarts": "^4.0.3",
+    "vue-quill-editor": "^3.0.6",
+    "vue-router": "^3.0.3",
+    "vuex": "^3.0.1",
+    "wangeditor": "^3.1.1"
   },
   "devDependencies": {
-    "autoprefixer": "^7.1.2",
-    "babel-core": "^6.22.1",
-    "babel-helper-vue-jsx-merge-props": "^2.0.3",
-    "babel-loader": "^7.1.1",
-    "babel-plugin-syntax-jsx": "^6.18.0",
-    "babel-plugin-transform-runtime": "^6.22.0",
-    "babel-plugin-transform-vue-jsx": "^3.5.0",
-    "babel-preset-env": "^1.3.2",
-    "babel-preset-stage-2": "^6.22.0",
-    "chalk": "^2.0.1",
-    "copy-webpack-plugin": "^4.0.1",
-    "css-loader": "^0.28.0",
-    "extract-text-webpack-plugin": "^3.0.0",
-    "file-loader": "^1.1.4",
-    "friendly-errors-webpack-plugin": "^1.6.1",
-    "html-webpack-plugin": "^2.30.1",
-    "node-notifier": "^5.1.2",
-    "optimize-css-assets-webpack-plugin": "^3.2.0",
-    "ora": "^1.2.0",
-    "portfinder": "^1.0.13",
-    "postcss-import": "^11.0.0",
-    "postcss-loader": "^2.0.8",
-    "postcss-url": "^7.2.1",
-    "rimraf": "^2.6.0",
-    "semver": "^5.3.0",
-    "shelljs": "^0.7.6",
-    "uglifyjs-webpack-plugin": "^1.1.1",
-    "url-loader": "^0.5.8",
-    "vue-loader": "^13.3.0",
-    "vue-style-loader": "^3.0.1",
-    "vue-template-compiler": "^2.5.2",
-    "webpack": "^3.6.0",
-    "webpack-bundle-analyzer": "^2.9.0",
-    "webpack-dev-server": "^2.9.1",
-    "webpack-merge": "^4.1.0"
-  },
-  "engines": {
-    "node": ">= 6.0.0",
-    "npm": ">= 3.0.0"
-  },
-  "browserslist": [
-    "> 1%",
-    "last 2 versions",
-    "not ie <= 8"
-  ]
+    "@vue/cli-plugin-babel": "^3.8.0",
+    "@vue/cli-plugin-eslint": "^3.8.0",
+    "@vue/cli-service": "^3.8.0",
+    "babel-eslint": "^10.0.1",
+    "eslint": "^5.16.0",
+    "eslint-plugin-vue": "^5.0.0",
+    "sass": "^1.18.0",
+    "sass-loader": "^7.1.0",
+    "vue-template-compiler": "^2.6.10"
+  }
 }

+ 5 - 0
sources/client/vrv-platform/postcss.config.js

@@ -0,0 +1,5 @@
+module.exports = {
+  plugins: {
+    autoprefixer: {}
+  }
+}

BIN
sources/client/vrv-platform/public/favicon.ico


+ 17 - 0
sources/client/vrv-platform/public/index.html

@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta name="viewport" content="width=device-width,initial-scale=1.0">
+<!--    <link rel="icon" href="<%= BASE_URL %>favicon.ico">-->
+    <title>系统正在加载中....</title>
+  </head>
+  <body>
+    <noscript>
+      <strong>We're sorry but cloudgo-acs-platform doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
+    </noscript>
+    <div id="app"></div>
+    <!-- built files will be auto injected -->
+  </body>
+</html>

+ 12 - 16
sources/client/vrv-platform/src/App.vue

@@ -1,24 +1,20 @@
 <template>
   <div id="app">
-    <router-view/>
+    <transition name="el-fade-in-linear">
+      <router-view/>
+    </transition>
   </div>
 </template>
 
-<script>
+<style lang="scss">
 
-export default {
-  name: 'App'
-}
-</script>
+  * {
+    font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
+  }
 
-<style>
-#app {
-  font-family: 'Avenir', Helvetica, Arial, sans-serif;
-  -webkit-font-smoothing: antialiased;
-  -moz-osx-font-smoothing: grayscale;
-  text-align: center;
-  text-align: left;
-  color: #2c3e50;
-  margin-top: 60px;
-}
+  html, body, #app {
+    height: 100%;
+    position: relative;
+    overflow: hidden;
+  }
 </style>

sources/client/vrv-platform/static/.gitkeep → sources/client/vrv-platform/src/assets/.gitignore


BIN
sources/client/vrv-platform/src/assets/cloudgo_logo.png


BIN
sources/client/vrv-platform/src/assets/login_bg.png


BIN
sources/client/vrv-platform/src/assets/logo.png


BIN
sources/client/vrv-platform/src/assets/logo_banner.jpg


+ 0 - 0
sources/client/vrv-platform/src/components/.gitignore


+ 0 - 113
sources/client/vrv-platform/src/components/HelloWorld.vue

@@ -1,113 +0,0 @@
-<template>
-  <div class="hello">
-    <h1>{{ msg }}</h1>
-    <h2>Essential Links</h2>
-    <ul>
-      <li>
-        <a
-          href="https://vuejs.org"
-          target="_blank"
-        >
-          Core Docs
-        </a>
-      </li>
-      <li>
-        <a
-          href="https://forum.vuejs.org"
-          target="_blank"
-        >
-          Forum
-        </a>
-      </li>
-      <li>
-        <a
-          href="https://chat.vuejs.org"
-          target="_blank"
-        >
-          Community Chat
-        </a>
-      </li>
-      <li>
-        <a
-          href="https://twitter.com/vuejs"
-          target="_blank"
-        >
-          Twitter
-        </a>
-      </li>
-      <br>
-      <li>
-        <a
-          href="http://vuejs-templates.github.io/webpack/"
-          target="_blank"
-        >
-          Docs for This Template
-        </a>
-      </li>
-    </ul>
-    <h2>Ecosystem</h2>
-    <ul>
-      <li>
-        <a
-          href="http://router.vuejs.org/"
-          target="_blank"
-        >
-          vue-router
-        </a>
-      </li>
-      <li>
-        <a
-          href="http://vuex.vuejs.org/"
-          target="_blank"
-        >
-          vuex
-        </a>
-      </li>
-      <li>
-        <a
-          href="http://vue-loader.vuejs.org/"
-          target="_blank"
-        >
-          vue-loader
-        </a>
-      </li>
-      <li>
-        <a
-          href="https://github.com/vuejs/awesome-vue"
-          target="_blank"
-        >
-          awesome-vue
-        </a>
-      </li>
-    </ul>
-  </div>
-</template>
-
-<script>
-export default {
-  name: 'HelloWorld',
-  data () {
-    return {
-      msg: 'Welcome to Your Vue.js App'
-    }
-  }
-}
-</script>
-
-<!-- Add "scoped" attribute to limit CSS to this component only -->
-<style scoped>
-h1, h2 {
-  font-weight: normal;
-}
-ul {
-  list-style-type: none;
-  padding: 0;
-}
-li {
-  display: inline-block;
-  margin: 0 10px;
-}
-a {
-  color: #42b983;
-}
-</style>

+ 111 - 111
sources/client/vrv-platform/src/config/api.js

@@ -3,120 +3,120 @@ const root = "http://127.0.0.1:8088";
 
 //接口auth
 const api = {
-    user: {
-      list: `${root}/user/list`,
-      add: `${root}/user/add`,
-      update: `${root}/user/update`,
-      detail: `${root}/user/detail`,
-      delete: `${root}/user/delete`,
-      batchDelete: `${root}/user/batchDelete`,
-      bindRole: `${root}/user/bindRole`,
-      bindOperator: `${root}/user/bindOperator`,
-    },
-    operator: {
-      list: `${root}/operator/list`,
-      add: `${root}/operator/add`,
-      update: `${root}/operator/update`,
-      detail: `${root}/operator/detail`,
-      delete: `${root}/operator/delete`,
-      batchDelete: `${root}/operator/batchDelete`
-    },
-    project: {
-      list: `${root}/project/list`,
-      add: `${root}/project/add`,
-      update: `${root}/project/update`,
-      detail: `${root}/project/detail`,
-      delete: `${root}/project/delete`,
-      batchDelete: `${root}/project/batchDelete`
-    },
-    gateway: {
-      list: `${root}/gateway/list`,
-      add: `${root}/gateway/add`,
-      update: `${root}/gateway/update`,
-      detail: `${root}/gateway/detail`,
-      delete: `${root}/gateway/delete`,
-      batchDelete: `${root}/gateway/batchDelete`
-    },
-    device: {
-      list: `${root}/device/list`,
-      add: `${root}/device/add`,
-      update: `${root}/device/update`,
-      detail: `${root}/device/detail`,
-      delete: `${root}/device/delete`,
-      batchDelete: `${root}/device/batchDelete`,
-    },
-    deviceParam: {
-      list: `${root}/deviceParam/list`,
-      add: `${root}/deviceParam/add`,
-      update: `${root}/deviceParam/update`,
-      detail: `${root}/deviceParam/detail`,
-      delete: `${root}/deviceParam/delete`,
-      batchDelete: `${root}/deviceParam/batchDelete`,
-    },
-    deviceAlarmRecord: {
-      list: `${root}/deviceAlarmRecord/list`,
-      add: `${root}/deviceAlarmRecord/add`,
-      update: `${root}/deviceAlarmRecord/update`,
-      detail: `${root}/deviceAlarmRecord/detail`,
-      delete: `${root}/deviceAlarmRecord/delete`,
-      batchDelete: `${root}/deviceAlarmRecord/batchDelete`,
-    },
-    deviceAlarmConfig: {
-      list: `${root}/deviceAlarmConfig/list`,
-      add: `${root}/deviceAlarmConfig/add`,
-      update: `${root}/deviceAlarmConfig/update`,
-      detail: `${root}/deviceAlarmConfig/detail`,
-      delete: `${root}/deviceAlarmConfig/delete`,
-      batchDelete: `${root}/deviceAlarmConfig/batchDelete`,
-    },
-    deviceAlarmRepairRecord: {
-      list: `${root}/deviceAlarmRepairRecord/list`,
-      add: `${root}/deviceAlarmRepairRecord/add`,
-      update: `${root}/deviceAlarmRepairRecord/update`,
-      detail: `${root}/deviceAlarmRepairRecord/detail`,
-      delete: `${root}/deviceAlarmRepairRecord/delete`,
-      batchDelete: `${root}/deviceAlarmRepairRecord/batchDelete`,
-    },
-    operatorLog: {
-      list: `${root}/operatorLog/list`,
-      add: `${root}/operatorLog/add`,
-      update: `${root}/operatorLog/update`,
-      detail: `${root}/operatorLog/detail`,
-      delete: `${root}/operatorLog/delete`,
-      batchDelete: `${root}/operatorLog/batchDelete`,
-    },
-    auth: {
-      verifyCode: `${root}/auth/verifyCode`,
-      login: `${root}/auth/login`,
-      updateUserPassword: `${root}/auth/updateUserPassword`,
-      userInfo: `${root}/auth/userInfo`,
-      logout: `${root}/auth/logout`,
-    },
-    role: {
-      list: `${root}/role/list`,
-      add: `${root}/role/add`,
-      update: `${root}/role/update`,
-      detail: `${root}/role/detail`,
-      delete: `${root}/role/delete`,
-    },
-    power: {
-      list: `${root}/power/list`,
-      add: `${root}/power/add`,
-      update: `${root}/power/update`,
-      detail: `${root}/power/detail`,
-      delete: `${root}/power/delete`,
-    },
-    menu: {}
-  }
+        user: {
+            list: `${root}/user/list`,
+            add: `${root}/user/add`,
+            update: `${root}/user/update`,
+            detail: `${root}/user/detail`,
+            delete: `${root}/user/delete`,
+            batchDelete: `${root}/user/batchDelete`,
+            bindRole: `${root}/user/bindRole`,
+            bindOperator: `${root}/user/bindOperator`,
+        },
+        operator: {
+            list: `${root}/operator/list`,
+            add: `${root}/operator/add`,
+            update: `${root}/operator/update`,
+            detail: `${root}/operator/detail`,
+            delete: `${root}/operator/delete`,
+            batchDelete: `${root}/operator/batchDelete`
+        },
+        project: {
+            list: `${root}/project/list`,
+            add: `${root}/project/add`,
+            update: `${root}/project/update`,
+            detail: `${root}/project/detail`,
+            delete: `${root}/project/delete`,
+            batchDelete: `${root}/project/batchDelete`
+        },
+        gateway: {
+            list: `${root}/gateway/list`,
+            add: `${root}/gateway/add`,
+            update: `${root}/gateway/update`,
+            detail: `${root}/gateway/detail`,
+            delete: `${root}/gateway/delete`,
+            batchDelete: `${root}/gateway/batchDelete`
+        },
+        device: {
+            list: `${root}/device/list`,
+            add: `${root}/device/add`,
+            update: `${root}/device/update`,
+            detail: `${root}/device/detail`,
+            delete: `${root}/device/delete`,
+            batchDelete: `${root}/device/batchDelete`,
+        },
+        deviceParam: {
+            list: `${root}/deviceParam/list`,
+            add: `${root}/deviceParam/add`,
+            update: `${root}/deviceParam/update`,
+            detail: `${root}/deviceParam/detail`,
+            delete: `${root}/deviceParam/delete`,
+            batchDelete: `${root}/deviceParam/batchDelete`,
+        },
+        deviceAlarmRecord: {
+            list: `${root}/deviceAlarmRecord/list`,
+            add: `${root}/deviceAlarmRecord/add`,
+            update: `${root}/deviceAlarmRecord/update`,
+            detail: `${root}/deviceAlarmRecord/detail`,
+            delete: `${root}/deviceAlarmRecord/delete`,
+            batchDelete: `${root}/deviceAlarmRecord/batchDelete`,
+        },
+        deviceAlarmConfig: {
+            list: `${root}/deviceAlarmConfig/list`,
+            add: `${root}/deviceAlarmConfig/add`,
+            update: `${root}/deviceAlarmConfig/update`,
+            detail: `${root}/deviceAlarmConfig/detail`,
+            delete: `${root}/deviceAlarmConfig/delete`,
+            batchDelete: `${root}/deviceAlarmConfig/batchDelete`,
+        },
+        deviceAlarmRepairRecord: {
+            list: `${root}/deviceAlarmRepairRecord/list`,
+            add: `${root}/deviceAlarmRepairRecord/add`,
+            update: `${root}/deviceAlarmRepairRecord/update`,
+            detail: `${root}/deviceAlarmRepairRecord/detail`,
+            delete: `${root}/deviceAlarmRepairRecord/delete`,
+            batchDelete: `${root}/deviceAlarmRepairRecord/batchDelete`,
+        },
+        operatorLog: {
+            list: `${root}/operatorLog/list`,
+            add: `${root}/operatorLog/add`,
+            update: `${root}/operatorLog/update`,
+            detail: `${root}/operatorLog/detail`,
+            delete: `${root}/operatorLog/delete`,
+            batchDelete: `${root}/operatorLog/batchDelete`,
+        },
+        auth: {
+            verifyCode: `${root}/auth/verifyCode`,
+            login: `${root}/auth/login`,
+            updateUserPassword: `${root}/auth/updateUserPassword`,
+            userInfo: `${root}/auth/userInfo`,
+            logout: `${root}/auth/logout`,
+        },
+        role: {
+            list: `${root}/role/list`,
+            add: `${root}/role/add`,
+            update: `${root}/role/update`,
+            detail: `${root}/role/detail`,
+            delete: `${root}/role/delete`,
+        },
+        power: {
+            list: `${root}/power/list`,
+            add: `${root}/power/add`,
+            update: `${root}/power/update`,
+            detail: `${root}/power/detail`,
+            delete: `${root}/power/delete`,
+        },
+        menu: {}
+    }
 ;
 
 export default Object.assign(
-  {
-    $base: {
-      root: root,
-    },
+    {
+        $base: {
+            root: root,
+        },
 
 
-  },
-  api
+    },
+    api
 )

+ 171 - 16
sources/client/vrv-platform/src/main.js

@@ -1,27 +1,182 @@
-// The Vue build version to load with the `import` command
-// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
 import Vue from 'vue'
-import App from './App'
-
+import App from './App.vue'
+import _ from 'lodash'
+import router from './router'
+import store from './store'
+console.log(router);
 
+//引入element
 import ElementUI from 'element-ui';
+import {Message} from 'element-ui';
 import 'element-ui/lib/theme-chalk/index.css';
+Vue.use(ElementUI);
+
+
+//引入Fastboot UI库
+import  FastbootUI from 'fastboot-ui/src/components';
+import 'fastboot-ui/src/scss/element-theme.scss'
+
+Vue.use(FastbootUI);
+
+
+import FastbootAdmin from 'fastboot-admin';
+import DictSelect from "fastboot-admin/src/components/DictSelect.vue";
+import OrgCascader from "fastboot-admin/src/components/OrgCascader.vue";
+import DictText from "fastboot-admin/src/components/DictText.vue";
+import AreaCascader from "fastboot-admin/src/components/AreaCascader.vue";
+import RoleSelect from "fastboot-admin/src/components/RoleSelect.vue";
+Vue.component(DictSelect.name,DictSelect);
+Vue.component(OrgCascader.name,OrgCascader);
+Vue.component(AreaCascader.name,AreaCascader);
+Vue.component(DictText.name,DictText);
+Vue.component(RoleSelect.name,RoleSelect);
+
+
+//引入全局工具和配置
+import qs from 'qs'
 import axios from 'axios'
-import api from './config/api'
-import router from "./router";
 
-Vue.prototype.axios = axios
-Vue.prototype.api = api
+//引入接口
+import baseApi from './config/api'
+let api = _.defaultsDeep(baseApi,FastbootAdmin.api);
+router.addRoutes(FastbootAdmin.routes)
+
+import moment from 'moment'
+
+import utils from './util/utils'
+
+Vue.prototype.$moment = moment;
+Vue.prototype.$api = api ;
+Vue.prototype.$http = axios;
+Vue.prototype.$qs = qs;
+Vue.prototype.$utils = utils;
+axios.defaults.withCredentials = true;
 
-Vue.use(ElementUI);
 Vue.config.productionTip = false
 
-/* eslint-disable no-new */
-new Vue({
-  el: '#app',
-  router,
-  components: {App},
-  template: '<App/>'
-})
 
+//http响应拦截器
+Vue.prototype.$http.interceptors.response.use(resp => {
+
+
+  //如果未授权,则跳转至授权页面
+  if(resp.data.status === 401){
+
+    if(sessionStorage.getItem("login-user-info") != null){
+      Message.warning("30分钟未操作自动退出登录");
+    }
+
+    sessionStorage.removeItem("login-user-info");
+
+
+
+
+    router.push("/login");
+
+
+  }
+
+  //如果未授权,则跳转至授权页面
+  if(resp.data.status === 403){
+    router.push("/no-permission");
+  }
+
+  return resp;
+
+}, error => {
+  console.log(error);
+  return Promise.reject(error)
+});
+
+
+
+
+
+
+//加载系统信息
+axios.post(api.app.appInfo).then((resp)=>{
+
+  window.appInfo = resp.data.data.appInfo;
+  try {
+    window.appSetting = JSON.parse(resp.data.data.appInfo.setting);
+  }catch (e) {
+    window.appSetting = {};
+  }
+
+  if(!window.appSetting){
+    window.appSetting={};
+  }
+
+  if(window.appInfo.logo){
+    window.appInfo.logoUrl = `${api.commonFile.download}?code=${window.appInfo.logo}`;
+  }
+
+
+  if(window.appInfo.name){
+    document.title=window.appInfo.name;
+  }else{
+    document.title="未配置系统名称";
+  }
+
+
+  //路由拦截器
+  router.beforeEach((to,form,next)=>{
+
+
+
+
+    if(to.path.startsWith('/update-user-password')){
+      next();
+      if(window.updatePassword){
+        Message.warning("请修改密码再进行操作!");
+      }
+      return;
+    }
+
+
+    if(sessionStorage.getItem("login-user-info") != null){
+
+
+      let userInfo = JSON.parse(sessionStorage.getItem("login-user-info"));
+
+
+
+
+      if(window.appSetting["UPDATE_PWD_INTERVAL"] && window.appSetting["UPDATE_PWD_INTERVAL"].value !== "0"){
+
+        if(!userInfo.lastUpdatePwdTime){
+          window.updatePassword = true;
+
+          next('/update-user-password')
+          return ;
+        }
+
+        if(userInfo.lastUpdatePwdTime <= parseInt(window.appSetting["UPDATE_PWD_INTERVAL"]) * 24 * 60 * 60 * 1000){
+          next('/update-user-password');
+          return;
+        }
+
+        next();
+
+
+
+      }else{
+        next();
+      }
+
+    }else{
+      next();
+    }
+
+  });
+
+  window.routeViewType = 'route';
+
+  new Vue({
+    router,
+    store,
+    render: h => h(App)
+  }).$mount('#app');
+
+});
 

+ 73 - 149
sources/client/vrv-platform/src/router/index.js

@@ -1,164 +1,88 @@
 import Vue from 'vue'
 import Router from 'vue-router'
 
-import project from '@/views/project/project'
-import login from '@/views/login/login'
-import menu from '@/views/menu/menu'
-import operator from '@/views/operator/list'
-import gateway from '@/views/gateway/list'
-import device from '@/views/device/list'
-import deviceAlarmRecord from '@/views/deviceAlarmRecord/list'
-import operatorLog from '@/views/operatorLog/list'
-import user from '@/views/user/list'
-import powerSet from '@/views/powerSet/list'
-import roleSet from '@/views/roleSet/list'
-
-import operatorList from "../views/operator/list";
-import gatewayList from "../views/gateway/list";
-import deviceList from "../views/device/list";
-import deviceAlarmRecordList from "../views/deviceAlarmRecord/list";
-import operatorLogList from "../views/operatorLog/list";
-import userList from "../views/user/list";
-import powerSetList from "../views/powerSet/list";
-import roleSetList from "../views/roleSet/list";
-
-import menuList from "../views/menu/menu";
-
-
 
 Vue.use(Router)
 
 export default new Router({
-  routes: [
-    {
-      path: '/menu',
-      name: 'menu',
-      component: menuList,
-      children:[
+    routes: [
         {
-          path: '/project',
-          name: 'project',
-          component: project
-        }, {
-          path: '/user',
-          name: 'user',
-          component: user
-        },
-        {
-          path: '/',
-          name: 'login',
-          component: login
+            path: '/',
+            name: 'menu',
+            component: () => import(/* webpackChunkName: "views" */ '../views/menu/menu'),
+            children: [
+                {
+                    path: '/project',
+                    name: 'project',
+                    meta: {title: '项目管理', tab: true, keepAlive: true},
+                    component: () => import(/* webpackChunkName: "views" */ '../views/project/project'),
+                },
+                {
+                    path: '/operatorLog',
+                    name: 'operatorLog',
+                    meta: {title: '操作日志', tab: true, keepAlive: true},
+                    component: () => import(/* webpackChunkName: "views" */ '../views/operatorLog/list'),
+                }
+                ,
+                {
+                    path: '/user',
+                    name: 'user',
+                    meta: {title: '用户管理', tab: true, keepAlive: true},
+                    component: () => import(/* webpackChunkName: "views" */ '../views/user/list'),
+                }
+                ,
+                {
+                    path: '/operator',
+                    name: 'operator',
+                    meta: {title: '运营商管理', tab: true, keepAlive: true},
+                    component: () => import(/* webpackChunkName: "views" */ '../views/operator/list'),
+                }
+                ,
+                {
+                    path: '/gateway',
+                    name: 'gateway',
+                    meta: {title: '网关管理', tab: true, keepAlive: true},
+                    component: () => import(/* webpackChunkName: "views" */ '../views/gateway/list'),
+                }
+                ,
+                {
+                    path: '/device',
+                    name: 'device',
+                    meta: {title: '设备管理', tab: true, keepAlive: true},
+                    component: () => import(/* webpackChunkName: "views" */ '../views/device/list'),
+                }
+                ,
+                {
+                    path: '/deviceAlarmRecord',
+                    name: 'deviceAlarmRecord',
+                    meta: {title: '报警管理', tab: true, keepAlive: true},
+                    component: () => import(/* webpackChunkName: "views" */ '../views/deviceAlarmRecord/list'),
+                }
+                ,
+                {
+                    path: '/power',
+                    name: 'power',
+                    meta: {title: '权限管理', tab: true, keepAlive: true},
+                    component: () => import(/* webpackChunkName: "views" */ '../views/power/list'),
+                }
+                ,
+                {
+                    path: '/role',
+                    name: 'role',
+                    meta: {title: '角色管理', tab: true, keepAlive: true},
+                    component: () => import(/* webpackChunkName: "views" */ '../views/role/list'),
+                }
+            ]
         },
 
         {
-          path: '/operator',
-          name: 'operator',
-          component: operatorList
-        }
-        ,
-        {
-          path: '/gateway',
-          name: 'gateway',
-          component: gatewayList
-        }
-        ,
-        {
-          path: '/device',
-          name: 'device',
-          component: deviceList
-        }
-        ,
-        {
-          path: '/deviceAlarmRecord',
-          name: 'deviceAlarmRecord',
-          component: deviceAlarmRecordList
+            path: '/',
+            name: 'login',
+            meta: {title: '登录', tab: true, keepAlive: true},
+            component: () => import(/* webpackChunkName: "views" */ '../views/login/login'),
         },
-        {
-          path: '/operatorLog',
-          name: 'operatorLog',
-          component: operatorLogList
-        }
-        ,
-        {
-          path: '/user',
-          name: 'user',
-          component: userList
-        }
-        ,
-        {
-          path: '/powerSet',
-          name: 'powerSet',
-          component: powerSetList
-        }
-        ,
-        {
-          path: '/roleSet',
-          name: 'roleSet',
-          component: roleSetList
-        }]
-    },
-    // {
-    //   path: '/project',
-    //   name: 'project',
-    //   component: project
-    // }, {
-    //   path: '/user',
-    //   name: 'user',
-    //   component: user
-    // },
-    {
-      path: '/',
-      name: 'login',
-      component: login
-    },
-    //
-    // {
-    //   path: '/operator',
-    //   name: 'operator',
-    //   component: operatorList
-    // }
-    // ,
-    // {
-    //   path: '/gateway',
-    //   name: 'gateway',
-    //   component: gatewayList
-    // }
-    // ,
-    // {
-    //   path: '/device',
-    //   name: 'device',
-    //   component: deviceList
-    // }
-    // ,
-    // {
-    //   path: '/deviceAlarmRecord',
-    //   name: 'deviceAlarmRecord',
-    //   component: deviceAlarmRecordList
-    // },
-    // {
-    //   path: '/operatorLog',
-    //   name: 'operatorLog',
-    //   component: operatorLogList
-    // }
-    // ,
-    // {
-    //   path: '/user',
-    //   name: 'user',
-    //   component: userList
-    // }
-    // ,
-    // {
-    //   path: '/powerSet',
-    //   name: 'powerSet',
-    //   component: powerSetList
-    // }
-    // ,
-    // {
-    //   path: '/roleSet',
-    //   name: 'roleSet',
-    //   component: roleSetList
-    // }
-  ]
+
+    ]
 })
 
 

+ 16 - 0
sources/client/vrv-platform/src/store.js

@@ -0,0 +1,16 @@
+import Vue from 'vue'
+import Vuex from 'vuex'
+
+Vue.use(Vuex)
+
+export default new Vuex.Store({
+  state: {
+
+  },
+  mutations: {
+
+  },
+  actions: {
+
+  }
+})

+ 94 - 0
sources/client/vrv-platform/src/util/utils.js

@@ -0,0 +1,94 @@
+const utils = {}
+
+// discernTrackingNumber
+utils.dtn = function (trackingNumber) {
+
+    let business = ""
+
+    // 判断是否是圆通
+    let yt = /^[YT|DD|G].*/
+    if (yt.test(trackingNumber)) {
+        return "YT"
+    }
+
+    // 判断是否是顺丰
+    let sf = /^[SF].*/
+    if (sf.test(trackingNumber)) {
+        return "SF"
+    }
+
+    let length12 = function (trackingNumber){
+        console.log(12)
+        // 判断是否是中通
+        let zt = /^5.*/
+        if (zt.test(trackingNumber)) {
+            return "ZTO"
+        }
+
+        // 判断是否是申通
+        let st = /^1.*/
+        if (st.test(trackingNumber)) {
+            return "STO"
+        }
+
+        // 默认返回顺丰
+        return "SF"
+    }
+
+    let length13 = function (trackingNumber){
+        console.log(13)
+        // 判断是否是韵达
+        let zt = /^[3|4|5|6|7|8].*/
+        if (zt.test(trackingNumber)) {
+            return "YD"
+        }
+
+        // 默认返回顺丰
+        return "SF"
+    }
+
+    let length14 = function(trackingNumber){
+        console.log(14)
+        // 判断是否是中通
+        let zt = /^7.*/
+        if (zt.test(trackingNumber)) {
+            return "ZTO"
+        }
+
+        // 默认返回顺丰
+        return "SF"
+    }
+
+    let length15 = function(trackingNumber){
+        console.log(15)
+        // 判断是否是申通
+        let zt = /^7.*/
+        if (zt.test(trackingNumber)) {
+            return "STO"
+        }
+
+        // 默认返回顺丰
+        return "SF"
+    }
+
+    switch (trackingNumber.length) {
+        case 12:
+            business = length12(trackingNumber);
+            break;
+        case 13:
+            business = length13(trackingNumber);
+            break;
+        case 14:
+            business = length14(trackingNumber);
+            break;
+        case 15:
+            business = length15(trackingNumber);
+            break;
+    }
+
+    return business
+}
+
+export default Object.assign(
+    utils
+)

+ 0 - 0
sources/client/vrv-platform/src/views/.gitignore


+ 13 - 7
sources/client/vrv-platform/src/views/device/list.vue

@@ -125,12 +125,18 @@
 
 
 <script>
-import axios from "axios";
 
 export default {
   name: 'project',
   data() {
     return {
+      api: {
+        list: this.$api.device.list,
+        delete: this.$api.device.delete,
+        add: this.$api.device.add,
+        update: this.$api.device.update,
+      },
+
       value: true,
 
       addOrEdit: 1,
@@ -187,7 +193,7 @@ export default {
 
     loadData(index) {
       const vm = this;
-      vm.axios.get(vm.api.device.list, {
+      vm.$http.get(vm.api.list,  {
         params: {
           pageSize: 5,
           pageIndex: index ? index : 1,
@@ -211,7 +217,7 @@ export default {
           vm.tableData = response.data.data.devices;
         })
     },
-    search(searchFormData) {
+    search() {
       //console.log(this.searchFormData)
       this.loadData();
     },
@@ -243,7 +249,7 @@ export default {
     addOrEditMehtond() {
       const vm = this;
       if (this.addOrEdit == 2) {
-        vm.axios.get(vm.api.device.update, {
+        vm.$http.get(vm.api.update,  {
           params: {
             name: this.formData.name,
             ip: this.formData.ip,
@@ -280,7 +286,7 @@ export default {
       }
 
       if (this.addOrEdit == 1) {
-        vm.axios.get(vm.api.device.add, {
+        vm.$http.get(vm.api.add,  {
           params: {
             name: this.formData.name,
             ip: this.formData.ip,
@@ -317,7 +323,7 @@ export default {
       this.$confirm('确认删除', '提示', {
         type: 'warning'
       }).then(() => {
-        vm.axios.get(vm.api.device.delete, {
+        vm.$http.get(vm.api.delete, {
           params: {
             code: row.code,
           }
@@ -359,7 +365,7 @@ export default {
       this.$confirm('是否进行此操作', '提示', {
         type: 'warning'
       }).then(() => {
-        vm.axios.get(vm.api.device.update, {
+        vm.$http.get(vm.api.update,  {
           params: {
             name: row.name,
             sn: row.sn,

+ 17 - 11
sources/client/vrv-platform/src/views/deviceAlarmRecord/list.vue

@@ -1,5 +1,5 @@
 <template>
-  <div id="project">
+  <div id="deviceAlarmRecord">
     <el-container>
 
       <el-main>
@@ -104,7 +104,7 @@
                 class="delBut non"
                 @click="statusHandle(scope.row)"
               >
-                {{ scope.row.status == '未处理' ? '未处理' : '已处理' }}
+                {{ scope.row.status == '未处理' ? '已处理' : '未处理' }}
               </el-button>
             </template>
           </el-table-column>
@@ -138,12 +138,18 @@
 
 
 <script>
-import axios from "axios";
 
 export default {
-  name: 'project',
+  name: 'deviceAlarmRecord',
   data() {
     return {
+      api: {
+        list: this.$api.deviceAlarmRecord.list,
+        delete: this.$api.deviceAlarmRecord.delete,
+        add: this.$api.deviceAlarmRecord.add,
+        update: this.$api.deviceAlarmRecord.update,
+      },
+
       value: true,
 
       addOrEdit: 1,
@@ -206,7 +212,7 @@ export default {
 
     loadData(index) {
       const vm = this;
-      vm.axios.get(vm.api.deviceAlarmRecord.list, {
+      vm.$http.get(vm.api.list,  {
         params: {
           pageSize: 5,
           pageIndex: index ? index : 1,
@@ -232,7 +238,7 @@ export default {
           vm.tableData = response.data.data.deviceAlarmRecords;
         })
     },
-    search(searchFormData) {
+    search() {
       //console.log(this.searchFormData)
       this.loadData();
     },
@@ -267,7 +273,7 @@ export default {
     addOrEditMehtond() {
       const vm = this;
       if (this.addOrEdit == 2) {
-        vm.axios.get(vm.api.deviceAlarmRecord.update, {
+        vm.$http.get(vm.api.update, {
           params: {
             alarmName: this.formData.alarmName,
             alarmType: this.formData.alarmType,
@@ -308,7 +314,7 @@ export default {
       }
 
       if (this.addOrEdit == 1) {
-        vm.axios.get(vm.api.deviceAlarmRecord.add, {
+        vm.$http.get(vm.api.add, {
           params: {
             alarmName: this.formData.alarmName,
             alarmType: this.formData.alarmType,
@@ -349,7 +355,7 @@ export default {
       this.$confirm('确认删除', '提示', {
         type: 'warning'
       }).then(() => {
-        vm.axios.get(vm.api.deviceAlarmRecord.delete, {
+        vm.$http.get(vm.api.delete,  {
           params: {
             code: row.code,
           }
@@ -392,7 +398,7 @@ export default {
       this.$confirm('是否进行此操作', '提示', {
         type: 'warning'
       }).then(() => {
-        vm.axios.get(vm.api.deviceAlarmRecord.update, {
+        vm.$http.get(vm.api.update,  {
           params: {
             alarmName: row.alarmName,
             alarmType: row.alarmType,
@@ -424,7 +430,7 @@ export default {
                 showClose: true,
                 message: response.data.desc
               })
-              value:false
+
             }
             this.loadData();
           })

+ 16 - 8
sources/client/vrv-platform/src/views/gateway/list.vue

@@ -110,12 +110,20 @@
 
 
 <script>
-import axios from "axios";
+
 
 export default {
   name: 'project',
   data() {
     return {
+
+      api: {
+        list: this.$api.gateway.list,
+        delete: this.$api.gateway.delete,
+        add: this.$api.gateway.add,
+        update: this.$api.gateway.update,
+      },
+
       value: true,
 
       addOrEdit: 1,
@@ -167,7 +175,7 @@ export default {
 
     loadData(index) {
       const vm = this;
-      vm.axios.get(vm.api.gateway.list, {
+      vm.$http.get(vm.api.list, {
         params: {
           pageSize: 5,
           pageIndex: index ? index : 1,
@@ -188,7 +196,7 @@ export default {
           vm.tableData = response.data.data.gateways;
         })
     },
-    search(searchFormData) {
+    search() {
       //console.log(this.searchFormData)
       this.loadData();
     },
@@ -217,7 +225,7 @@ export default {
     addOrEditMehtond() {
       const vm = this;
       if (this.addOrEdit == 2) {
-        vm.axios.get(vm.api.gateway.update, {
+        vm.$http.get(vm.api.update,  {
           params: {
             number: this.formData.number,
             ip: this.formData.ip,
@@ -251,7 +259,7 @@ export default {
       }
 
       if (this.addOrEdit == 1) {
-        vm.axios.get(vm.api.gateway.add, {
+        vm.$http.get(vm.api.add,  {
           params: {
             number: this.formData.number,
             ip: this.formData.ip,
@@ -285,7 +293,7 @@ export default {
       this.$confirm('确认删除', '提示', {
         type: 'warning'
       }).then(() => {
-        vm.axios.get(vm.api.gateway.delete, {
+        vm.$http.get(vm.api.delete,  {
           params: {
             code: row.code,
           }
@@ -328,7 +336,7 @@ export default {
       this.$confirm('是否进行此操作', '提示', {
         type: 'warning'
       }).then(() => {
-        vm.axios.get(vm.api.gateway.update, {
+        vm.$http.get(vm.api.update,  {
           params: {
             number: row.number,
             ip: row.ip,
@@ -352,7 +360,7 @@ export default {
                 showClose: true,
                 message: response.data.desc
               })
-              value:false
+          
             }
             this.loadData();
           })

+ 0 - 3
sources/client/vrv-platform/src/views/home/home.vue

@@ -1,3 +0,0 @@
-<template>
-
-</template>

+ 285 - 91
sources/client/vrv-platform/src/views/login/login.vue

@@ -1,110 +1,304 @@
 <template>
-  <transition name="el-fade-in-linear">
-    <div id="login">
-      <div class="login-box">
-        <div class="login-form">
+    <transition name="el-fade-in-linear">
+        <div id="login-page" @keyup.enter="login">
+            <div class="login-box">
 
-          <div style="display: inline-block;text-align: left;width: 25%">
+                <div class="slider-banner-box">
+                    <img src="../../assets/logo_banner.jpg" width="100%" height="100%" alt="">
+                </div>
 
-            <el-form :model="form">
-              <el-form-item>
-                <el-input placeholder="请输入用户名" size="small" v-model="form.account"></el-input>
-              </el-form-item>
-              <el-form-item>
-                <el-input placeholder="请输入密码" size="small" v-model="form.password"></el-input>
-              </el-form-item>
-              <el-form-item>
-                <el-input placeholder="请输入验证码" size="small" v-model="form.verifyCode"></el-input>
-              </el-form-item>
+                <div class="login-form">
 
-              <el-form-item>
-                <el-button type="primary" size="small" @click="handleRefreshVerifyCode">获取验证码</el-button>
-              </el-form-item>
+                    <div style="display: inline-block;text-align: left;width: 80%">
+
+                        <div class="title">
+                            <img v-if="appInfo.logo" :src="`${$api.commonFile.download}?code=${appInfo.logo}`" style="height: 50px;" alt="">
+                            <img v-else src="../../assets/cloudgo_logo.png" style="height: 50px;" alt="">
+                        </div>
+
+                        <el-form ref="form" :rules="formRules" :model="form">
+
+                            <el-form-item prop="account">
+
+                                <div class="input-group">
+                                    <el-input
+                                            prefix-icon="el-icon-user"
+                                            :autofocus="true"
+                                            placeholder="请输入用户名"
+                                            v-model="form.account">
+                                    </el-input>
+                                </div>
+                            </el-form-item>
+
+                            <el-form-item prop="password">
+                                <div class="input-group">
+                                    <el-input
+                                            prefix-icon="el-icon-lock"
+                                            placeholder="请输入密码"
+                                            type="password"
+                                            v-model="form.password">
+                                    </el-input>
+                                </div>
+                            </el-form-item>
+
+                            <el-form-item prop="verifyCode" :error="formErrorMsg.verifyCode">
+                                <div class="input-group">
+                                    <el-input
+                                            prefix-icon="el-icon-circle-check"
+                                            placeholder="请输入图形验证码"
+                                            class="verify-input"
+                                            v-model="form.verifyCode"
+                                    >
+                                    </el-input>
+
+                                    <img @click="handleRefreshVerifyCode" class="verify-img" :src="verifyCodeUrl" style="cursor: pointer"
+                                         alt="">
+                                </div>
+                            </el-form-item>
 
 
-              <div class="input-group">
-                <el-button @click="login" type="primary">登录</el-button>
-              </div>
-            </el-form>
 
-            <img :src="verifyCodeUrl" @click="onResetVerify()" >
 
-          </div>
 
-        </div>
 
-      </div>
-    </div>
-  </transition>
+<!--                            <div class="input-group" style="margin-bottom: 20px;">-->
+<!--                                <label>记住我?</label>-->
+<!--                                <el-switch-->
+<!--                                        v-model="rememberMe"-->
+<!--                                        on-text=""-->
+<!--                                        off-text="">-->
+<!--                                </el-switch>-->
+<!--                            </div>-->
+                            <div class="input-group">
+                                <el-button @click.native="login" type="primary" :loading="isBtnLoading">{{btnText}}
+                                </el-button>
+                            </div>
+
+                        </el-form>
+
+
+                    </div>
+
+                </div>
+
+
+                <div class="login-footer" style="">
+                    Copyright © {{new Date().getFullYear()}} {{appInfo.company ? appInfo.company :'CloudGo'}}.
+                </div>
+            </div>
+        </div>
+    </transition>
 </template>
 
 <script>
-export default {
-  name: "login",
-  data() {
-    return {
-
-      form: {
-        account: '',
-        password: '',
-        verifyCode: '',
-      },
-
-      verifyCodeUrl: this.api.auth.verifyCode,
+    export default {
+        name: "Login",
+        data() {
+            return {
+                appInfo:{},
+                form:{
+                    account:'',
+                    password:'',
+                    verifyCode:'',
+                },
+                formErrorMsg:{
+                    account:'',
+                    password:'',
+                    verifyCode:'',
+                },
+                formRules:{
+                    account: [
+                        {required: true, message: '请输入用户名', trigger: 'blur'},
+                    ],
+                    password: [
+                        {required: true, message: '请输入密码', trigger: 'blur'},
+                    ],
+                    verifyCode: [
+                        {required: true, message: '请输入验证码', trigger: 'blur'},
+                    ]
+                },
+                rememberMe: false,
+                isBtnLoading: false,
+                verifyCodeUrl:this.api.auth.verifyCode,
+            };
+        },
+        computed: {
+            btnText() {
+                if (this.isBtnLoading) return '登录中...';
+                return '登录';
+            }
+        },
+        methods: {
+
+            handleRefreshVerifyCode(){
+                this.verifyCodeUrl = (this.api.auth.verifyCode  + "?t=" + new Date().getTime());
+            },
+
+            login() {
+
+                this.isBtnLoading = true;
+                let vm = this;
+
+                this.$refs.form.validate((valid)=>{
+
+                    if(valid){
+
+                        vm.$http.post(vm.api.auth.login,vm.$qs.stringify(vm.form)).then((resp)=>{
+
+                            if(resp.data.status === 200){
+
+                                //存储登录用户信息
+                                sessionStorage.setItem('login-user-info',JSON.stringify(resp.data.data.passport));
+                                sessionStorage.setItem('remember-me',JSON.stringify(vm.rememberMe));
+
+                              vm.$router.push('/menu')
+                            }else if (resp.data.status === 400) {
+
+
+                                resp.data.data.errorFields.forEach(function (a) {
+
+                                    vm.formErrorMsg[a.name] = '';
+                                    vm.$nextTick(() => {
+                                        vm.formErrorMsg[a.name] = a.message;
+                                    });
+
+
+                                });
+
+                                if (resp.data.desc) {
+                                    vm.$message({
+                                        type: "error",
+                                        message: resp.data.desc
+                                    });
+                                }
+                                vm.isBtnLoading = false;
+
+
+
+                            } else{
+                                vm.$message({
+                                    type:'error',
+                                    message:resp.data.desc
+                                });
+                                vm.isBtnLoading = false;
+                            }
+
+                        });
+
+                    }else{
+                        vm.isBtnLoading = false;
+                    }
+
+                });
+
+
+            }
+        },
+        created() {
+            this.appInfo = window.appInfo ? window.appInfo : {} ;
+            this.handleRefreshVerifyCode();
+        }
     }
-  },
-
-  created() {
-    this.handleRefreshVerifyCode();
-  },
-
-  methods: {
-    onResetVerify() {
-      this.verifyCodeUrl = this.api.auth.verifyCode + '?now=' + new Date().getTime()
-    },
-    handleRefreshVerifyCode() {
-      let vm = this;
-      vm.verifyCodeUrl = vm.axios.get(vm.api.auth.verifyCode)
-    },
-
-    login() {
-      let vm = this;
-
-      vm.axios.get(vm.api.auth.login, {
-        params: {
-          account: this.form.account,
-          password: this.form.password,
-          verifyCode: this.form.verifyCode,
+</script>
+
+<style lang="scss">
+
+
+    #login-page {
+        width: 100vw;
+        height: 100vh;
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        background-image: url("../../assets/login_bg.png");
+        background-position: center;
+        background-size: 100%;
+
+        /*.el-form-item{*/
+        /*     margin-bottom: 0;*/
+        /*}*/
+
+
+        .login-box {
+            position: relative;
+            display: flex;
+            /*flex-direction: column;*/
+            /*align-items: center;*/
+            width: 930px;
+            height: 420px;
+            /*border-radius: 10px;*/
+            background: rgba(255, 255, 255, 1);
+            top: -40px;
+
+
+            .slider-banner-box {
+                width: 530px;
+                display: inline-block;
+                float: left
+            }
+
+            .login-form {
+                width: calc(100% - 530px);
+                float: left;
+                display: inline-block;
+                text-align: center;
+
+                .title {
+                    position: relative;
+                    color: #c01920;
+                    font-weight: bold;
+                    font-size: 30px;
+                    text-align: center;
+                    line-height: 2.2;
+                    margin-bottom: 20px;
+                    margin-top: 20px;
+                    width: 100%;
+                    /*text-shadow: #000000 0 0 5px ;*/
+                    display: inline-block;
+                }
+
+
+                .input-group {
+                    /*margin-bottom: 20px;*/
+                    display: inline-block;
+                    width: 100%;
+
+                    .verify-input {
+                        width: 50%;
+                        /*float: left*/
+                    }
+
+                    .verify-img {
+                        height: 40px;
+                        width: calc(50% - 10px);
+                        display: inline-block;
+                        vertical-align: bottom;
+                        margin-left: 10px;
+                        float: right;
+                    }
+
+                    button {
+                        width: 100%;
+                        border: none;
+                    }
+                }
+            }
+
+
+        }
+
+        .login-footer {
+
+            position: absolute;
+            bottom: -40px;
+            text-align: center;
+            color: #242C37;
+            font-weight: bold;
+            width: 100%;
+            left: 0px;
+
         }
-      }).then((resp) => {
-
-        console.log(resp)
-
-        // if (resp.data.status === 200) {
-        //   vm.$router.push('/menu')
-        // }
-        // if (resp.data.status === 400) {
-        //   this.$message({
-        //       type: 'info',
-        //       message: resp.data.data.errorFields[0].message
-        //
-        //     }
-        //   );
-        // }
-        // if (response.data.status == 500) {
-        //   this.$message({
-        //     type: 'error',
-        //     showClose: true,
-        //     message: response.data.desc
-        //   })
-        // }
-
-      });
 
     }
-  }
-}
-</script>
 
-<style>
 </style>

+ 36 - 51
sources/client/vrv-platform/src/views/menu/menu.vue

@@ -6,65 +6,56 @@
       <div style="width: 20%">
         <el-aside width="100%">
 
-              <el-menu
-                :router=true
-                :default-active="$route.name"
-                class="el-menu-vertical-demo"
-                @open="handleOpen"
-                @close="handleClose">
+          <el-menu
+              :router=true
+              :default-active="$route.name"
+              class="el-menu-vertical-demo"
+              @open="handleOpen"
+              @close="handleClose">
 
-                <el-menu-item index="/">数据可视化大屏</el-menu-item>
+            <el-menu-item index="/">数据可视化大屏</el-menu-item>
 
-                <el-menu-item index="/operator">运营商管理</el-menu-item>
+            <el-menu-item index="/operator">运营商管理</el-menu-item>
 
-                <el-submenu index="3">
-                  <template slot="title">
-                    <span @click="project(index)">项目管理</span>
-                  </template>
+            <el-menu-item index="/project">项目管理</el-menu-item>
 
-                  <el-submenu index="3-1">
-                    <template slot="title">
-                      <span @click="gateway(index)">网关管理</span>
-                    </template>
+            <el-menu-item index="/gateway">网关管理</el-menu-item>
 
-                    <el-submenu index="3-2">
-                      <template slot="title">
-                        <span @click="device(index)">设备管理</span>
-                      </template>
+            <el-submenu index="3-2">
+              <template slot="title">
+                <span @click="device(index)">设备管理</span>
+              </template>
 
-                      <el-menu-item index="/">运行状态</el-menu-item>
-                      <el-menu-item index="/">数据取消</el-menu-item>
-                      <el-menu-item index="/">参数设定</el-menu-item>
-                      <el-menu-item index="/">系统参数</el-menu-item>
-                      <el-menu-item index="/">报警设置</el-menu-item>
-                      <el-menu-item index="/">报警记录</el-menu-item>
-                      <el-menu-item index="/">维保记录</el-menu-item>
+              <el-menu-item index="/">运行状态</el-menu-item>
+              <el-menu-item index="/">数据曲线</el-menu-item>
+              <el-menu-item index="/">参数设定</el-menu-item>
+              <el-menu-item index="/">系统参数</el-menu-item>
+              <el-menu-item index="/">报警设置</el-menu-item>
+              <el-menu-item index="/">报警记录</el-menu-item>
+              <el-menu-item index="/">维保记录</el-menu-item>
 
-                    </el-submenu>
+            </el-submenu>
 
-                  </el-submenu>
 
-                </el-submenu>
+            <el-menu-item index="/deviceAlarmRecord">报警管理</el-menu-item>
 
-                <el-menu-item index="/deviceAlarmRecord">报警管理</el-menu-item>
+            <el-menu-item index="/operatorLog">操作日志</el-menu-item>
 
-                <el-menu-item index="/operatorLog">操作日志</el-menu-item>
 
+            <el-menu-item index="/user">用户管理</el-menu-item>
 
-                <el-menu-item index="/user">用户管理</el-menu-item>
 
+            <el-submenu index="7">
+              <template slot="title">
+                <span>权限设置</span>
+              </template>
 
-                <el-submenu index="7">
-                  <template slot="title">
-                    <span>权限设置</span>
-                  </template>
+              <el-menu-item index="/role">角色管理</el-menu-item>
+              <el-menu-item index="/power">权限管理</el-menu-item>
 
-                  <el-menu-item index="/roleSet">角色管理</el-menu-item>
-                  <el-menu-item index="/powerSet" >权限管理</el-menu-item>
+            </el-submenu>
 
-                </el-submenu>
-
-              </el-menu>
+          </el-menu>
 
         </el-aside>
       </div>
@@ -74,7 +65,7 @@
         <router-view></router-view>
       </div>
 
-  </div>
+    </div>
   </div>
 
 </template>
@@ -104,14 +95,8 @@ export default {
     handleClose(key, keyPath) {
       console.log(key, keyPath);
     },
-    project(index) {
-      let vm = this;
-      vm.$router.push('/project')
-    },
-    gateway(index) {
-      let vm = this;
-      vm.$router.push('/gateway')
-    },
+
+
     device(index) {
       let vm = this;
       vm.$router.push('/device')

+ 17 - 10
sources/client/vrv-platform/src/views/operator/list.vue

@@ -1,5 +1,5 @@
 <template>
-  <div id="project">
+  <div id="operator">
     <el-container>
 
       <el-main>
@@ -124,12 +124,20 @@
 
 
 <script>
-import axios from "axios";
+
 
 export default {
-  name: 'project',
+  name: 'operator',
   data() {
     return {
+
+      api: {
+        list: this.$api.operator.list,
+        delete: this.$api.operator.delete,
+        add: this.$api.operator.add,
+        update: this.$api.operator.update,
+      },
+
       value: true,
 
       addOrEdit: 1,
@@ -191,7 +199,7 @@ export default {
 
     loadData(index) {
       const vm = this;
-      vm.axios.get(vm.api.operator.list, {
+      vm.$http.get(vm.api.list, {
         params: {
           pageSize: 5,
           pageIndex: index ? index : 1,
@@ -214,7 +222,7 @@ export default {
           vm.tableData = response.data.data.operators;
         })
     },
-    search(searchFormData) {
+    search() {
       //console.log(this.searchFormData)
       this.loadData();
     },
@@ -246,7 +254,7 @@ export default {
     addOrEditMehtond() {
       const vm = this;
       if (this.addOrEdit == 2) {
-        vm.axios.get(vm.api.operator.update, {
+        vm.$http.get(vm.api.update, {
           params: {
             code: this.formData.code,
             name: this.formData.name,
@@ -281,7 +289,7 @@ export default {
       }
 
       if (this.addOrEdit == 1) {
-        vm.axios.get(vm.api.operator.add, {
+        vm.$http.get(vm.api.add,{
           params: {
             name: this.formData.name,
             contact: this.formData.contact,
@@ -315,7 +323,7 @@ export default {
       this.$confirm('确认删除', '提示', {
         type: 'warning'
       }).then(() => {
-        vm.axios.get(vm.api.operator.delete, {
+        vm.$http.get(vm.api.delete, {
           params: {
             code: row.code,
           }
@@ -358,7 +366,7 @@ export default {
       this.$confirm('是否进行此操作', '提示', {
         type: 'warning'
       }).then(() => {
-        vm.axios.get(vm.api.operator.update, {
+        vm.$http.get(vm.api.update, {
           params: {
             code: row.code,
             name: row.name,
@@ -380,7 +388,6 @@ export default {
                 showClose: true,
                 message: response.data.desc
               })
-              value:false
             }
             this.loadData();
           })

+ 15 - 8
sources/client/vrv-platform/src/views/operatorLog/list.vue

@@ -1,5 +1,5 @@
 <template>
-  <div id="project">
+  <div id="operatorLog">
     <el-container>
 
       <el-main>
@@ -81,12 +81,19 @@
 
 
 <script>
-import axios from "axios";
+
 
 export default {
-  name: 'project',
+  name: 'operatorLog',
   data() {
     return {
+      api: {
+        list: this.$api.operatorLog.list,
+        delete: this.$api.operatorLog.delete,
+        add: this.$api.operatorLog.add,
+        update: this.$api.operatorLog.update,
+      },
+
       addOrEdit: 1,
 
       dialogFormVisible: false,
@@ -132,7 +139,7 @@ export default {
 
     loadData(index) {
       const vm = this;
-      vm.axios.get(vm.api.operatorLog.list, {
+      vm.$http.get(vm.api.list, {
         params: {
           pageSize: 5,
           pageIndex: index ? index : 1,
@@ -151,7 +158,7 @@ export default {
           vm.tableData = response.data.data.operatorLogs;
         })
     },
-    search(searchFormData) {
+    search() {
       //console.log(this.searchFormData)
       this.loadData();
     },
@@ -179,7 +186,7 @@ export default {
     addOrEditMehtond() {
       const vm = this;
       if (this.addOrEdit == 2) {
-        vm.axios.get(vm.api.operatorLog.update, {
+        vm.$http.get(vm.api.update, {
           params: {
             content: this.formData.content,
             userAccount: this.formData.userAccount,
@@ -210,7 +217,7 @@ export default {
       }
 
       if (this.addOrEdit == 1) {
-        vm.axios.get(vm.api.operatorLog.add, {
+        vm.$http.get(vm.api.add, {
           params: {
             content: this.formData.content,
             userAccount: this.formData.userAccount,
@@ -250,7 +257,7 @@ export default {
       this.$confirm('确认删除', '提示', {
         type: 'warning'
       }).then(() => {
-        vm.axios.get(vm.api.operatorLog.delete, {
+        vm.$http.get(vm.api.delete, {
           params: {
             code: row.code,
           }

+ 13 - 7
sources/client/vrv-platform/src/views/powerSet/list.vue

@@ -1,5 +1,5 @@
 <template>
-  <div id="user">
+  <div id="power">
     <el-main>
       <el-form :inline="true" :model="searchFormData">
         <el-form-item label="权限名称">
@@ -82,9 +82,15 @@
 
 <script>
 export default {
-  name: 'user',
+  name: 'power',
   data() {
     return {
+      api: {
+        list: this.$api.power.list,
+        delete: this.$api.power.delete,
+        add: this.$api.power.add,
+        update: this.$api.power.update,
+      },
 
       addOrEdit: 1,
 
@@ -131,7 +137,7 @@ export default {
 
     loadData(index) {
       const vm = this;
-      vm.axios.get(vm.api.power.list, {
+      vm.$http.get(vm.api.list,  {
         params: {
           pageSize: 3,
           pageIndex: index ? index : 1,
@@ -152,7 +158,7 @@ export default {
           vm.tableData = response.data.data.powers;
         })
     },
-    search(searchFormData) {
+    search() {
       //console.log(this.searchFormData)
       this.loadData();
     },
@@ -183,7 +189,7 @@ export default {
     addOrEditMehtond() {
       const vm = this;
       if (this.addOrEdit == 2) {
-        vm.axios.get(vm.api.power.update, {
+        vm.$http.get(vm.api.update,  {
           params: {
             name: this.formData.name,
             flag: this.formData.flag,
@@ -214,7 +220,7 @@ export default {
       }
 
       if (this.addOrEdit == 1) {
-        vm.axios.get(vm.api.power.add, {
+        vm.$http.get(vm.api.add,  {
           params: {
             name: this.formData.name,
             flag: this.formData.flag,
@@ -244,7 +250,7 @@ export default {
       this.$confirm('确认删除', '提示', {
         type: 'warning'
       }).then(() => {
-        vm.axios.get(vm.api.power.delete, {
+        vm.$http.get(vm.api.delete,  {
           params: {
             code: row.code,
           }

+ 107 - 89
sources/client/vrv-platform/src/views/project/project.vue

@@ -10,9 +10,7 @@
           <el-form-item label="项目编号">
             <el-input placeholder="项目编号" size="small" v-model="searchFormData.number"></el-input>
           </el-form-item>
-          <el-form-item label="项目描述">
-            <el-input placeholder="项目描述" size="small" v-model="searchFormData.description"></el-input>
-          </el-form-item>
+
           <el-form-item label="客户名称">
             <el-input placeholder="客户名称" size="small" v-model="searchFormData.customer"></el-input>
           </el-form-item>
@@ -50,7 +48,7 @@
               <el-form-item label="项目编号">
                 <el-input v-model="formData.number"></el-input>
               </el-form-item>
-              <el-form-item label="项目编号">
+              <el-form-item label="项目描述">
                 <el-input v-model="formData.description"></el-input>
               </el-form-item>
               <el-form-item label="客户名称">
@@ -96,7 +94,7 @@
 
           <el-table-column label="操作">
             <template slot-scope="scope">
-              <el-button type="primary" size="small" @click="showEdit(scope.row)">修改</el-button>
+              <el-button type="primary" size="small" @click="showEdit(scope.row)">编辑</el-button>
               <el-button type="danger" size="small" @click="del(scope.row)">删除</el-button>
               <el-button type="primary" size="small" @click="gateway">网关</el-button>
             </template>
@@ -105,12 +103,12 @@
         </el-table>
 
         <el-pagination
-          background
-          layout="prev, pager, next"
-          :page-size="pager.pageSize"
-          :current-page="pager.pageIndex"
-          :total="pager.itemCount"
-          @current-change="handleCurrentChange"
+            background
+            layout="prev, pager, next"
+            :page-size="pager.pageSize"
+            :current-page="pager.pageIndex"
+            :total="pager.itemCount"
+            @current-change="handleCurrentChange"
         >
         </el-pagination>
       </el-main>
@@ -121,12 +119,19 @@
 
 
 <script>
-import axios from "axios";
+
 
 export default {
   name: 'project',
   data() {
     return {
+      api: {
+        list: this.$api.project.list,
+        delete: this.$api.project.delete,
+        add: this.$api.project.add,
+        update: this.$api.project.update,
+      },
+
       addOrEdit: 1,
 
       dialogFormVisible: false,
@@ -138,16 +143,16 @@ export default {
       },
 
       tableData:
-        [{
-          name: '1',
-          number: '1',
-          description: '1',
-          customer: '1',
-          customerTel: '1',
-          province: '1',
-          city: '1',
-          address: '1',
-        }],
+          [{
+            name: '1',
+            number: '1',
+            description: '1',
+            customer: '1',
+            customerTel: '1',
+            province: '1',
+            city: '1',
+            address: '1',
+          }],
       formData: {
         name: '1',
         number: '1',
@@ -162,16 +167,16 @@ export default {
         valid: '',
       },
       searchFormData:
-        {
-          name: '',
-          number: '',
-          customer: '',
-          customerTel: '',
-          province: '',
-          city: '',
-          address: '',
-          operatorNumber: '',
-        }
+          {
+            name: '',
+            number: '',
+            customer: '',
+            customerTel: '',
+            province: '',
+            city: '',
+            address: '',
+            operatorNumber: '',
+          }
     }
   },
 
@@ -187,7 +192,7 @@ export default {
 
     loadData(index) {
       const vm = this;
-      vm.axios.get('http://localhost:8088/project/list', {
+      vm.$http.get(vm.api.list, {
         params: {
           pageSize: 5,
           pageIndex: index ? index : 1,
@@ -202,16 +207,16 @@ export default {
           operatorNumber: this.searchFormData.operatorNumber,
         }
       })
-        .then((response) => {
-          // vm.paper = response.data.data.paper;
-          //console.log(response.data.data);
+          .then((response) => {
+            // vm.paper = response.data.data.paper;
+            //console.log(response.data.data);
 
-          vm.pager = response.data.data.pager
+            vm.pager = response.data.data.pager
 
-          vm.tableData = response.data.data.projects;
-        })
+            vm.tableData = response.data.data.projects;
+          })
     },
-    search(searchFormData) {
+    search() {
       //console.log(this.searchFormData)
       this.loadData();
     },
@@ -220,13 +225,14 @@ export default {
 
       this.formData.name = '';
       this.formData.province = '';
+      this.formData.description = '';
       this.formData.city = '';
       this.formData.customer = '';
       this.formData.customerTel = '';
       this.formData.address = '';
       this.formData.number = '';
       this.formData.operatorNumber = '',
-        this.formData.description = '';
+          this.formData.description = '';
 
       this.addOrEdit = 1
     },
@@ -246,7 +252,7 @@ export default {
     addOrEditMehtond() {
       const vm = this;
       if (this.addOrEdit == 2) {
-        vm.axios.get('http://localhost:8088/project/update', {
+        vm.$http.get(vm.api.update, {
           params: {
             code: this.formData.code,
             name: this.formData.name,
@@ -261,32 +267,31 @@ export default {
 
           }
         })
-          .then((response) => {
-            console.log(response)
+            .then((response) => {
+              console.log(response)
 
 
-            if (response.data.status == 200) {
+              if (response.data.status == 200) {
 
-              this.$message({
-                type: 'success',
-                showClose: true,
-                message: response.data.desc
-              })
-            }
+                this.$message({
+                  type: 'success',
+                  showClose: true,
+                  message: response.data.desc
+                })
+              }
 
-            this.dialogFormVisible = false;
+              this.dialogFormVisible = false;
 
-            this.loadData();
+              this.loadData();
 
-          })
-          .catch(() => {
-          });
+            })
+            .catch(() => {
+            });
       }
 
       if (this.addOrEdit == 1) {
-        vm.axios.get('http://localhost:8088/project/add', {
+        vm.$http.get(vm.api.add, {
           params: {
-            code: this.formData.code,
             name: this.formData.name,
             number: this.formData.number,
             description: this.formData.description,
@@ -298,20 +303,33 @@ export default {
             customerTel: this.formData.customerTel,
           }
         })
-          .then((response) => {
-            if (response.data.status == 200) {
+            .then((response) => {
 
-              this.dialogFormVisible = false;
+              if (response.data.status == 200) {
 
-              this.$message({
-                type: 'success',
-                showClose: true,
-                message: response.data.desc
-              })
+                this.dialogFormVisible = false;
 
-              this.loadData();
-            }
-          })
+                this.$message({
+                  type: 'success',
+                  showClose: true,
+                  message: response.data.desc
+                })
+
+                this.loadData();
+              }
+              if (response.data.status == 500) {
+
+                this.dialogFormVisible = false;
+
+                this.$message({
+                  type: 'error',
+                  showClose: true,
+                  message: '未找到运营商'
+                })
+
+                this.loadData();
+              }
+            })
       }
     },
 
@@ -320,31 +338,31 @@ export default {
       this.$confirm('确认删除', '提示', {
         type: 'warning'
       }).then(() => {
-        vm.axios.get('http://localhost:8088/project/delete', {
+        vm.$http.get(vm.api.delete, {
           params: {
             code: row.code,
           }
         })
-          .then((response) => {
-            console.log(response)
-            if (response.data.status == 200) {
-              this.$message({
-                type: 'success',
-                showClose: true,
-                message: response.data.desc
-              })
-
-            }
-            this.loadData();
-          })
+            .then((response) => {
+              console.log(response)
+              if (response.data.status == 200) {
+                this.$message({
+                  type: 'success',
+                  showClose: true,
+                  message: response.data.desc
+                })
+
+              }
+              this.loadData();
+            })
       })
-        .catch(() => {
-          this.$message({
-            type: 'info',
-            showClose: true,
-            message: '取消删除'
-          })
-        });
+          .catch(() => {
+            this.$message({
+              type: 'info',
+              showClose: true,
+              message: '取消删除'
+            })
+          });
     },
     cancel() {
       this.$message({

+ 13 - 7
sources/client/vrv-platform/src/views/roleSet/list.vue

@@ -1,5 +1,5 @@
 <template>
-  <div id="user">
+  <div id="role">
     <el-main>
       <el-form :inline="true" :model="searchFormData">
         <el-form-item label="角色名称">
@@ -75,9 +75,15 @@
 
 <script>
 export default {
-  name: 'user',
+  name: 'role',
   data() {
     return {
+      api: {
+        list: this.$api.role.list,
+        delete: this.$api.role.delete,
+        add: this.$api.role.add,
+        update: this.$api.role.update,
+      },
 
       addOrEdit: 1,
 
@@ -121,7 +127,7 @@ export default {
 
     loadData(index) {
       const vm = this;
-      vm.axios.get(vm.api.role.list, {
+      vm.$http.get(vm.api.list,  {
         params: {
           pageSize: 3,
           pageIndex: index ? index : 1,
@@ -141,7 +147,7 @@ export default {
           vm.tableData = response.data.data.roles;
         })
     },
-    search(searchFormData) {
+    search() {
       //console.log(this.searchFormData)
       this.loadData();
     },
@@ -171,7 +177,7 @@ export default {
     addOrEditMehtond() {
       const vm = this;
       if (this.addOrEdit == 2) {
-        vm.axios.get(vm.api.role.update, {
+        vm.$http.get(vm.api.update,  {
           params: {
             name: this.formData.name,
             flag: this.formData.flag,
@@ -201,7 +207,7 @@ export default {
       }
 
       if (this.addOrEdit == 1) {
-        vm.axios.get(vm.api.role.add, {
+        vm.$http.get(vm.api.add,  {
           params: {
             name: this.formData.name,
             flag: this.formData.flag,
@@ -230,7 +236,7 @@ export default {
       this.$confirm('确认删除', '提示', {
         type: 'warning'
       }).then(() => {
-        vm.axios.get(vm.api.role.delete, {
+        vm.$http.get(vm.api.delete,  {
           params: {
             code: row.code,
           }

+ 11 - 6
sources/client/vrv-platform/src/views/user/list.vue

@@ -96,6 +96,12 @@ export default {
   name: 'user',
   data() {
     return {
+      api: {
+        list: this.$api.user.list,
+        delete: this.$api.user.delete,
+        add: this.$api.user.add,
+        update: this.$api.user.update,
+      },
 
       addOrEdit: 1,
 
@@ -151,7 +157,7 @@ export default {
 
     loadData(index) {
       const vm = this;
-      vm.axios.get(vm.api.user.list, {
+      vm.$http.get(vm.api.list,  {
         params: {
           pageSize: 3,
           pageIndex: index ? index : 1,
@@ -172,7 +178,7 @@ export default {
           vm.tableData = response.data.data.users;
         })
     },
-    search(searchFormData) {
+    search() {
       //console.log(this.searchFormData)
       this.loadData();
     },
@@ -204,7 +210,7 @@ export default {
     addOrEditMehtond() {
       const vm = this;
       if (this.addOrEdit == 2) {
-        vm.axios.get(vm.api.user.update, {
+        vm.$http.get(vm.api.update,  {
           params: {
             code: this.formData.code,
             realname: this.formData.realname,
@@ -237,9 +243,8 @@ export default {
       }
 
       if (this.addOrEdit == 1) {
-        vm.axios.get(vm.api.user.add, {
+        vm.$http.get(vm.api.add,  {
           params: {
-            code: this.formData.code,
             realname: this.formData.realname,
             account: this.formData.account,
             roleFlag: this.formData.roleFlag,
@@ -270,7 +275,7 @@ export default {
       this.$confirm('确认删除', '提示', {
         type: 'warning'
       }).then(() => {
-        vm.axios.get(vm.api.user.delete, {
+        vm.$http.get(vm.api.delete,  {
           params: {
             code: row.code,
           }

+ 21 - 0
sources/client/vrv-platform/vue.config.js

@@ -0,0 +1,21 @@
+
+
+module.exports = {
+    transpileDependencies: [
+        // 'vue-echarts',
+        // 'resize-detector'
+    ],
+    devServer: {
+        port: 8081,
+        proxy: {
+            '/api': {
+              target: 'http://127.0.0.1:5030',
+                changeOrigin: true,
+                ws: true,
+                pathRewrite: {
+                    '^/api': ''
+                }
+            }
+        }
+    },
+};

File diff suppressed because it is too large
+ 4369 - 2430
sources/client/vrv-platform/yarn.lock


+ 4 - 0
sources/server/vrv/vrv-core-service/src/main/java/com/kuyuntech/vrv/coreservice/service/core/impl/ProjectServiceImpl.java

@@ -70,6 +70,10 @@ public class ProjectServiceImpl extends AbstractFastbootService<Project, Project
         //下拉列表直接查数据库已有的运营商,不存在运营商不匹配的情况
         Operator operator = operatorDao.findByNumberAndValid(operatorNumber, VALID);
 
+        if (operator == null) {
+            return null;
+        }
+
         project.setOperatorCode(operator.getCode());
 
         projectDao.save(project);

+ 6 - 2
sources/server/vrv/vrv-platform/src/main/java/com/kuyuntech/vrv/platform/controller/auth/AuthController.java

@@ -66,8 +66,10 @@ public class AuthController {
         VerifyCodeBean verifyCodeBean = this.verifyCodeService.add(VerifyCodeBean.builder().type(VerifyCodeType.IMG).verified(VerifyCodeStatus.UN_VERIFY).expireTime(verifyCodeExpireTime).verifyCode(verifyCode).build());
 
         request.getSession().setAttribute("verifyCodeBean", verifyCodeBean);
+
         response.setContentType("application/force-download");
         response.setHeader("Content-Disposition", "attachment; filename=" + URLEncoder.encode(verifyCode, "UTF-8"));
+
         ValidateCodeGenerator.outputImage(width != null ? width : 300, height != null ? height : 100, response.getOutputStream(), verifyCode);
 
     }
@@ -79,7 +81,9 @@ public class AuthController {
         //校验验证码是否正确
         if (this.verifyCodeCheck) {
 
-            String verifyCode = (String) request.getSession().getAttribute("verifyCode");
+            VerifyCodeBean verifyCodeBean = (VerifyCodeBean) request.getSession().getAttribute("verifyCodeBean");
+
+            String verifyCode = verifyCodeBean.getVerifyCode();
 
             if (StringUtils.isEmpty(userBean.getVerifyCode())) {
                 return ParamErrorResultBuilder.newBuilder().paramError("verifyCode", "验证码不能为空").build();
@@ -111,7 +115,7 @@ public class AuthController {
             return ResponseBean.serverError("账号或密码错误");
         }
 
-        request.getSession().removeAttribute("verifyCode");
+        request.getSession().removeAttribute("verifyCodeBean");
 
         request.getSession().setAttribute("userBean", userBean);
 

+ 5 - 4
sources/server/vrv/vrv-platform/src/main/resources/application-dev.properties

@@ -1,7 +1,8 @@
-#数据源信息
-spring.datasource.url=jdbc:mysql://localhost:3306/vrv-platform?serverTimezone=GMT%2B8&useLegacyDatetimeCode=false&useUnicode=true&characterEncoding=utf-8&useSSL=false
-spring.datasource.username=root
+#\u6570\u636E\u6E90\u4FE1\u606F
+spring.datasource.url=jdbc:mysql://${DB_HOST:nat.kuyuntech.com}:${DB_PORT:19834}/${DB_NAME:vrv}?&useLegacyDatetimeCode=false&useUnicode=true&characterEncoding=utf-8&useSSL=false&useTimezone=true&serverTimezone=CTT
+spring.datasource.username=${DB_USER:root}
+spring.datasource.password=${DB_PWD:123456}
 spring.datasource.driverClassName=com.mysql.jdbc.Driver
 spring.jpa.properties.hibernate.hbm2ddl.auto=update
 spring.jpa.properties.hibernate.format_sql=true
-spring.jpa.show-sql=true
+spring.jpa.show-sql=true