Преглед изворни кода

后台管理系统前端代码

sunyadv пре 5 година
родитељ
комит
6b098fd713
74 измењених фајлова са 21384 додато и 0 уклоњено
  1. 5 0
      lib_vue/.babelrc
  2. 8 0
      lib_vue/.gitignore
  3. 21 0
      lib_vue/LICENSE
  4. 0 0
      lib_vue/README.md
  5. 35 0
      lib_vue/build/build.js
  6. 48 0
      lib_vue/build/check-versions.js
  7. 9 0
      lib_vue/build/dev-client.js
  8. 89 0
      lib_vue/build/dev-server.js
  9. 72 0
      lib_vue/build/utils.js
  10. 12 0
      lib_vue/build/vue-loader.conf.js
  11. 67 0
      lib_vue/build/webpack.base.conf.js
  12. 38 0
      lib_vue/build/webpack.dev.conf.js
  13. 123 0
      lib_vue/build/webpack.prod.conf.js
  14. BIN
      lib_vue/cloud.ico
  15. 6 0
      lib_vue/config/dev.env.js
  16. 41 0
      lib_vue/config/index.js
  17. 3 0
      lib_vue/config/prod.env.js
  18. 123 0
      lib_vue/index.html
  19. 9562 0
      lib_vue/package-lock.json
  20. 76 0
      lib_vue/package.json
  21. 59 0
      lib_vue/src/App.vue
  22. 17 0
      lib_vue/src/api/api.js
  23. 3 0
      lib_vue/src/api/index.js
  24. BIN
      lib_vue/src/assets/bg1.jpg
  25. 539 0
      lib_vue/src/assets/iconfont/demo.css
  26. 377 0
      lib_vue/src/assets/iconfont/demo_index.html
  27. 53 0
      lib_vue/src/assets/iconfont/iconfont.css
  28. BIN
      lib_vue/src/assets/iconfont/iconfont.eot
  29. 1 0
      lib_vue/src/assets/iconfont/iconfont.js
  30. 53 0
      lib_vue/src/assets/iconfont/iconfont.svg
  31. BIN
      lib_vue/src/assets/iconfont/iconfont.ttf
  32. BIN
      lib_vue/src/assets/iconfont/iconfont.woff
  33. BIN
      lib_vue/src/assets/iconfont/iconfont.woff2
  34. BIN
      lib_vue/src/assets/image/404.png
  35. BIN
      lib_vue/src/assets/image/close.gif
  36. BIN
      lib_vue/src/assets/image/head_logo.png
  37. BIN
      lib_vue/src/assets/image/login_center.png
  38. BIN
      lib_vue/src/assets/image/login_logo.png
  39. BIN
      lib_vue/src/assets/image/userHead.jpg
  40. BIN
      lib_vue/src/assets/image/userHead.png
  41. BIN
      lib_vue/src/assets/logo.png
  42. BIN
      lib_vue/src/assets/logo4.png
  43. 72 0
      lib_vue/src/common/js/util.js
  44. 0 0
      lib_vue/src/components/.gitkeep
  45. 198 0
      lib_vue/src/http.js
  46. 103 0
      lib_vue/src/main.js
  47. 25 0
      lib_vue/src/mock/data/user.js
  48. 3 0
      lib_vue/src/mock/index.js
  49. 153 0
      lib_vue/src/mock/mock.js
  50. 118 0
      lib_vue/src/port.js
  51. 113 0
      lib_vue/src/routes.js
  52. 1 0
      lib_vue/src/styles/vars.scss
  53. 61 0
      lib_vue/src/views/404.vue
  54. 726 0
      lib_vue/src/views/Home.vue
  55. 136 0
      lib_vue/src/views/Login.vue
  56. 639 0
      lib_vue/src/views/base/allocation.vue
  57. 476 0
      lib_vue/src/views/base/comp.vue
  58. 601 0
      lib_vue/src/views/base/factory.vue
  59. 173 0
      lib_vue/src/views/detection/detection.vue
  60. 726 0
      lib_vue/src/views/detection/maintenance.vue
  61. 151 0
      lib_vue/src/views/invite.vue
  62. 344 0
      lib_vue/src/views/map/map.vue
  63. 264 0
      lib_vue/src/views/message.vue
  64. 1776 0
      lib_vue/src/views/mold/moldDetail.vue
  65. 250 0
      lib_vue/src/views/mold/moldDownload.vue
  66. 459 0
      lib_vue/src/views/mold/moldList.vue
  67. 296 0
      lib_vue/src/views/project/competence.vue
  68. 354 0
      lib_vue/src/views/project/project.vue
  69. 1139 0
      lib_vue/src/views/project/projectDetail.vue
  70. 547 0
      lib_vue/src/views/project/staff.vue
  71. 7 0
      lib_vue/src/vuex/actions.js
  72. 4 0
      lib_vue/src/vuex/getters.js
  73. 29 0
      lib_vue/src/vuex/store.js
  74. 0 0
      lib_vue/static/.gitkeep

+ 5 - 0
lib_vue/.babelrc

@@ -0,0 +1,5 @@
+{
+  "presets": ["es2015", "stage-2"],
+  "plugins": ["transform-runtime"],
+  "comments": false
+}

+ 8 - 0
lib_vue/.gitignore

@@ -0,0 +1,8 @@
+.DS_Store
+node_modules/
+npm-debug.log
+.editorconfig
+dist/
+.idea/misc.xml
+.idea/modules.xml
+.idea/workspace.xml

+ 21 - 0
lib_vue/LICENSE

@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2016-present taylorchen709
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.

+ 0 - 0
lib_vue/README.md


+ 35 - 0
lib_vue/build/build.js

@@ -0,0 +1,35 @@
+require('./check-versions')()
+
+process.env.NODE_ENV = 'production'
+
+var ora = require('ora')
+var rm = require('rimraf')
+var path = require('path')
+var chalk = require('chalk')
+var webpack = require('webpack')
+var config = require('../config')
+var webpackConfig = require('./webpack.prod.conf')
+
+var spinner = ora('building for production...')
+spinner.start()
+
+rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => {
+  if (err) throw err
+  webpack(webpackConfig, function (err, stats) {
+    spinner.stop()
+    if (err) throw err
+    process.stdout.write(stats.toString({
+      colors: true,
+      modules: false,
+      children: false,
+      chunks: false,
+      chunkModules: false
+    }) + '\n\n')
+
+    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'
+    ))
+  })
+})

+ 48 - 0
lib_vue/build/check-versions.js

@@ -0,0 +1,48 @@
+var chalk = require('chalk')
+var semver = require('semver')
+var packageConfig = require('../package.json')
+var shell = require('shelljs')
+function exec (cmd) {
+  return require('child_process').execSync(cmd).toString().trim()
+}
+
+var 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 () {
+  var warnings = []
+  for (var i = 0; i < versionRequirements.length; i++) {
+    var 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 (var i = 0; i < warnings.length; i++) {
+      var warning = warnings[i]
+      console.log('  ' + warning)
+    }
+    console.log()
+    process.exit(1)
+  }
+}

+ 9 - 0
lib_vue/build/dev-client.js

@@ -0,0 +1,9 @@
+/* eslint-disable */
+require('eventsource-polyfill')
+var hotClient = require('webpack-hot-middleware/client?noInfo=true&reload=true')
+
+hotClient.subscribe(function (event) {
+  if (event.action === 'reload') {
+    window.location.reload()
+  }
+})

+ 89 - 0
lib_vue/build/dev-server.js

@@ -0,0 +1,89 @@
+require('./check-versions')()
+
+var config = require('../config')
+if (!process.env.NODE_ENV) {
+  process.env.NODE_ENV = JSON.parse(config.dev.env.NODE_ENV)
+}
+
+var opn = require('opn')
+var path = require('path')
+var express = require('express')
+var webpack = require('webpack')
+var proxyMiddleware = require('http-proxy-middleware')
+var webpackConfig = require('./webpack.dev.conf')
+
+// default port where dev server listens for incoming traffic
+var port = process.env.PORT || config.dev.port
+// automatically open browser, if not set will be false
+var autoOpenBrowser = !!config.dev.autoOpenBrowser
+// Define HTTP proxies to your custom API backend
+// https://github.com/chimurai/http-proxy-middleware
+var proxyTable = config.dev.proxyTable
+
+var app = express()
+var compiler = webpack(webpackConfig)
+
+var devMiddleware = require('webpack-dev-middleware')(compiler, {
+  publicPath: webpackConfig.output.publicPath,
+  quiet: true
+})
+
+var hotMiddleware = require('webpack-hot-middleware')(compiler, {
+  log: () => {}
+})
+// force page reload when html-webpack-plugin template changes
+compiler.plugin('compilation', function (compilation) {
+  compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) {
+    hotMiddleware.publish({ action: 'reload' })
+    cb()
+  })
+})
+
+// proxy api requests
+Object.keys(proxyTable).forEach(function (context) {
+  var options = proxyTable[context]
+  if (typeof options === 'string') {
+    options = { target: options }
+  }
+  app.use(proxyMiddleware(options.filter || context, options))
+})
+
+// handle fallback for HTML5 history API
+app.use(require('connect-history-api-fallback')())
+
+// serve webpack bundle output
+app.use(devMiddleware)
+
+// enable hot-reload and state-preserving
+// compilation error display
+app.use(hotMiddleware)
+
+// serve pure static assets
+var staticPath = path.posix.join(config.dev.assetsPublicPath, config.dev.assetsSubDirectory)
+app.use(staticPath, express.static('./static'))
+
+var uri = 'http://localhost:' + port
+
+var _resolve
+var readyPromise = new Promise(resolve => {
+  _resolve = resolve
+})
+
+console.log('> Starting dev server...')
+devMiddleware.waitUntilValid(() => {
+  console.log('> Listening at ' + uri + '\n')
+  // when env is testing, don't need open it
+  if (autoOpenBrowser && process.env.NODE_ENV !== 'testing') {
+    opn(uri)
+  }
+  _resolve()
+})
+
+var server = app.listen(port)
+
+module.exports = {
+  ready: readyPromise,
+  close: () => {
+    server.close()
+  }
+}

+ 72 - 0
lib_vue/build/utils.js

@@ -0,0 +1,72 @@
+var path = require('path')
+var config = require('../config')
+var ExtractTextPlugin = require('extract-text-webpack-plugin')
+
+exports.assetsPath = function (_path) {
+  var assetsSubDirectory = process.env.NODE_ENV === 'production'
+    ? config.build.assetsSubDirectory
+    : config.dev.assetsSubDirectory
+  return path.posix.join(assetsSubDirectory, _path)
+}
+
+exports.cssLoaders = function (options) {
+  options = options || {}
+
+  var cssLoader = {
+    loader: 'css-loader',
+    options: {
+      //minimize: process.env.NODE_ENV === 'production',
+      sourceMap: options.sourceMap
+    }
+  }
+
+  // generate loader string to be used with extract text plugin
+  function generateLoaders (loader, loaderOptions) {
+    var loaders = [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',
+        publicPath: '../../'
+      })
+    } 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) {
+  var output = []
+  var loaders = exports.cssLoaders(options)
+  for (var extension in loaders) {
+    var loader = loaders[extension]
+    output.push({
+      test: new RegExp('\\.' + extension + '$'),
+      use: loader
+    })
+  }
+  return output
+}

+ 12 - 0
lib_vue/build/vue-loader.conf.js

@@ -0,0 +1,12 @@
+var utils = require('./utils')
+var config = require('../config')
+var isProduction = process.env.NODE_ENV === 'production'
+
+module.exports = {
+  loaders: utils.cssLoaders({
+    sourceMap: isProduction
+      ? config.build.productionSourceMap
+      : config.dev.cssSourceMap,
+    extract: isProduction
+  })
+}

+ 67 - 0
lib_vue/build/webpack.base.conf.js

@@ -0,0 +1,67 @@
+var path = require('path')
+var utils = require('./utils')
+var config = require('../config')
+var vueLoaderConfig = require('./vue-loader.conf')
+var webpack = require("webpack")
+
+function resolve(dir) {
+  return path.join(__dirname, '..', dir)
+}
+
+module.exports = {
+  entry: {
+    //app: './src/main.js'
+    app: ["babel-polyfill", "./src/main.js"]
+  },
+  output: {
+    path: config.build.assetsRoot,
+    filename: '[name].js',
+    publicPath: process.env.NODE_ENV === 'production'
+      ? config.build.assetsPublicPath
+      : config.dev.assetsPublicPath
+  },
+  resolve: {
+    extensions: ['.js', '.vue', '.json'],
+    alias: {
+      'vue$': 'vue/dist/vue.esm.js',
+      '@': resolve('src'),
+      'scss_vars': '@/styles/vars.scss'
+    }
+  },
+  plugins: [
+    new webpack.ProvidePlugin({
+      jQuery: 'jquery',
+      $: 'jquery'
+    })
+  ],
+  module: {
+    rules: [
+      {
+        test: /\.vue$/,
+        loader: 'vue-loader',
+        options: vueLoaderConfig
+      },
+      {
+        test: /\.js$/,
+        loader: 'babel-loader',
+        include: [resolve('src'), resolve('test')]
+      },
+      {
+        test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
+        loader: 'url-loader',
+        options: {
+          limit: 10000,
+          name: utils.assetsPath('img/[name].[hash:7].[ext]')
+        }
+      },
+      {
+        test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
+        loader: 'url-loader',
+        options: {
+          limit: 10000,
+          name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
+        }
+      }
+    ]
+  }
+}

+ 38 - 0
lib_vue/build/webpack.dev.conf.js

@@ -0,0 +1,38 @@
+var utils = require('./utils')
+var webpack = require('webpack')
+var config = require('../config')
+var merge = require('webpack-merge')
+var baseWebpackConfig = require('./webpack.base.conf')
+var HtmlWebpackPlugin = require('html-webpack-plugin')
+var FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin')
+
+// add hot-reload related code to entry chunks
+Object.keys(baseWebpackConfig.entry).forEach(function (name) {
+  baseWebpackConfig.entry[name] = ['./build/dev-client'].concat(baseWebpackConfig.entry[name])
+})
+
+module.exports = merge(baseWebpackConfig, {
+  module: {
+    rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap })
+  },
+  // cheap-module-eval-source-map is faster for development
+  devtool: '#cheap-module-eval-source-map',
+  plugins: [
+    new webpack.DefinePlugin({
+      'process.env': config.dev.env,
+      'BASE_URL' : '"/api"',
+      'LINK_URL' : '"/ips"'
+    }),
+    // https://github.com/glenjamin/webpack-hot-middleware#installation--usage
+    new webpack.HotModuleReplacementPlugin(),
+    new webpack.NoEmitOnErrorsPlugin(),
+    // https://github.com/ampedandwired/html-webpack-plugin
+    new HtmlWebpackPlugin({
+      filename: 'index.html',
+      template: 'index.html',
+      inject: true,
+      favicon: './cloud.ico'
+    }),
+    new FriendlyErrorsPlugin()
+  ]
+})

+ 123 - 0
lib_vue/build/webpack.prod.conf.js

@@ -0,0 +1,123 @@
+var path = require('path')
+var utils = require('./utils')
+var webpack = require('webpack')
+var config = require('../config')
+var merge = require('webpack-merge')
+var baseWebpackConfig = require('./webpack.base.conf')
+var CopyWebpackPlugin = require('copy-webpack-plugin')
+var HtmlWebpackPlugin = require('html-webpack-plugin')
+var ExtractTextPlugin = require('extract-text-webpack-plugin')
+var OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin')
+
+var env = config.build.env
+
+var webpackConfig = merge(baseWebpackConfig, {
+  module: {
+    rules: utils.styleLoaders({
+      sourceMap: config.build.productionSourceMap,
+      extract: true
+    })
+  },
+  devtool: config.build.productionSourceMap ? '#source-map' : 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,
+      'BASE_URL' : '"/api"',
+      'LINK_URL' : '"/ips"'
+    }),
+    new webpack.optimize.UglifyJsPlugin({
+      compress: {
+        warnings: false
+      },
+      sourceMap: true
+    }),
+    // extract css into its own file
+    new ExtractTextPlugin({
+      filename: utils.assetsPath('css/[name].[contenthash].css')
+    }),
+    // Compress extracted CSS. We are using this plugin so that possible
+    // duplicated CSS from different components can be deduped.
+    new OptimizeCSSPlugin({
+      cssProcessorOptions: {
+        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,
+      favicon: './cloud.ico',
+      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'
+    }),
+    // split vendor js into its own file
+    new webpack.optimize.CommonsChunkPlugin({
+      name: 'vendor',
+      minChunks: function (module, count) {
+        // 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',
+      chunks: ['vendor']
+    }),
+    // copy custom static assets
+    new CopyWebpackPlugin([
+      {
+        from: path.resolve(__dirname, '../static'),
+        to: config.build.assetsSubDirectory,
+        ignore: ['.*']
+      }
+    ])
+  ]
+})
+
+if (config.build.productionGzip) {
+  var 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) {
+  var BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
+  webpackConfig.plugins.push(new BundleAnalyzerPlugin())
+}
+
+module.exports = webpackConfig

BIN
lib_vue/cloud.ico


+ 6 - 0
lib_vue/config/dev.env.js

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

+ 41 - 0
lib_vue/config/index.js

@@ -0,0 +1,41 @@
+var path = require('path')
+
+module.exports = {
+  build: {
+    env: require('./prod.env'),
+    index: path.resolve(__dirname, '../dist/index.html'),
+    assetsRoot: path.resolve(__dirname, '../dist'),
+    assetsSubDirectory: 'static',
+    assetsPublicPath: './',
+    productionSourceMap: true,
+    productionGzip: false,
+    productionGzipExtensions: ['js', 'css'],
+    bundleAnalyzerReport: process.env.npm_config_report
+  },
+  dev: {
+    env: require('./dev.env'),
+    port: 8090,
+    autoOpenBrowser: true,
+    assetsSubDirectory: 'static',
+    assetsPublicPath: '/',
+    proxyTable: {
+        '/api': {    
+            target: 'http://192.168.101.6:8099',  // 接口域名 开发
+            secure: true,  // 如果是https接口,需要配置这个参数
+            changeOrigin: true,  //是否跨域
+            pathRewrite: { // 如果接口本身没有api的路径,那么这里将发送到后端的请求重写为没有api的路径
+                '^/api': '/' 
+            }
+        },
+        '/ips': {    
+            target: 'http://192.168.101.6:8080',  // 接口域名 开发
+            secure: true,  // 如果是https接口,需要配置这个参数
+            changeOrigin: true,  //是否跨域
+            pathRewrite: { // 如果接口本身没有api的路径,那么这里将发送到后端的请求重写为没有api的路径
+                '^/ips': '/' 
+            }
+        },
+    },
+    cssSourceMap: false
+  }
+}

+ 3 - 0
lib_vue/config/prod.env.js

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

+ 123 - 0
lib_vue/index.html

@@ -0,0 +1,123 @@
+<!DOCTYPE html>
+<html>
+    <head>
+        <meta charset="utf-8">
+        <title>云塑网后台管理系统</title>
+        <link rel="shortcut icon" type="image/x-icon" href="./cloud.ico" /> 
+        <!-- 高德地图 -->
+        <script type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.15&key=362cff852a3a37d328f9697352eebacd"></script>
+        <!-- 高德地图UI组件库 1.0 -->
+        <script src="//webapi.amap.com/ui/1.0/main.js"></script>
+        <style>
+            /* 地图弹窗样式 */
+            .window {
+                background: #fff;
+                padding: 0px 0px 10px;
+                border:1px solid silver;
+                border-radius: 5px;
+            }
+
+            .info-top {
+                position: relative;
+                background: none repeat scroll 0 0 #F9F9F9;
+                border-bottom: 1px solid #CCC;
+                border-radius: 5px 5px 0 0;
+            }
+
+            div.info-top div {
+                display: inline-block;
+                color: #333333;
+                font-size: 14px;
+                font-weight: bold;
+                line-height: 31px;
+                padding: 0 10px;
+            }
+
+            div.info-top div span {
+                font-size:11px;
+                color:#F00;
+            }
+
+            div.info-top i {
+                position: absolute;
+                top: 10px;
+                right: 10px;
+                transition-duration: 0.25s;
+                cursor: pointer;
+            }
+
+            div.info-middle {
+                font-size: 12px;
+                padding: 10px 6px;
+                line-height: 20px;
+                background-color: #fff;
+            }
+
+            div.info-item {
+                width: 300px;
+                height: 30px;
+                line-height: 30px;
+                padding:0 8px;
+            }
+
+            div.info-item a {
+                color: #20a0ff;
+                cursor: pointer;
+            }
+
+            span.info-state {
+                float:right;
+            }
+
+            span.info-ball {
+                display: inline-block;
+                width:10px;
+                height:10px;
+                border-radius: 50%;
+                margin-right: 10px;
+                line-height: 30px;
+            }
+            
+            .customWidth {
+                width: 675px!important;
+            }
+
+            .activeNames .el-collapse-item__wrap {
+                border-bottom: none; 
+            }
+
+            /* 滚动条样式修改 */
+            /*滚动条凹槽的颜色,还可以设置边框属性 */
+            ::-webkit-scrollbar-track-piece {
+                background-color:#f8f8f8;
+                -webkit-border-radius: 2em;
+                -moz-border-radius: 2em;
+                border-radius: 2em;
+            }
+            /*滚动条的宽度*/
+            ::-webkit-scrollbar {
+                width:9px;
+            height: 9px;}
+            /*滚动条的设置*/
+            ::-webkit-scrollbar-thumb {
+                background-color:#dddddd;
+                background-clip:padding-box;
+                -webkit-border-radius: 2em;
+                -moz-border-radius: 2em;
+                border-radius: 2em;}
+
+            /*滚动条鼠标移上去*/
+            ::-webkit-scrollbar-thumb:hover {
+                background-color:#bbb;
+            }
+
+            /*取消消息列表弹出框的内边距*/
+            .popover-self {
+                padding: 0 !important;
+            }    
+        </style>
+    </head>
+    <body>
+        <div id="app"></div>
+    </body>
+</html>

Разлика између датотеке није приказан због своје велике величине
+ 9562 - 0
lib_vue/package-lock.json


+ 76 - 0
lib_vue/package.json

@@ -0,0 +1,76 @@
+{
+  "name": "ym_admin",
+  "version": "1.0.5",
+  "description": "ym_admin project",
+  "author": "taylor <709161610@qq.com>",
+  "license": "MIT",
+  "scripts": {
+    "dev": "node build/dev-server.js",
+    "start": "node build/dev-server.js",
+    "build": "node build/build.js"
+  },
+  "dependencies": {
+    "axios": "^0.15.3",
+    "echarts": "^3.8.5",
+    "element-ui": "^2.10.1",
+    "font-awesome": "^4.7.0",
+    "nprogress": "^0.2.0",
+    "vue": "^2.6.10",
+    "vue-clipboard2": "^0.3.0",
+    "vue-router": "^2.3.0",
+    "vuex": "^2.0.0-rc.6"
+  },
+  "devDependencies": {
+    "autoprefixer": "^6.7.2",
+    "axios-mock-adapter": "^1.7.1",
+    "babel-core": "^6.22.1",
+    "babel-loader": "^6.2.10",
+    "babel-plugin-transform-runtime": "^6.22.0",
+    "babel-polyfill": "^6.26.0",
+    "babel-preset-env": "^1.2.1",
+    "babel-preset-es2015": "^6.0.0",
+    "babel-preset-stage-2": "^6.22.0",
+    "babel-register": "^6.22.0",
+    "chalk": "^1.1.3",
+    "connect-history-api-fallback": "^1.3.0",
+    "copy-webpack-plugin": "^4.0.1",
+    "css-loader": "^0.26.1",
+    "eventsource-polyfill": "^0.9.6",
+    "express": "^4.14.1",
+    "extract-text-webpack-plugin": "^2.0.0",
+    "file-loader": "^0.10.0",
+    "friendly-errors-webpack-plugin": "^1.1.3",
+    "function-bind": "^1.0.2",
+    "html-webpack-plugin": "^2.28.0",
+    "http-proxy-middleware": "^0.17.3",
+    "json-loader": "^0.5.4",
+    "mockjs": "^1.0.1-beta3",
+    "node-sass": "^4.5.0",
+    "opn": "^4.0.2",
+    "optimize-css-assets-webpack-plugin": "^1.3.0",
+    "ora": "^1.0.0",
+    "qs": "^6.7.0",
+    "rimraf": "^2.6.0",
+    "sass-loader": "^6.0.0",
+    "semver": "^5.3.0",
+    "shelljs": "^0.7.6",
+    "url-loader": "^0.5.8",
+    "vue-loader": "^11.1.4",
+    "vue-style-loader": "^2.0.0",
+    "vue-template-compiler": "^2.2.4",
+    "webpack": "^2.7.0",
+    "webpack-bundle-analyzer": "^2.2.1",
+    "webpack-dev-middleware": "^1.10.0",
+    "webpack-hot-middleware": "^2.16.1",
+    "webpack-merge": "^2.6.1"
+  },
+  "engines": {
+    "node": ">= 4.0.0",
+    "npm": ">= 3.0.0"
+  },
+  "browserslist": [
+    "> 1%",
+    "last 2 versions",
+    "not ie <= 8"
+  ]
+}

+ 59 - 0
lib_vue/src/App.vue

@@ -0,0 +1,59 @@
+<template>
+	<div id="app">
+		<transition name="fade" mode="out-in">
+			<router-view></router-view>
+		</transition>
+	</div>
+</template>
+
+<script>
+    export default {
+        name: 'app',
+        components: {}
+    }
+</script>
+
+<style lang="scss">
+    body {
+        margin: 0px;
+        padding: 0px;
+        font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, SimSun, sans-serif;
+        font-size: 14px;
+        -webkit-font-smoothing: antialiased;
+    }
+
+    #app {
+        position: absolute;
+        top: 0px;
+        bottom: 0px;
+        width: 100%;
+    }
+
+    .el-submenu [class^=fa] {
+        vertical-align: baseline;
+        margin-right: 10px;
+    }
+
+    .el-menu-item [class^=fa] {
+        vertical-align: baseline;
+        margin-right: 10px;
+    }
+
+    .toolbar {
+        background: #f2f2f2;
+        padding: 10px;
+        .el-form-item {
+            margin-bottom: 10px;
+        }
+    }
+
+    .fade-enter-active,
+    .fade-leave-active {
+        transition: all .2s ease;
+    }
+
+    .fade-enter,
+    .fade-leave-active {
+        opacity: 0;
+    }
+</style>

+ 17 - 0
lib_vue/src/api/api.js

@@ -0,0 +1,17 @@
+import axios from 'axios';
+
+let base = '';
+
+export const requestLogin = params => { return axios.post(`${base}/login`, params).then(res => res.data); };
+
+export const getUserList = params => { return axios.get(`${base}/user/list`, { params: params }); };
+
+export const getUserListPage = params => { return axios.get(`${base}/user/listpage`, { params: params }); };
+
+export const removeUser = params => { return axios.get(`${base}/user/remove`, { params: params }); };
+
+export const batchRemoveUser = params => { return axios.get(`${base}/user/batchremove`, { params: params }); };
+
+export const editUser = params => { return axios.get(`${base}/user/edit`, { params: params }); };
+
+export const addUser = params => { return axios.get(`${base}/user/add`, { params: params }); };

+ 3 - 0
lib_vue/src/api/index.js

@@ -0,0 +1,3 @@
+import * as api from './api';
+
+export default api;

BIN
lib_vue/src/assets/bg1.jpg


+ 539 - 0
lib_vue/src/assets/iconfont/demo.css

@@ -0,0 +1,539 @@
+/* Logo 字体 */
+@font-face {
+  font-family: "iconfont logo";
+  src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834');
+  src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834#iefix') format('embedded-opentype'),
+    url('https://at.alicdn.com/t/font_985780_km7mi63cihi.woff?t=1545807318834') format('woff'),
+    url('https://at.alicdn.com/t/font_985780_km7mi63cihi.ttf?t=1545807318834') format('truetype'),
+    url('https://at.alicdn.com/t/font_985780_km7mi63cihi.svg?t=1545807318834#iconfont') format('svg');
+}
+
+.logo {
+  font-family: "iconfont logo";
+  font-size: 160px;
+  font-style: normal;
+  -webkit-font-smoothing: antialiased;
+  -moz-osx-font-smoothing: grayscale;
+}
+
+/* tabs */
+.nav-tabs {
+  position: relative;
+}
+
+.nav-tabs .nav-more {
+  position: absolute;
+  right: 0;
+  bottom: 0;
+  height: 42px;
+  line-height: 42px;
+  color: #666;
+}
+
+#tabs {
+  border-bottom: 1px solid #eee;
+}
+
+#tabs li {
+  cursor: pointer;
+  width: 100px;
+  height: 40px;
+  line-height: 40px;
+  text-align: center;
+  font-size: 16px;
+  border-bottom: 2px solid transparent;
+  position: relative;
+  z-index: 1;
+  margin-bottom: -1px;
+  color: #666;
+}
+
+
+#tabs .active {
+  border-bottom-color: #f00;
+  color: #222;
+}
+
+.tab-container .content {
+  display: none;
+}
+
+/* 页面布局 */
+.main {
+  padding: 30px 100px;
+  width: 960px;
+  margin: 0 auto;
+}
+
+.main .logo {
+  color: #333;
+  text-align: left;
+  margin-bottom: 30px;
+  line-height: 1;
+  height: 110px;
+  margin-top: -50px;
+  overflow: hidden;
+  *zoom: 1;
+}
+
+.main .logo a {
+  font-size: 160px;
+  color: #333;
+}
+
+.helps {
+  margin-top: 40px;
+}
+
+.helps pre {
+  padding: 20px;
+  margin: 10px 0;
+  border: solid 1px #e7e1cd;
+  background-color: #fffdef;
+  overflow: auto;
+}
+
+.icon_lists {
+  width: 100% !important;
+  overflow: hidden;
+  *zoom: 1;
+}
+
+.icon_lists li {
+  width: 100px;
+  margin-bottom: 10px;
+  margin-right: 20px;
+  text-align: center;
+  list-style: none !important;
+  cursor: default;
+}
+
+.icon_lists li .code-name {
+  line-height: 1.2;
+}
+
+.icon_lists .icon {
+  display: block;
+  height: 100px;
+  line-height: 100px;
+  font-size: 42px;
+  margin: 10px auto;
+  color: #333;
+  -webkit-transition: font-size 0.25s linear, width 0.25s linear;
+  -moz-transition: font-size 0.25s linear, width 0.25s linear;
+  transition: font-size 0.25s linear, width 0.25s linear;
+}
+
+.icon_lists .icon:hover {
+  font-size: 100px;
+}
+
+.icon_lists .svg-icon {
+  /* 通过设置 font-size 来改变图标大小 */
+  width: 1em;
+  /* 图标和文字相邻时,垂直对齐 */
+  vertical-align: -0.15em;
+  /* 通过设置 color 来改变 SVG 的颜色/fill */
+  fill: currentColor;
+  /* path 和 stroke 溢出 viewBox 部分在 IE 下会显示
+      normalize.css 中也包含这行 */
+  overflow: hidden;
+}
+
+.icon_lists li .name,
+.icon_lists li .code-name {
+  color: #666;
+}
+
+/* markdown 样式 */
+.markdown {
+  color: #666;
+  font-size: 14px;
+  line-height: 1.8;
+}
+
+.highlight {
+  line-height: 1.5;
+}
+
+.markdown img {
+  vertical-align: middle;
+  max-width: 100%;
+}
+
+.markdown h1 {
+  color: #404040;
+  font-weight: 500;
+  line-height: 40px;
+  margin-bottom: 24px;
+}
+
+.markdown h2,
+.markdown h3,
+.markdown h4,
+.markdown h5,
+.markdown h6 {
+  color: #404040;
+  margin: 1.6em 0 0.6em 0;
+  font-weight: 500;
+  clear: both;
+}
+
+.markdown h1 {
+  font-size: 28px;
+}
+
+.markdown h2 {
+  font-size: 22px;
+}
+
+.markdown h3 {
+  font-size: 16px;
+}
+
+.markdown h4 {
+  font-size: 14px;
+}
+
+.markdown h5 {
+  font-size: 12px;
+}
+
+.markdown h6 {
+  font-size: 12px;
+}
+
+.markdown hr {
+  height: 1px;
+  border: 0;
+  background: #e9e9e9;
+  margin: 16px 0;
+  clear: both;
+}
+
+.markdown p {
+  margin: 1em 0;
+}
+
+.markdown>p,
+.markdown>blockquote,
+.markdown>.highlight,
+.markdown>ol,
+.markdown>ul {
+  width: 80%;
+}
+
+.markdown ul>li {
+  list-style: circle;
+}
+
+.markdown>ul li,
+.markdown blockquote ul>li {
+  margin-left: 20px;
+  padding-left: 4px;
+}
+
+.markdown>ul li p,
+.markdown>ol li p {
+  margin: 0.6em 0;
+}
+
+.markdown ol>li {
+  list-style: decimal;
+}
+
+.markdown>ol li,
+.markdown blockquote ol>li {
+  margin-left: 20px;
+  padding-left: 4px;
+}
+
+.markdown code {
+  margin: 0 3px;
+  padding: 0 5px;
+  background: #eee;
+  border-radius: 3px;
+}
+
+.markdown strong,
+.markdown b {
+  font-weight: 600;
+}
+
+.markdown>table {
+  border-collapse: collapse;
+  border-spacing: 0px;
+  empty-cells: show;
+  border: 1px solid #e9e9e9;
+  width: 95%;
+  margin-bottom: 24px;
+}
+
+.markdown>table th {
+  white-space: nowrap;
+  color: #333;
+  font-weight: 600;
+}
+
+.markdown>table th,
+.markdown>table td {
+  border: 1px solid #e9e9e9;
+  padding: 8px 16px;
+  text-align: left;
+}
+
+.markdown>table th {
+  background: #F7F7F7;
+}
+
+.markdown blockquote {
+  font-size: 90%;
+  color: #999;
+  border-left: 4px solid #e9e9e9;
+  padding-left: 0.8em;
+  margin: 1em 0;
+}
+
+.markdown blockquote p {
+  margin: 0;
+}
+
+.markdown .anchor {
+  opacity: 0;
+  transition: opacity 0.3s ease;
+  margin-left: 8px;
+}
+
+.markdown .waiting {
+  color: #ccc;
+}
+
+.markdown h1:hover .anchor,
+.markdown h2:hover .anchor,
+.markdown h3:hover .anchor,
+.markdown h4:hover .anchor,
+.markdown h5:hover .anchor,
+.markdown h6:hover .anchor {
+  opacity: 1;
+  display: inline-block;
+}
+
+.markdown>br,
+.markdown>p>br {
+  clear: both;
+}
+
+
+.hljs {
+  display: block;
+  background: white;
+  padding: 0.5em;
+  color: #333333;
+  overflow-x: auto;
+}
+
+.hljs-comment,
+.hljs-meta {
+  color: #969896;
+}
+
+.hljs-string,
+.hljs-variable,
+.hljs-template-variable,
+.hljs-strong,
+.hljs-emphasis,
+.hljs-quote {
+  color: #df5000;
+}
+
+.hljs-keyword,
+.hljs-selector-tag,
+.hljs-type {
+  color: #a71d5d;
+}
+
+.hljs-literal,
+.hljs-symbol,
+.hljs-bullet,
+.hljs-attribute {
+  color: #0086b3;
+}
+
+.hljs-section,
+.hljs-name {
+  color: #63a35c;
+}
+
+.hljs-tag {
+  color: #333333;
+}
+
+.hljs-title,
+.hljs-attr,
+.hljs-selector-id,
+.hljs-selector-class,
+.hljs-selector-attr,
+.hljs-selector-pseudo {
+  color: #795da3;
+}
+
+.hljs-addition {
+  color: #55a532;
+  background-color: #eaffea;
+}
+
+.hljs-deletion {
+  color: #bd2c00;
+  background-color: #ffecec;
+}
+
+.hljs-link {
+  text-decoration: underline;
+}
+
+/* 代码高亮 */
+/* PrismJS 1.15.0
+https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript */
+/**
+ * prism.js default theme for JavaScript, CSS and HTML
+ * Based on dabblet (http://dabblet.com)
+ * @author Lea Verou
+ */
+code[class*="language-"],
+pre[class*="language-"] {
+  color: black;
+  background: none;
+  text-shadow: 0 1px white;
+  font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
+  text-align: left;
+  white-space: pre;
+  word-spacing: normal;
+  word-break: normal;
+  word-wrap: normal;
+  line-height: 1.5;
+
+  -moz-tab-size: 4;
+  -o-tab-size: 4;
+  tab-size: 4;
+
+  -webkit-hyphens: none;
+  -moz-hyphens: none;
+  -ms-hyphens: none;
+  hyphens: none;
+}
+
+pre[class*="language-"]::-moz-selection,
+pre[class*="language-"] ::-moz-selection,
+code[class*="language-"]::-moz-selection,
+code[class*="language-"] ::-moz-selection {
+  text-shadow: none;
+  background: #b3d4fc;
+}
+
+pre[class*="language-"]::selection,
+pre[class*="language-"] ::selection,
+code[class*="language-"]::selection,
+code[class*="language-"] ::selection {
+  text-shadow: none;
+  background: #b3d4fc;
+}
+
+@media print {
+
+  code[class*="language-"],
+  pre[class*="language-"] {
+    text-shadow: none;
+  }
+}
+
+/* Code blocks */
+pre[class*="language-"] {
+  padding: 1em;
+  margin: .5em 0;
+  overflow: auto;
+}
+
+:not(pre)>code[class*="language-"],
+pre[class*="language-"] {
+  background: #f5f2f0;
+}
+
+/* Inline code */
+:not(pre)>code[class*="language-"] {
+  padding: .1em;
+  border-radius: .3em;
+  white-space: normal;
+}
+
+.token.comment,
+.token.prolog,
+.token.doctype,
+.token.cdata {
+  color: slategray;
+}
+
+.token.punctuation {
+  color: #999;
+}
+
+.namespace {
+  opacity: .7;
+}
+
+.token.property,
+.token.tag,
+.token.boolean,
+.token.number,
+.token.constant,
+.token.symbol,
+.token.deleted {
+  color: #905;
+}
+
+.token.selector,
+.token.attr-name,
+.token.string,
+.token.char,
+.token.builtin,
+.token.inserted {
+  color: #690;
+}
+
+.token.operator,
+.token.entity,
+.token.url,
+.language-css .token.string,
+.style .token.string {
+  color: #9a6e3a;
+  background: hsla(0, 0%, 100%, .5);
+}
+
+.token.atrule,
+.token.attr-value,
+.token.keyword {
+  color: #07a;
+}
+
+.token.function,
+.token.class-name {
+  color: #DD4A68;
+}
+
+.token.regex,
+.token.important,
+.token.variable {
+  color: #e90;
+}
+
+.token.important,
+.token.bold {
+  font-weight: bold;
+}
+
+.token.italic {
+  font-style: italic;
+}
+
+.token.entity {
+  cursor: help;
+}

+ 377 - 0
lib_vue/src/assets/iconfont/demo_index.html

@@ -0,0 +1,377 @@
+<!DOCTYPE html>
+<html>
+<head>
+  <meta charset="utf-8"/>
+  <title>IconFont Demo</title>
+  <link rel="shortcut icon" href="https://gtms04.alicdn.com/tps/i4/TB1_oz6GVXXXXaFXpXXJDFnIXXX-64-64.ico" type="image/x-icon"/>
+  <link rel="stylesheet" href="https://g.alicdn.com/thx/cube/1.3.2/cube.min.css">
+  <link rel="stylesheet" href="demo.css">
+  <link rel="stylesheet" href="iconfont.css">
+  <script src="iconfont.js"></script>
+  <!-- jQuery -->
+  <script src="https://a1.alicdn.com/oss/uploads/2018/12/26/7bfddb60-08e8-11e9-9b04-53e73bb6408b.js"></script>
+  <!-- 代码高亮 -->
+  <script src="https://a1.alicdn.com/oss/uploads/2018/12/26/a3f714d0-08e6-11e9-8a15-ebf944d7534c.js"></script>
+</head>
+<body>
+  <div class="main">
+    <h1 class="logo"><a href="https://www.iconfont.cn/" title="iconfont 首页" target="_blank">&#xe86b;</a></h1>
+    <div class="nav-tabs">
+      <ul id="tabs" class="dib-box">
+        <li class="dib active"><span>Unicode</span></li>
+        <li class="dib"><span>Font class</span></li>
+        <li class="dib"><span>Symbol</span></li>
+      </ul>
+      
+      <a href="https://www.iconfont.cn/manage/index?manage_type=myprojects&projectId=1313295" target="_blank" class="nav-more">查看项目</a>
+      
+    </div>
+    <div class="tab-container">
+      <div class="content unicode" style="display: block;">
+          <ul class="icon_lists dib-box">
+          
+            <li class="dib">
+              <span class="icon iconfont">&#xe61f;</span>
+                <div class="name">地图</div>
+                <div class="code-name">&amp;#xe61f;</div>
+              </li>
+          
+            <li class="dib">
+              <span class="icon iconfont">&#xe669;</span>
+                <div class="name">编辑</div>
+                <div class="code-name">&amp;#xe669;</div>
+              </li>
+          
+            <li class="dib">
+              <span class="icon iconfont">&#xe612;</span>
+                <div class="name">项目管理</div>
+                <div class="code-name">&amp;#xe612;</div>
+              </li>
+          
+            <li class="dib">
+              <span class="icon iconfont">&#xe639;</span>
+                <div class="name">监测</div>
+                <div class="code-name">&amp;#xe639;</div>
+              </li>
+          
+            <li class="dib">
+              <span class="icon iconfont">&#xe76b;</span>
+                <div class="name">默认头像</div>
+                <div class="code-name">&amp;#xe76b;</div>
+              </li>
+          
+            <li class="dib">
+              <span class="icon iconfont">&#xe871;</span>
+                <div class="name">setting-fill</div>
+                <div class="code-name">&amp;#xe871;</div>
+              </li>
+          
+            <li class="dib">
+              <span class="icon iconfont">&#xe644;</span>
+                <div class="name">模型</div>
+                <div class="code-name">&amp;#xe644;</div>
+              </li>
+          
+            <li class="dib">
+              <span class="icon iconfont">&#xe8ec;</span>
+                <div class="name">caret-down</div>
+                <div class="code-name">&amp;#xe8ec;</div>
+              </li>
+          
+            <li class="dib">
+              <span class="icon iconfont">&#xe868;</span>
+                <div class="name">地图</div>
+                <div class="code-name">&amp;#xe868;</div>
+              </li>
+          
+          </ul>
+          <div class="article markdown">
+          <h2 id="unicode-">Unicode 引用</h2>
+          <hr>
+
+          <p>Unicode 是字体在网页端最原始的应用方式,特点是:</p>
+          <ul>
+            <li>兼容性最好,支持 IE6+,及所有现代浏览器。</li>
+            <li>支持按字体的方式去动态调整图标大小,颜色等等。</li>
+            <li>但是因为是字体,所以不支持多色。只能使用平台里单色的图标,就算项目里有多色图标也会自动去色。</li>
+          </ul>
+          <blockquote>
+            <p>注意:新版 iconfont 支持多色图标,这些多色图标在 Unicode 模式下将不能使用,如果有需求建议使用symbol 的引用方式</p>
+          </blockquote>
+          <p>Unicode 使用步骤如下:</p>
+          <h3 id="-font-face">第一步:拷贝项目下面生成的 <code>@font-face</code></h3>
+<pre><code class="language-css"
+>@font-face {
+  font-family: 'iconfont';
+  src: url('iconfont.eot');
+  src: url('iconfont.eot?#iefix') format('embedded-opentype'),
+      url('iconfont.woff2') format('woff2'),
+      url('iconfont.woff') format('woff'),
+      url('iconfont.ttf') format('truetype'),
+      url('iconfont.svg#iconfont') format('svg');
+}
+</code></pre>
+          <h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
+<pre><code class="language-css"
+>.iconfont {
+  font-family: "iconfont" !important;
+  font-size: 16px;
+  font-style: normal;
+  -webkit-font-smoothing: antialiased;
+  -moz-osx-font-smoothing: grayscale;
+}
+</code></pre>
+          <h3 id="-">第三步:挑选相应图标并获取字体编码,应用于页面</h3>
+<pre>
+<code class="language-html"
+>&lt;span class="iconfont"&gt;&amp;#x33;&lt;/span&gt;
+</code></pre>
+          <blockquote>
+            <p>"iconfont" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。</p>
+          </blockquote>
+          </div>
+      </div>
+      <div class="content font-class">
+        <ul class="icon_lists dib-box">
+          
+          <li class="dib">
+            <span class="icon iconfont icon-map"></span>
+            <div class="name">
+              地图
+            </div>
+            <div class="code-name">.icon-map
+            </div>
+          </li>
+          
+          <li class="dib">
+            <span class="icon iconfont icon-bianji"></span>
+            <div class="name">
+              编辑
+            </div>
+            <div class="code-name">.icon-bianji
+            </div>
+          </li>
+          
+          <li class="dib">
+            <span class="icon iconfont icon-ic_dashboard"></span>
+            <div class="name">
+              项目管理
+            </div>
+            <div class="code-name">.icon-ic_dashboard
+            </div>
+          </li>
+          
+          <li class="dib">
+            <span class="icon iconfont icon-jiance"></span>
+            <div class="name">
+              监测
+            </div>
+            <div class="code-name">.icon-jiance
+            </div>
+          </li>
+          
+          <li class="dib">
+            <span class="icon iconfont icon-morentouxiang"></span>
+            <div class="name">
+              默认头像
+            </div>
+            <div class="code-name">.icon-morentouxiang
+            </div>
+          </li>
+          
+          <li class="dib">
+            <span class="icon iconfont icon-setting-fill"></span>
+            <div class="name">
+              setting-fill
+            </div>
+            <div class="code-name">.icon-setting-fill
+            </div>
+          </li>
+          
+          <li class="dib">
+            <span class="icon iconfont icon-moxing"></span>
+            <div class="name">
+              模型
+            </div>
+            <div class="code-name">.icon-moxing
+            </div>
+          </li>
+          
+          <li class="dib">
+            <span class="icon iconfont icon-caret-down"></span>
+            <div class="name">
+              caret-down
+            </div>
+            <div class="code-name">.icon-caret-down
+            </div>
+          </li>
+          
+          <li class="dib">
+            <span class="icon iconfont icon-ditu"></span>
+            <div class="name">
+              地图
+            </div>
+            <div class="code-name">.icon-ditu
+            </div>
+          </li>
+          
+        </ul>
+        <div class="article markdown">
+        <h2 id="font-class-">font-class 引用</h2>
+        <hr>
+
+        <p>font-class 是 Unicode 使用方式的一种变种,主要是解决 Unicode 书写不直观,语意不明确的问题。</p>
+        <p>与 Unicode 使用方式相比,具有如下特点:</p>
+        <ul>
+          <li>兼容性良好,支持 IE8+,及所有现代浏览器。</li>
+          <li>相比于 Unicode 语意明确,书写更直观。可以很容易分辨这个 icon 是什么。</li>
+          <li>因为使用 class 来定义图标,所以当要替换图标时,只需要修改 class 里面的 Unicode 引用。</li>
+          <li>不过因为本质上还是使用的字体,所以多色图标还是不支持的。</li>
+        </ul>
+        <p>使用步骤如下:</p>
+        <h3 id="-fontclass-">第一步:引入项目下面生成的 fontclass 代码:</h3>
+<pre><code class="language-html">&lt;link rel="stylesheet" href="./iconfont.css"&gt;
+</code></pre>
+        <h3 id="-">第二步:挑选相应图标并获取类名,应用于页面:</h3>
+<pre><code class="language-html">&lt;span class="iconfont icon-xxx"&gt;&lt;/span&gt;
+</code></pre>
+        <blockquote>
+          <p>"
+            iconfont" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。</p>
+        </blockquote>
+      </div>
+      </div>
+      <div class="content symbol">
+          <ul class="icon_lists dib-box">
+          
+            <li class="dib">
+                <svg class="icon svg-icon" aria-hidden="true">
+                  <use xlink:href="#icon-map"></use>
+                </svg>
+                <div class="name">地图</div>
+                <div class="code-name">#icon-map</div>
+            </li>
+          
+            <li class="dib">
+                <svg class="icon svg-icon" aria-hidden="true">
+                  <use xlink:href="#icon-bianji"></use>
+                </svg>
+                <div class="name">编辑</div>
+                <div class="code-name">#icon-bianji</div>
+            </li>
+          
+            <li class="dib">
+                <svg class="icon svg-icon" aria-hidden="true">
+                  <use xlink:href="#icon-ic_dashboard"></use>
+                </svg>
+                <div class="name">项目管理</div>
+                <div class="code-name">#icon-ic_dashboard</div>
+            </li>
+          
+            <li class="dib">
+                <svg class="icon svg-icon" aria-hidden="true">
+                  <use xlink:href="#icon-jiance"></use>
+                </svg>
+                <div class="name">监测</div>
+                <div class="code-name">#icon-jiance</div>
+            </li>
+          
+            <li class="dib">
+                <svg class="icon svg-icon" aria-hidden="true">
+                  <use xlink:href="#icon-morentouxiang"></use>
+                </svg>
+                <div class="name">默认头像</div>
+                <div class="code-name">#icon-morentouxiang</div>
+            </li>
+          
+            <li class="dib">
+                <svg class="icon svg-icon" aria-hidden="true">
+                  <use xlink:href="#icon-setting-fill"></use>
+                </svg>
+                <div class="name">setting-fill</div>
+                <div class="code-name">#icon-setting-fill</div>
+            </li>
+          
+            <li class="dib">
+                <svg class="icon svg-icon" aria-hidden="true">
+                  <use xlink:href="#icon-moxing"></use>
+                </svg>
+                <div class="name">模型</div>
+                <div class="code-name">#icon-moxing</div>
+            </li>
+          
+            <li class="dib">
+                <svg class="icon svg-icon" aria-hidden="true">
+                  <use xlink:href="#icon-caret-down"></use>
+                </svg>
+                <div class="name">caret-down</div>
+                <div class="code-name">#icon-caret-down</div>
+            </li>
+          
+            <li class="dib">
+                <svg class="icon svg-icon" aria-hidden="true">
+                  <use xlink:href="#icon-ditu"></use>
+                </svg>
+                <div class="name">地图</div>
+                <div class="code-name">#icon-ditu</div>
+            </li>
+          
+          </ul>
+          <div class="article markdown">
+          <h2 id="symbol-">Symbol 引用</h2>
+          <hr>
+
+          <p>这是一种全新的使用方式,应该说这才是未来的主流,也是平台目前推荐的用法。相关介绍可以参考这篇<a href="">文章</a>
+            这种用法其实是做了一个 SVG 的集合,与另外两种相比具有如下特点:</p>
+          <ul>
+            <li>支持多色图标了,不再受单色限制。</li>
+            <li>通过一些技巧,支持像字体那样,通过 <code>font-size</code>, <code>color</code> 来调整样式。</li>
+            <li>兼容性较差,支持 IE9+,及现代浏览器。</li>
+            <li>浏览器渲染 SVG 的性能一般,还不如 png。</li>
+          </ul>
+          <p>使用步骤如下:</p>
+          <h3 id="-symbol-">第一步:引入项目下面生成的 symbol 代码:</h3>
+<pre><code class="language-html">&lt;script src="./iconfont.js"&gt;&lt;/script&gt;
+</code></pre>
+          <h3 id="-css-">第二步:加入通用 CSS 代码(引入一次就行):</h3>
+<pre><code class="language-html">&lt;style&gt;
+.icon {
+  width: 1em;
+  height: 1em;
+  vertical-align: -0.15em;
+  fill: currentColor;
+  overflow: hidden;
+}
+&lt;/style&gt;
+</code></pre>
+          <h3 id="-">第三步:挑选相应图标并获取类名,应用于页面:</h3>
+<pre><code class="language-html">&lt;svg class="icon" aria-hidden="true"&gt;
+  &lt;use xlink:href="#icon-xxx"&gt;&lt;/use&gt;
+&lt;/svg&gt;
+</code></pre>
+          </div>
+      </div>
+
+    </div>
+  </div>
+  <script>
+  $(document).ready(function () {
+      $('.tab-container .content:first').show()
+
+      $('#tabs li').click(function (e) {
+        var tabContent = $('.tab-container .content')
+        var index = $(this).index()
+
+        if ($(this).hasClass('active')) {
+          return
+        } else {
+          $('#tabs li').removeClass('active')
+          $(this).addClass('active')
+
+          tabContent.hide().eq(index).fadeIn()
+        }
+      })
+    })
+  </script>
+</body>
+</html>

Разлика између датотеке није приказан због своје велике величине
+ 53 - 0
lib_vue/src/assets/iconfont/iconfont.css


BIN
lib_vue/src/assets/iconfont/iconfont.eot


Разлика између датотеке није приказан због своје велике величине
+ 1 - 0
lib_vue/src/assets/iconfont/iconfont.js


Разлика између датотеке није приказан због своје велике величине
+ 53 - 0
lib_vue/src/assets/iconfont/iconfont.svg


BIN
lib_vue/src/assets/iconfont/iconfont.ttf


BIN
lib_vue/src/assets/iconfont/iconfont.woff


BIN
lib_vue/src/assets/iconfont/iconfont.woff2


BIN
lib_vue/src/assets/image/404.png


BIN
lib_vue/src/assets/image/close.gif


BIN
lib_vue/src/assets/image/head_logo.png


BIN
lib_vue/src/assets/image/login_center.png


BIN
lib_vue/src/assets/image/login_logo.png


BIN
lib_vue/src/assets/image/userHead.jpg


BIN
lib_vue/src/assets/image/userHead.png


BIN
lib_vue/src/assets/logo.png


BIN
lib_vue/src/assets/logo4.png


+ 72 - 0
lib_vue/src/common/js/util.js

@@ -0,0 +1,72 @@
+var SIGN_REGEXP = /([yMdhsm])(\1*)/g;
+var DEFAULT_PATTERN = 'yyyy-MM-dd';
+function padding(s, len) {
+    var len = len - (s + '').length;
+    for (var i = 0; i < len; i++) { s = '0' + s; }
+    return s;
+};
+
+export default {
+    getQueryStringByName: function (name) {
+        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
+        var r = window.location.search.substr(1).match(reg);
+        var context = "";
+        if (r != null)
+            context = r[2];
+        reg = null;
+        r = null;
+        return context == null || context == "" || context == "undefined" ? "" : context;
+    },
+    formatDate: {
+        format: function (date, pattern) {
+            pattern = pattern || DEFAULT_PATTERN;
+            return pattern.replace(SIGN_REGEXP, function ($0) {
+                switch ($0.charAt(0)) {
+                    case 'y': return padding(date.getFullYear(), $0.length);
+                    case 'M': return padding(date.getMonth() + 1, $0.length);
+                    case 'd': return padding(date.getDate(), $0.length);
+                    case 'w': return date.getDay() + 1;
+                    case 'h': return padding(date.getHours(), $0.length);
+                    case 'm': return padding(date.getMinutes(), $0.length);
+                    case 's': return padding(date.getSeconds(), $0.length);
+                }
+            });
+        },
+        parse: function (dateString, pattern) {
+            var matchs1 = pattern.match(SIGN_REGEXP);
+            var matchs2 = dateString.match(/(\d)+/g);
+            if (matchs1.length == matchs2.length) {
+                var _date = new Date(1970, 0, 1);
+                for (var i = 0; i < matchs1.length; i++) {
+                    var _int = parseInt(matchs2[i]);
+                    var sign = matchs1[i];
+                    switch (sign.charAt(0)) {
+                        case 'y': _date.setFullYear(_int); break;
+                        case 'M': _date.setMonth(_int - 1); break;
+                        case 'd': _date.setDate(_int); break;
+                        case 'h': _date.setHours(_int); break;
+                        case 'm': _date.setMinutes(_int); break;
+                        case 's': _date.setSeconds(_int); break;
+                    }
+                }
+                return _date;
+            }
+            return null;
+        },
+        dateDiff: function(sDate1, sDate2) {
+            var aDate, oDate1, oDate2, iDays;
+            sDate1 = sDate1.split(" ")[0];
+            aDate = sDate1.split("-")
+            oDate1 = new Date(aDate[1] + '-' + aDate[2] + '-' + aDate[0]);
+            aDate = sDate2.split("-")
+            oDate2 = new Date(aDate[1] + '-' + aDate[2] + '-' + aDate[0]);
+            if((oDate1 - oDate2) < 0){
+                iDays = "已失效"
+            } else {
+                iDays = parseInt(Math.abs(oDate1 - oDate2) / 1000 / 60 / 60 / 24) + "天" //把相差的毫秒数转换为天数 
+            }
+            return iDays
+        }
+    }
+
+};

+ 0 - 0
lib_vue/src/components/.gitkeep


+ 198 - 0
lib_vue/src/http.js

@@ -0,0 +1,198 @@
+import axios from 'axios'
+import qs from 'qs'
+
+const TIME_OUT_MS = 60 * 1000 // 默认请求超时时间
+
+/*
+ * @param response 返回数据列表
+ */
+function handleResults (response) {
+    let remoteResponse = response.data;
+    return remoteResponse
+}
+
+function handleUrl (url) {
+    if(url.indexOf('.do') > -1) {
+        url = LINK_URL + url;
+    } else {
+        url = BASE_URL + url;
+    }
+    return url
+}
+
+/*
+ * @param data 参数列表
+ * @return
+ */
+function handleParams (data) {
+    return data
+}
+
+export default {
+    /*
+     * @param url
+     * @param data
+     * @param response 请求成功时的回调函数
+     * @param exception 异常的回调函数
+     */
+    post (url, data, response, exception) {
+        var user = sessionStorage.getItem('user') , token = "";
+        if(user != null){
+            token = JSON.parse(user).headImgurl
+            data.token = token
+        }
+        axios({
+            method: 'post',
+            url: handleUrl(url),
+            data: handleParams(qs.stringify(data)),
+            // timeout: TIME_OUT_MS,
+            headers: {
+                //'Content-Type': 'application/json; charset=UTF-8'
+                'Content-type': ' application/x-www-form-urlencoded; charset=UTF-8',
+            }
+        }).then(
+            (result) => {
+                response(handleResults(result))
+            }
+        ).catch(
+            (error) => {
+                if (exception) {
+                    exception(error)
+                } else {
+                    console.log(error)
+                }
+            }
+        )
+    },
+    /*
+     * get 请求
+     * @param url
+     * @param response 请求成功时的回调函数
+     * @param exception 异常的回调函数
+     */
+    get (url , response, exception) {
+        var user = sessionStorage.getItem('user') , token = "";
+        if(user != null){
+            token = JSON.parse(user).headImgurl
+        }
+        axios({
+            method: 'get',
+            url: handleUrl(url),
+            headers: {
+                'Content-Type': 'application/json; charset=UTF-8'
+            }
+        }).then(
+            (result) => {
+                response(handleResults(result))
+            }
+        ).catch(
+            (error) => {
+                if (exception) {
+                    exception(error)
+                } else {
+                    console.log(error)
+                }
+            }
+        )
+    },
+    /*
+     * 导入文件
+     * @param url
+     * @param data
+     * @param response 请求成功时的回调函数
+     * @param exception 异常的回调函数
+     */
+    uploadFile (url, data, response, exception) {
+        var user = sessionStorage.getItem('user') , token = "";
+        if(user != null){
+            token = JSON.parse(user).headImgurl
+            data.append("token", token);
+        }
+        axios({
+            method: 'post',
+            url: handleUrl(url),
+            data: handleParams(data),
+            dataType: 'json',
+            processData: false,
+            contentType: false
+        }).then(
+            (result) => {
+                response(handleResults(result, data))
+            }
+        ).catch(
+            (error) => {
+                if (exception) {
+                    exception(error)
+                } else {
+                    console.log(error)
+                }
+            }
+        )
+    },
+    /*
+     * 下载文件用,导出 Excel 表格可以用这个方法
+     * @param url
+     * @param param
+     * @param fileName 如果是导出 Excel 表格文件名后缀最好用.xls 而不是.xlsx,否则文件可能会因为格式错误导致无法打开
+     * @param exception 异常的回调函数
+     */
+    downloadFile (url, data, fileName, exception) {
+        var user = sessionStorage.getItem('user') , token = "";
+        if(user != null){
+            token = JSON.parse(user).headImgurl
+        }
+        axios({
+            method: 'post',
+            url: handleUrl(url),
+            data: handleParams(data),
+            responseType: 'blob'
+        }).then(
+            (result) => {
+                const excelBlob = result.data
+                if ('msSaveOrOpenBlob' in navigator) {
+                    window.navigator.msSaveOrOpenBlob(excelBlob, fileName)
+                } else {
+                    const elink = document.createElement('a')
+                    elink.download = fileName
+                    elink.style.display = 'none'
+                    const blob = new Blob([excelBlob])
+                    elink.href = URL.createObjectURL(blob)
+                    document.body.appendChild(elink)
+                    elink.click()
+                    document.body.removeChild(elink)
+                }
+            }
+        ).catch(
+            (error) => {
+                if (exception) {
+                    exception(error)
+                } else {
+                    console.log(error)
+                }
+            }
+        )
+    },
+    uploadFileFormData (url, data, response, exception) {
+        axios({
+            method: 'post',
+            url: handleUrl(url),
+            data: data,
+            // timeout: TIME_OUT_MS,
+            headers: {
+                'Content-Type': 'multipart/form-data'
+            }
+        }).then(
+            (result) => {
+                response(handleResults(result))
+            }
+        ).catch(
+            (error) => {
+                if (exception) {
+                    exception(error)
+                } else {
+                    console.log(error)
+                }
+            }
+        )
+    }
+}

+ 103 - 0
lib_vue/src/main.js

@@ -0,0 +1,103 @@
+import Vue from 'vue'
+import App from './App'
+
+import VueRouter from 'vue-router'
+
+import ElementUI from 'element-ui'
+import 'element-ui/lib/theme-chalk/index.css'
+
+import store from './vuex/store'
+import Vuex from 'vuex'
+import routes from './routes'
+
+import http from './http'
+Vue.prototype.http = http
+
+import port from './port'
+Vue.prototype.port = port
+
+import echarts from 'echarts'
+Vue.prototype.echarts = echarts
+
+import VueClipboard from 'vue-clipboard2'
+Vue.use(VueClipboard)
+
+import 'font-awesome/css/font-awesome.min.css'
+import './assets/iconfont/iconfont.css'
+
+Vue.use(ElementUI)
+Vue.use(VueRouter)
+Vue.use(Vuex)
+
+const router = new VueRouter({
+    routes
+})
+
+
+router.beforeEach((to, from, next) => {
+    if(to.name != '邀请') {
+        if (to.path == '/login') {
+            sessionStorage.removeItem('user');
+        }
+    
+        let user = JSON.parse(sessionStorage.getItem('user'));
+        if (!user && to.path != '/login') {
+            next({ path: '/login' })
+        } else {
+            if(user){
+                for(var i in routes){
+                    if(routes[i].name == "基础管理" && user.parentId != 0){
+                        routes[i].hidden = true
+                    } else if(routes[i].name == "基础管理"){
+                        routes[i].hidden = false
+                    }
+                    
+                    if(routes[i].name == "项目管理" && user.parentId > 1){
+                        var children = routes[i].children;
+                        for(var j in children){
+    
+                            if(children[j].name == "人员管理"){
+                                if(user.isManager == 0){
+                                    children[j].hidden = true
+                                } else {
+                                    children[j].hidden = false
+                                }
+                            }
+    
+                            if(children[j].name == "权限管理"){
+                                if(user.isManager == 0){
+                                    children[j].hidden = true
+                                } else {
+                                    children[j].hidden = false
+                                }
+                            }
+                        }
+                    } else if(routes[i].name == "项目管理") {
+                        var children = routes[i].children;
+                        for(var j in children){
+                            if(children[j].name != "项目详情"){
+                                children[j].hidden = false
+                            }
+                            
+                            if(children[j].name == "权限管理"){
+                                if((user.parentId == 0 || user.parentId == 1) && user.isManager == 0){
+                                    children[j].hidden = true
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+            next()
+        }
+    } else {
+        next()
+    }
+})
+
+new Vue({
+    router,
+    store,
+    render: h => h(App)
+}).$mount('#app')
+

+ 25 - 0
lib_vue/src/mock/data/user.js

@@ -0,0 +1,25 @@
+import Mock from 'mockjs';
+const LoginUsers = [
+  {
+    id: 1,
+    username: 'admin',
+    password: '123456',
+    avatar: 'https://raw.githubusercontent.com/taylorchen709/markdown-images/master/vueadmin/user.png',
+    name: '张某某'
+  }
+];
+
+const Users = [];
+
+for (let i = 0; i < 86; i++) {
+  Users.push(Mock.mock({
+    id: Mock.Random.guid(),
+    name: Mock.Random.cname(),
+    addr: Mock.mock('@county(true)'),
+    'age|18-60': 1,
+    birth: Mock.Random.date(),
+    sex: Mock.Random.integer(0, 1)
+  }));
+}
+
+export { LoginUsers, Users };

+ 3 - 0
lib_vue/src/mock/index.js

@@ -0,0 +1,3 @@
+import mock from './mock';
+
+export default mock;

+ 153 - 0
lib_vue/src/mock/mock.js

@@ -0,0 +1,153 @@
+import axios from 'axios';
+import MockAdapter from 'axios-mock-adapter';
+import { LoginUsers, Users } from './data/user';
+let _Users = Users;
+
+export default {
+  /**
+   * mock bootstrap
+   */
+    bootstrap() {
+        let mock = new MockAdapter(axios);
+
+        // mock success request
+        mock.onGet('/success').reply(200, {
+            msg: 'success'
+        });
+
+        // mock error request
+        mock.onGet('/error').reply(500, {
+            msg: 'failure'
+        });
+
+        //登录
+        mock.onPost('/login').reply(config => {
+            let {username, password} = JSON.parse(config.data);
+            return new Promise((resolve, reject) => {
+                let user = null;
+                setTimeout(() => {
+                    let hasUser = LoginUsers.some(u => {
+                        if (u.username === username && u.password === password) {
+                            user = JSON.parse(JSON.stringify(u));
+                            user.password = undefined;
+                            return true;
+                        }
+                    });
+
+                    if (hasUser) {
+                        resolve([200, { code: 200, msg: '请求成功', user }]);
+                    } else {
+                        resolve([200, { code: 500, msg: '账号或密码错误' }]);
+                    }
+                }, 1000);
+            });
+        });
+
+        //获取用户列表
+        mock.onGet('/user/list').reply(config => {
+            let {name} = config.params;
+            let mockUsers = _Users.filter(user => {
+                if (name && user.name.indexOf(name) == -1) return false;
+                return true;
+            });
+            return new Promise((resolve, reject) => {
+                setTimeout(() => {
+                    resolve([200, {
+                        users: mockUsers
+                    }]);
+                }, 1000);
+            });
+        });
+
+        //获取用户列表(分页)
+        mock.onGet('/user/listpage').reply(config => {
+            let {page, name} = config.params;
+            let mockUsers = _Users.filter(user => {
+                if (name && user.name.indexOf(name) == -1) return false;
+                return true;
+            });
+            let total = mockUsers.length;
+            mockUsers = mockUsers.filter((u, index) => index < 20 * page && index >= 20 * (page - 1));
+            return new Promise((resolve, reject) => {
+                setTimeout(() => {
+                    resolve([200, {
+                        total: total,
+                        users: mockUsers
+                    }]);
+                }, 1000);
+            });
+        });
+
+        //删除用户
+        mock.onGet('/user/remove').reply(config => {
+            let { id } = config.params;
+            _Users = _Users.filter(u => u.id !== id);
+            return new Promise((resolve, reject) => {
+                setTimeout(() => {
+                    resolve([200, {
+                        code: 200,
+                        msg: '删除成功'
+                    }]);
+                }, 500);
+            });
+        });
+
+        //批量删除用户
+        mock.onGet('/user/batchremove').reply(config => {
+            let { ids } = config.params;
+            ids = ids.split(',');
+            _Users = _Users.filter(u => !ids.includes(u.id));
+            return new Promise((resolve, reject) => {
+                setTimeout(() => {
+                    resolve([200, {
+                        code: 200,
+                        msg: '删除成功'
+                    }]);
+                }, 500);
+            });
+        });
+
+        //编辑用户
+        mock.onGet('/user/edit').reply(config => {
+            let { id, name, addr, age, birth, sex } = config.params;
+            _Users.some(u => {
+                if (u.id === id) {
+                    u.name = name;
+                    u.addr = addr;
+                    u.age = age;
+                    u.birth = birth;
+                    u.sex = sex;
+                    return true;
+                }
+            });
+            return new Promise((resolve, reject) => {
+                setTimeout(() => {
+                    resolve([200, {
+                        code: 200,
+                        msg: '编辑成功'
+                    }]);
+                }, 500);
+            });
+        });
+
+        //新增用户
+        mock.onGet('/user/add').reply(config => {
+            let { name, addr, age, birth, sex } = config.params;
+            _Users.push({
+                name: name,
+                addr: addr,
+                age: age,
+                birth: birth,
+                sex: sex
+            });
+            return new Promise((resolve, reject) => {
+                setTimeout(() => {
+                    resolve([200, {
+                        code: 200,
+                        msg: '新增成功'
+                    }]);
+                }, 500);
+            });
+        });
+    }
+};

+ 118 - 0
lib_vue/src/port.js

@@ -0,0 +1,118 @@
+export default {
+    manage: {
+        login: '/user/login', // 登录
+    },
+    //消息提示相关
+    notice: {
+        list: '/vnoticeuser/list',  // 消息列表
+        read: '/vnoticeuser/read'  // 消息读取
+    },
+    pwd: {
+        resetPwd: '/user/updatePassword' // 重置密码
+    },
+    map: { 
+        mapList: '/company/getCoutomCompanyAndMouldsByUser', // 生产方公司和公司下所属的模具
+        newMap: '/mould/listMap' // 获取地图
+    },
+    project: {
+        addUser: '/user/add',  // 添加或修改用户
+        userList: '/user/list',  // 用户列表
+        delUser: '/user/delete',  // 删除用户
+
+        addProject: '/project/add', // 添加或修改项目
+        projectList: '/project/list', // 项目列表
+        projectDetail: '/project/detail', // 项目详情
+        projects: '/project/projectList', // 筛选模具列表时作为筛选条件所加载的项目列表
+        projectByUser: '/project/getProjectListByUserAndCompany',// 获取创建人员分配项目时根据当前人和公司获取项目列表
+
+        uploadFile: '/projectfile/uploadFile', //项目文档的上传
+        dowloadFile: '/projectfile/dowloadFile', //项目文档的下载
+        fileList: '/projectfile/list', //项目文档列表
+        delFile: '/projectfile/delFile', //项目文档的删除
+        operList: '/projectoperationdynamics/list', //项目操作记录列表
+
+        getUserList: '/user/getUserList', //获取用户列表
+        getUserById: '/user/getUserListByCompanyIds', // 给项目分配参与人的时候根据公司id获取公司下的人员
+
+        inviteUser: '/invitationrecord/inviteUser', //添加邀请记录并产生链接
+
+        powerList: '/power/list', // 权限列表
+        powerUpdate: '/power/update', //修改权限
+    },
+    //模具
+    mold: {
+        addMold: '/mould/addOrUpdate', //添加/修改模具设备
+        molds: '/mould/list', //模具列表
+        modelList: '/mould/modelList', //给项目分配模具获取该公司下的模具列表
+        delMold: '/mould/delMould', //删除模具
+
+        moldDetail: '/mould/detail', //模具详情
+        moldFileList: '/mouldfile/list', //获取模具文档
+        moldFileListAll: '/mouldfile/allList', //获取全部模具文档
+        moldFileUpload: '/mouldfile/uploadFile', //上传模具文档
+        moldFileDowload: '/mouldfile/dowloadFile', //模具文档的下载
+        moldFileDowloadList: '/mouldfile/fileList', //获取模具文档下载列表
+
+        moldFileDowloadFile: '/mouldfile/downloadfileList', //批量下载
+        moldFileCheck: '/mouldfile/check', //审批模具文档 
+        exportOperationExcel: '/mouldfile/downloadFileListExcel', //下载操作记录
+
+        chooseModelList: '/mould/chooseModelList', //编辑项目时显示的模具列表
+
+        moldFileDelete: '/mouldfile/delFile', //项目文档的删除
+        moldOperationList: '/mouldoperationdynamics/list', //项目操作记录列表
+
+        partList: '/part/list', //零件列表
+        addPart: '/part/addOrUpdate', //单个零件添加
+        importPart: '/part/importAppLogin',//零件的excel导入
+        partUpload: '/mouldfile/uploadPartFileList', //零件文档的批量上传
+
+        download: '/mouldfile/download',
+
+        moldMaintain: '/mouldmaintain/maintain', //维护
+        moldMaintainList: '/mouldmaintain/list', //获取列表
+        moldMaintainListGet: '/mould/maintainMouldList', //主页获取保养模具列表
+        moldDiscardListGet: '/mould/scrapMouldList', //主页获取报废模具列表
+        moldChange: '/mould/changeMouldEquipment', //处理告警
+        moldChangeRequirement: '/mouldequipment/getEquipmentListByOldMouldAndUser' //处理告警所需的设备
+    },
+    //基础管理
+    base: {
+        addCompany: '/company/add', // 添加资产方
+        companyList: '/company/list', // 资产方列表
+        delCompany: '/company/delete', // 删除资产方
+
+        getCompanyList: '/company/getCompanyList', // 管理员创建人员时显示公司
+        
+        getCompanys: '/company/getCompanys', // 云模盒所属公司
+
+        addCompanyListToProject: '/company/addCompanyListToProject', // 编辑项目时获取生产方公司
+
+        relationList: '/company/relationList', // 获取关联公司列表
+
+        //ownerComps: '/company/ownerRelateCompany', // 返回当前公司的关联公司列表
+
+        getProduceCompany: '/company/getProduceCompany', // 根据项目id获取生产方列表
+        
+        getInfo: '/company/getProduceCompanyByCurrentUser', // 根据当前人登录人所能看到的公司进行筛选
+
+        addFactory: '/factory/add',  // 添加生产方
+        factoryList: '/factory/list',   // 生产方列表
+        delFactory: '/factory/delete',  // 删除生产方
+
+        editMould: '/mouldequipment/addOrUpdate', // 添加 / 修改云模盒
+        mouldeList: '/mouldequipment/getEquipmentList', // 云模盒列表
+        enableMould: '/mouldequipment/use', // 启用云模盒
+
+        moulds: '/mouldequipment/getMouldEquipmentList', // 创建模具时获取资产方的云模盒列表
+        importMouldEquipmentExcel: '/mouldequipment/importMouldEquipmentExcel', //批量导入云模盒
+        
+        setPacket: '/mouldequipment/use',// 云平台下行配置数据包接口
+        openingAndClosingTimesChart: '/mouldhistory/openingAndClosingTimesChart', //获取云模盒的每日开合次数图表 (时间/次数)
+        openingAndClosingTimesChartCycle: '/mouldhistory/openingAndClosingTimesChartCycle', //获取云模盒的每日开合次数周期 (时间/次数)
+
+    },
+    file: {
+        view: '/pdffile/getPdfFile' // 文件预览
+    }
+}

+ 113 - 0
lib_vue/src/routes.js

@@ -0,0 +1,113 @@
+import Login from './views/Login.vue'
+import NotFound from './views/404.vue'
+import Home from './views/Home.vue'
+import message from './views/message.vue'
+import invite from './views/invite.vue'
+
+import map from './views/map/map.vue'
+
+import detection from './views/detection/detection.vue'
+import maintenance from './views/detection/maintenance.vue'
+
+import project from './views/project/project.vue'
+import projectDetail from './views/project/projectDetail.vue'
+import staff from './views/project/staff.vue'
+import competence from './views/project/competence.vue'
+
+import moldList from './views/mold/moldList.vue'
+import moldDetail from './views/mold/moldDetail.vue'
+import moldDownload from './views/mold/moldDownload.vue'
+
+import comp from './views/base/comp.vue'
+import factory from './views/base/factory.vue'
+import allocation from './views/base/allocation.vue'
+
+let routes = [
+    {
+        path: '/login',
+        component: Login,
+        name: '',
+        hidden: true
+    },
+    //地图概览
+    {
+        path: '/',
+        component: Home,
+        name: '',
+        iconCls: 'iconfont icon-ditu',
+        leaf: true,//只有一个节点
+        children: [
+            { path: '/map', component: map, name: '地图概览' },
+            { path: '/message', component: message, name: '消息中心', hidden: true }
+        ]
+    },
+    //运行监测
+    {
+        path: '/',
+        component: Home,
+        name: '',
+        iconCls: 'iconfont icon-jiance',
+        leaf: true,//只有一个节点
+        children: [
+            { path: '/detection', component: detection, name: '运行检测' },
+            { path: '/detection/:id', component: maintenance, name: '运行检测详情', hidden: true }
+        ]
+    },
+    //项目管理
+    {
+        path: '/',
+        component: Home,
+        name: '项目管理',
+        iconCls: 'iconfont icon-ic_dashboard',
+        children: [
+            { path: '/project', component: project, name: '项目列表' },
+            { path: '/project/:id', component: projectDetail, name: '项目详情', hidden: true },
+            { path: '/staff', component: staff, name: '人员管理' },
+            { path: '/competence', component: competence, name: '权限管理' }
+        ]
+    },
+    //模具管理
+    {
+        path: '/',
+        component: Home,
+        name: '模具管理',
+        iconCls: 'iconfont icon-moxing',
+        children: [
+            { path: '/moldList', component: moldList, name: '模具列表' },
+            { path: '/moldList/:id/:type', component: moldDetail, name: '模具详情', hidden: true },
+            { path: '/moldDownload', component: moldDownload, name: '文档下载' }
+        ]
+    },
+    //基础管理
+    {
+        path: '/',
+        component: Home,
+        name: '基础管理',
+        iconCls: 'iconfont icon-setting-fill',
+        children: [
+            { path: '/comp', component: comp, name: '资产方管理' },
+            { path: '/factory', component: factory, name: '生产方管理' },
+            { path: '/allocation', component: allocation, name: '云模盒管理' }
+        ]
+    },
+    //邀请
+    {
+        path: '/invite/:inviteeId/:projectId/:operatorId',
+        component: invite,
+        name: '邀请',
+        hidden: true
+    },
+    {
+        path: '/404',
+        component: NotFound,
+        name: '',
+        hidden: true
+    },
+    {
+        path: '*',
+        hidden: true,
+        redirect: { path: '/404' }
+    }
+];
+
+export default routes;

+ 1 - 0
lib_vue/src/styles/vars.scss

@@ -0,0 +1 @@
+$color-primary: #20a0ff;//#18c79c

+ 61 - 0
lib_vue/src/views/404.vue

@@ -0,0 +1,61 @@
+<template>
+    <div>
+        <div class="page-img">
+            <img src="../assets/image/404.png" />
+        </div>
+        <p class="page-container"><b>Error</b>  非常抱歉你访问的页面不存在!!!</p>
+        <div class="page-button">
+            <el-button type="primary" round @click="back" icon="el-icon-s-promotion">返回首页</el-button>
+        </div>
+    </div>
+</template>
+
+<script>
+    export default {
+		data() {
+			return {
+				
+			}
+		},
+		methods: {
+            back() {
+                this.$router.push('/map');
+            }
+        },
+        created() {
+           
+        },
+		mounted() {
+        }
+	}
+</script>
+
+<style lang="scss" scoped>
+    .page-img {
+        text-align: center;
+        padding: 100px 0 0 0 ;
+
+        img {
+            width: 600px;
+        }
+    }
+
+    .page-container {
+        font-size: 20px;
+        text-align: center;
+        color: rgb(192, 204, 218);
+        b {
+            margin-right: 30px;
+            font-size: 26px;
+        }
+    }
+
+    .page-button {
+        text-align: center;
+        margin-top: 40px;
+        .el-button.is-round {
+            width: 150px;
+            margin-right:80px;
+        }
+    }
+</style>

+ 726 - 0
lib_vue/src/views/Home.vue

@@ -0,0 +1,726 @@
+<template>
+    <el-row class="container">
+        <el-col :span="24" class="header">
+            <el-col
+                :span="10"
+                class="logo"
+                :class="collapsed?'logo-collapse-width':'logo-width'"
+                :style="collapsed?'padding:0':''"
+            >
+                <img v-if="collapsed" class="headImg" src="../assets/image/head_logo.png" />
+                <span v-else>{{sysName}}</span>
+            </el-col>
+            <el-col :span="10">
+                <div class="tools" @click.prevent="collapse">
+                <i class="fa fa-align-justify"></i>
+                </div>
+            </el-col>
+            <el-col :span="6" class="userinfo">
+                <el-badge class="itemNew" :value="unreadCount[3]" :hidden="unreadCount[3] == 0">
+                <i class="el-icon-message-solid" style="font-size:24px" v-popover:popover1></i>
+                <!-- 消息中心 -->
+                <el-popover
+                    ref="popover1"
+                    placement="bottom"
+                    width="400"
+                    trigger="hover"
+                    popper-class="popover-self"
+                >
+                    <!-- 消息盒子中间部分 -->
+                    <el-tabs v-model="activePage" @tab-click="handleClick" stretch>
+                    <!-- 审批的页面 -->
+                    <el-tab-pane name="0">
+                        <span slot="label">
+                        <span v-if="unreadCount[0] == 0">审批</span>
+                        <span v-else>审批({{unreadCount[0]}})</span>
+                        </span>
+                        <div class="popover-item" v-if="popoverData[0].length == 0">暂无审批消息</div>
+                        <div class="popover-item" v-for="item in popoverData[0]">
+                        <div
+                            style="cursor: pointer;"
+                            @click="locationHerf(item.id, item.refId, item.noticeType, item.belongType)"
+                        >
+                            <p class="popover-title">
+                            <span v-if="item.isRead == 1" class="isRead">{{item.projectName}}</span>
+                            <span v-else>{{item.projectName}}</span>
+                            </p>
+                            <p v-if="item.isRead == 1" class="isRead">{{item.content}}</p>
+                            <p v-else>{{item.content}}</p>
+                        </div>
+                        </div>
+                    </el-tab-pane>
+
+                    <!-- 警告的页面 -->
+                    <el-tab-pane name="1">
+                        <span slot="label">
+                        <span v-if="unreadCount[1] == 0">警告</span>
+                        <span v-else>警告({{unreadCount[1]}})</span>
+                        </span>
+                        <div class="popover-item" v-if="popoverData[1].length == 0">暂无警告消息</div>
+                        <div class="popover-item" v-for="item in popoverData[1]">
+                        <div
+                            style="cursor: pointer;"
+                            @click="locationHerf(item.id, item.refId, item.noticeType, null)"
+                        >
+                            <p class="popover-title">
+                            <span v-if="item.isRead == 1" class="isRead">{{item.projectName}}</span>
+                            <span v-else>{{item.projectName}}</span>
+                            </p>
+                            <p v-if="item.isRead == 1" class="isRead">{{item.content}}</p>
+                            <p v-else>{{item.content}}</p>
+                        </div>
+                        </div>
+                    </el-tab-pane>
+
+                    <!-- 保养的页面 -->
+                    <el-tab-pane name="2">
+                        <span slot="label">
+                        <span v-if="unreadCount[2] == 0">保养</span>
+                        <span v-else>保养({{unreadCount[2]}})</span>
+                        </span>
+                        <div class="popover-item" v-if="popoverData[2].length == 0">暂无保养消息</div>
+                        <div class="popover-item" v-for="item in popoverData[2]">
+                        <div
+                            style="cursor: pointer;"
+                            @click="locationHerf(item.id, item.refId, item.noticeType, null)"
+                        >
+                            <p class="popover-title">
+                            <span v-if="item.isRead == 1" class="isRead">{{item.projectName}}</span>
+                            <span v-else>{{item.projectName}}</span>
+                            </p>
+                            <p v-if="item.isRead == 1" class="isRead">{{item.content}}</p>
+                            <p v-else>{{item.content}}</p>
+                        </div>
+                        </div>
+                    </el-tab-pane>
+                    </el-tabs>
+
+                    <!-- 查看全部的按钮 -->
+                    <router-link :to="'/message'" tag="div" class="popover-button">查看全部</router-link>
+                </el-popover>
+                </el-badge>
+                <el-dropdown trigger="hover">
+                <span class="el-dropdown-link userinfo-inner">
+                    <img src="../assets/image/userHead.png" />
+                    {{sysUserName}}
+                </span>
+                <el-dropdown-menu slot="dropdown">
+                    <el-dropdown-item @click.native="reset">修改密码</el-dropdown-item>
+                    <el-dropdown-item @click.native="editInfoOpen">修改信息</el-dropdown-item>
+                    <el-dropdown-item divided @click.native="logout">退出登录</el-dropdown-item>
+                </el-dropdown-menu>
+                </el-dropdown>
+            </el-col>
+        </el-col>
+
+        <el-col :span="24" class="main">
+        <aside :class="collapsed?'menu-collapsed':'menu-expanded'">
+            <!--导航菜单-->
+            <el-menu
+            :default-active="$route.path"
+            class="el-menu-vertical-demo"
+            @open="handleopen"
+            @close="handleclose"
+            @select="handleselect"
+            unique-opened
+            router
+            v-if="!collapsed"
+            >
+            <template v-for="(item,index) in $router.options.routes" v-if="!item.hidden">
+                <el-submenu :index="index+''" v-if="!item.leaf">
+                <template slot="title">
+                    <i :class="item.iconCls"></i>
+                    <span class="itemName">{{item.name}}</span>
+                </template>
+                <el-menu-item
+                    v-for="child in item.children"
+                    :index="child.path"
+                    :key="child.path"
+                    v-if="!child.hidden"
+                >{{child.name}}</el-menu-item>
+                </el-submenu>
+                <el-menu-item
+                v-if="item.leaf && item.children.length > 0"
+                :index="item.children[0].path"
+                >
+                <i :class="item.iconCls"></i>
+                {{item.children[0].name}}
+                </el-menu-item>
+            </template>
+            </el-menu>
+            <!--导航菜单-折叠后-->
+            <ul class="el-menu el-menu-vertical-demo collapsed" v-if="collapsed" ref="menuCollapsed">
+            <li
+                v-for="(item,index) in $router.options.routes"
+                v-if="!item.hidden"
+                class="el-submenu item"
+                :style="{overflow:!item.leaf?'':'hidden'}"
+            >
+                <template v-if="!item.leaf">
+                <div
+                    class="el-submenu__title"
+                    style="padding-left: 20px;"
+                    @mouseover="showMenu(index,true)"
+                    @mouseout="showMenu(index,false)"
+                >
+                    <i :class="item.iconCls"></i>
+                </div>
+                <ul
+                    class="el-menu submenu"
+                    :class="'submenu-hook-'+index"
+                    @mouseover="showMenu(index,true)"
+                    @mouseout="showMenu(index,false)"
+                >
+                    <li
+                    v-for="child in item.children"
+                    v-if="!child.hidden"
+                    :key="child.path"
+                    class="el-menu-item"
+                    style="padding-left: 40px;"
+                    :class="$route.path==child.path?'is-active':''"
+                    @click="$router.push(child.path)"
+                    >{{child.name}}</li>
+                </ul>
+                </template>
+                <template v-else>
+                <li class="el-submenu">
+                    <div
+                    class="el-submenu__title el-menu-item"
+                    style="padding-left: 20px;height: 56px;line-height: 56px;padding: 0 20px;"
+                    :class="$route.path==item.children[0].path?'is-active':''"
+                    @click="$router.push(item.children[0].path)"
+                    >
+                    <i :class="item.iconCls"></i>
+                    </div>
+                </li>
+                </template>
+            </li>
+            </ul>
+        </aside>
+        <section class="content-container">
+            <div class="grid-content bg-purple-light">
+            <el-col :span="24" class="content-wrapper">
+                <transition name="fade" mode="out-in">
+                <router-view></router-view>
+                </transition>
+            </el-col>
+            </div>
+
+            <!--修改密码-->
+            <el-dialog
+            title="修改密码"
+            v-if="editPassWord"
+            :visible.sync="editPassWord"
+            :close-on-click-modal="false"
+            customClass="customWidth"
+            >
+            <el-form :model="addForm" label-width="80px" :rules="passRule" ref="addForm">
+                <el-form-item label="新密码" prop="password">
+                <el-input
+                    v-model="addForm.password"
+                    autocomplete="off"
+                    placeholder="请输入新密码"
+                    show-password
+                ></el-input>
+                </el-form-item>
+            </el-form>
+            <div slot="footer" class="dialog-footer">
+                <el-button @click.native="editPassWord = false">取消</el-button>
+                <el-button type="primary" @click.native="resetPwd" :loading="editLoading">提交</el-button>
+            </div>
+            </el-dialog>
+
+            <!--修改信息-->
+            <el-dialog
+            title="修改信息"
+            v-if="editInformation"
+            :visible.sync="editInformation"
+            :close-on-click-modal="false"
+            customClass="customWidth"
+            >
+            <el-form :model="editInfoForm" label-width="80px" :rules="passRule" ref="editInfoForm">
+                <el-form-item label="姓名" prop="username">
+                <el-input v-model="editInfoForm.username" autocomplete="off" placeholder="请输入姓名"></el-input>
+                </el-form-item>
+            </el-form>
+            <el-form :model="editInfoForm" label-width="80px" :rules="passRule" ref="editInfoForm">
+                <el-form-item label="手机号" prop="mobile">
+                <el-input
+                    v-model="editInfoForm.mobile"
+                    autocomplete="off"
+                    placeholder="请输入手机号"
+                    :disabled="true"
+                ></el-input>
+                </el-form-item>
+            </el-form>
+            <el-form :model="editInfoForm" label-width="80px" :rules="passRule" ref="editInfoForm">
+                <el-form-item label="所属公司" prop="companyName">
+                <el-input
+                    v-model="editInfoForm.companyName"
+                    autocomplete="off"
+                    placeholder="请输入所属公司"
+                    :disabled="true"
+                ></el-input>
+                </el-form-item>
+            </el-form>
+            <div slot="footer" class="dialog-footer">
+                <el-button @click.native="editInformation = false">取消</el-button>
+                <el-button type="primary" @click.native="editInfo" :loading="editLoading2">提交</el-button>
+            </div>
+            </el-dialog>
+        </section>
+        </el-col>
+    </el-row>
+</template>
+
+<script>
+    export default {
+        data() {
+            return {
+            user: sessionStorage.getItem("user"),
+            sysName: "云塑网后台管理系统",
+            collapsed: false,
+            sysUserName: "",
+
+            editInformation: false,
+            editPassWord: false,
+            editLoading: false,
+            editLoading2: false,
+            addForm: {
+                id: "",
+                password: ""
+            },
+            editInfoForm: {
+                id: "",
+                username: "",
+                mobile: "",
+                companyName: ""
+            },
+            passRule: {
+                password: [
+                { required: true, message: "请输入新密码", trigger: "blur" }
+                ],
+                username: [{ required: true, message: "请输入姓名", trigger: "blur" }]
+            },
+            //消息数据
+            popoverData: ["", "", ""],
+            unreadCount: [],
+            activePage: 0,
+
+            //时间
+            activeDate: new Date()
+            };
+        },
+        methods: {
+            onSubmit() {},
+
+            handleopen() {},
+
+            handleclose() {},
+
+            handleselect: function(a, b) {},
+
+            //退出登录
+            logout: function() {
+            var _this = this;
+            this.$confirm("确认退出吗?", "提示", {
+                //type: 'warning'
+            }).then(() => {
+                sessionStorage.removeItem("user");
+                _this.$router.push("/login");
+            });
+            },
+
+            //折叠导航栏
+            collapse: function() {
+            this.collapsed = !this.collapsed;
+            },
+
+            showMenu(i, status) {
+            this.$refs.menuCollapsed.getElementsByClassName(
+                "submenu-hook-" + i
+            )[0].style.display = status ? "block" : "none";
+            },
+
+            //打开编辑信息界面
+            editInfoOpen() {
+            this.editInformation = true;
+            this.editInfoForm.id = JSON.parse(sessionStorage.getItem("user")).id;
+            this.editInfoForm.username = JSON.parse(
+                sessionStorage.getItem("user")
+            ).username;
+            this.editInfoForm.mobile = JSON.parse(
+                sessionStorage.getItem("user")
+            ).account;
+            this.editInfoForm.companyName = JSON.parse(
+                sessionStorage.getItem("user")
+            ).companyName;
+            },
+
+            //编辑信息
+            editInfo() {
+            this.$refs.editInfoForm.validate(valid => {
+                if (valid) {
+                this.editLoading2 = true;
+                this.http.post(
+                    this.port.pwd.resetPwd,
+                    { id: this.editInfoForm.id, username: this.editInfoForm.username },
+                    res => {
+                    this.editLoading2 = false;
+                    this.editInformation = false;
+                    if (res.code == "ok") {
+                        this.$message({
+                        message: "修改成功",
+                        type: "success"
+                        });
+                        //读取并覆盖session storage
+                        var userObject = JSON.parse(sessionStorage.getItem("user"));
+                        userObject.username = this.editInfoForm.username;
+                        sessionStorage.setItem("user", JSON.stringify(userObject));
+                        this.sysUserName = this.editInfoForm.username;
+                    } else {
+                        this.$message({
+                        message: res.msg,
+                        type: "error"
+                        });
+                    }
+                    },
+                    error => {
+                    this.editLoading2 = false;
+                    this.editInformation = false;
+                    this.$message({
+                        message: error,
+                        type: "error"
+                    });
+                    }
+                );
+                }
+            });
+            },
+
+            reset() {
+            this.editPassWord = true;
+            this.addForm.id = JSON.parse(sessionStorage.getItem("user")).id;
+            this.addForm.account = JSON.parse(sessionStorage.getItem("user")).account;
+            },
+
+            resetPwd() {
+            this.$refs.addForm.validate(valid => {
+                if (valid) {
+                this.editLoading = true;
+                this.http.post(
+                    this.port.pwd.resetPwd,
+                    this.addForm,
+                    res => {
+                    this.editLoading = false;
+                    this.editPassWord = false;
+                    if (res.code == "ok") {
+                        this.$message({
+                        message: "修改成功,请重新登录",
+                        type: "success"
+                        });
+                        this.$router.push("/login");
+                    } else {
+                        this.$message({
+                        message: res.msg,
+                        type: "error"
+                        });
+                    }
+                    },
+                    error => {
+                    this.editLoading = false;
+                    this.editPassWord = false;
+                    this.$message({
+                        message: error,
+                        type: "error"
+                    });
+                    }
+                );
+                }
+            });
+            },
+            //读取消息提示
+            loadNotice() {
+            this.http.post(
+                this.port.notice.list,
+                {
+                pageNum: 1,
+                pageSize: 5
+                },
+                res => {
+                if (res.code == "ok") {
+                    this.popoverData = [];
+                    this.popoverData.push(res.data[0].approvelList.list);
+                    this.popoverData.push(res.data[1].matainList.list);
+                    this.popoverData.push(res.data[2].emergencyList.list);
+                    this.unreadCount = [];
+                    this.unreadCount.push(res.data[0].isNotReadCount);
+                    this.unreadCount.push(res.data[1].isNotReadCount);
+                    this.unreadCount.push(res.data[2].isNotReadCount);
+                    this.unreadCount.push(
+                    this.unreadCount[0] + this.unreadCount[1] + this.unreadCount[2]
+                    );
+                } else {
+                    this.$message({
+                    message: res.msg,
+                    type: "error"
+                    });
+                }
+                },
+                error => {
+                this.$message({
+                    message: error,
+                    type: "error"
+                });
+                }
+            );
+            },
+            //点击消息的跳转
+            locationHerf(id, refid, type, approval) {
+                this.http.post(
+                    this.port.notice.read,
+                    {
+                    id: id
+                    },
+                    res => {
+                    if (res.code == "ok") {
+                        //重新读取一次消息
+                        this.loadNotice();
+                    } else {
+                        this.$message({
+                        message: res.msg,
+                        type: "error"
+                        });
+                    }
+                    },
+                    error => {
+                    this.$message({
+                        message: error,
+                        type: "error"
+                    });
+                    }
+                );
+                //本页面再点的话强制转移一下
+                var currentRoute = this.$route.path.split("/");
+                if (currentRoute.length == 4 && currentRoute[1] == "moldList") {
+                    this.$router.go(0);
+                }
+                if (type == 0) {
+                    //审批 跳转到模具详情
+                    this.$router.push("/moldList/" + refid + "/" + approval);
+                } else if (type == 1) {
+                    //警告 跳转到运行监测
+                    this.$router.push("/detection");
+                } else if (type == 2) {
+                    //保养 跳转到运行监测详情
+                    this.$router.push("/detection/" + refid);
+                }
+            },
+            //标签页面切换时
+            handleClick(tab, event) {
+                this.activeTab = tab.name;
+            }
+        },
+        mounted() {
+            if (this.user) {
+            var user = JSON.parse(this.user);
+            this.user = user;
+            this.sysUserName = user.username || "";
+            this.loadNotice();
+            } else {
+            this.$router.push("/login");
+            }
+        }
+    };
+</script>
+
+<style scoped lang="scss">
+    @import "~scss_vars";
+
+    .el-menu-vertical-demo i {
+    margin-right: 10px;
+    }
+
+    .container .header .logo img.headImg {
+    margin: 0;
+    width: 40px;
+    height: 40px;
+    margin: 10px 0 0 10px;
+    }
+
+    .itemNew {
+    height: 25px;
+    margin-right: 25px;
+    i {
+        vertical-align: top;
+    }
+    }
+
+    .container {
+    position: absolute;
+    top: 0px;
+    bottom: 0px;
+    width: 100%;
+    .header {
+        height: 60px;
+        line-height: 60px;
+        background: $color-primary;
+        color: #fff;
+        .userinfo {
+        text-align: right;
+        padding-right: 35px;
+        float: right;
+
+        .userinfo-inner {
+            cursor: pointer;
+            color: #fff;
+            img {
+            width: 40px;
+            height: 40px;
+            border-radius: 20px;
+            margin: 10px 10px 10px 10px;
+            // float: right;
+            float: left;
+            }
+        }
+        }
+        .logo {
+        //width:230px;
+        height: 60px;
+        font-size: 21px;
+        padding-left: 20px;
+        padding-right: 20px;
+        border-color: rgba(238, 241, 146, 0.3);
+        border-right-width: 1px;
+        border-right-style: solid;
+        img {
+            width: 40px;
+            float: left;
+            margin: 10px 10px 10px 18px;
+        }
+        .txt {
+            color: #fff;
+        }
+        }
+
+        .logo-width {
+        width: 230px;
+        }
+
+        .logo-collapse-width {
+        width: 60px;
+        }
+
+        .tools {
+        padding: 0px 23px;
+        width: 14px;
+        height: 60px;
+        line-height: 60px;
+        cursor: pointer;
+        }
+    }
+    .main {
+        display: flex;
+        // background: #324057;
+        position: absolute;
+        top: 60px;
+        bottom: 0px;
+        overflow: hidden;
+        aside {
+        flex: 0 0 230px;
+        width: 230px;
+        // position: absolute;
+        // top: 0px;
+        // bottom: 0px;
+        .el-menu {
+            height: 100%;
+        }
+        .collapsed {
+            width: 60px;
+            .item {
+            position: relative;
+            }
+            .submenu {
+            position: absolute;
+            top: 0px;
+            left: 60px;
+            z-index: 99999;
+            height: auto;
+            display: none;
+            }
+        }
+        }
+
+        .menu-collapsed {
+        flex: 0 0 60px;
+        width: 60px;
+        }
+
+        .menu-expanded {
+        flex: 0 0 230px;
+        width: 230px;
+        }
+
+        .content-container {
+        // background: #f8f8f8;
+        //f1f2f7
+        flex: 1;
+        width: 80%;
+        // position: absolute;
+        // right: 0px;
+        // top: 0px;
+        // bottom: 0px;
+        // left: 230px;
+        // overflow-y: scroll;
+        padding: 20px;
+        .breadcrumb-container {
+            //margin-bottom: 15px;
+            .title {
+            width: 200px;
+            float: left;
+            color: #475669;
+            }
+            .breadcrumb-inner {
+            float: right;
+            }
+        }
+        .content-wrapper {
+            background-color: #fff;
+            box-sizing: border-box;
+        }
+        }
+    }
+    }
+
+    .popover-item {
+    padding: 10px;
+    border-bottom: 1px #eee solid;
+    }
+
+    .popover-item > div > p {
+    margin: 0;
+    line-height: 18px;
+    }
+
+    .popover-title {
+    color: #409eff;
+    padding-bottom: 8px;
+    }
+
+    .popover-type {
+    color: #aaa;
+    font-size: 8px;
+    float: right;
+    }
+
+    .popover-button {
+    font-weight: 900;
+    padding: 10px;
+    text-align: center;
+    cursor: pointer;
+    }
+
+    .isRead {
+    color: #999 !important;
+    }
+</style>

+ 136 - 0
lib_vue/src/views/Login.vue

@@ -0,0 +1,136 @@
+<template>
+    <div class="login-par">
+        <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-position="left" label-width="0px" class="demo-ruleForm login-container">
+            <div class="login-logo">
+                <img src="../assets/image/login_logo.png" style="width:80px;height:80px;"/>
+            </div>
+            <h3 class="title">云塑网后台管理系统</h3>
+            <el-form-item class="login-input" prop="account">
+                <el-input type="text" v-model="ruleForm.account" autocomplete="off" placeholder="账号" clearable prefix-icon="el-icon-user-solid"></el-input>
+            </el-form-item>
+            <el-form-item class="login-input" prop="password">
+                <el-input type="password" v-model="ruleForm.password" @keyup.enter.native="handleSubmit" autocomplete="off" placeholder="密码" show-password prefix-icon="el-icon-lock"></el-input>
+            </el-form-item>
+            <el-form-item class="login-button" style="width:100%;">
+                <el-button type="primary" style="width:100%;" @click.native.prevent="handleSubmit" :loading="logining">登录</el-button>
+            </el-form-item>
+        </el-form>
+        <div class="login-backImg">
+            <img src="../assets/image/login_center.png" />
+        </div>
+    </div>
+</template>
+
+<script>
+    export default {
+        data() {
+            return {
+                logining: false,
+                // 登录信息
+                ruleForm: {
+                    account: '',
+                    password: ''
+                },
+                rules: {
+                    account: [
+                        { required: true, message: '请输入账号', trigger: 'blur' },
+                    ],
+                    password: [
+                        { required: true, message: '请输入密码', trigger: 'blur' },
+                    ]
+                }
+            };
+        },
+        methods: {
+            handleReset2() {
+                this.$refs.ruleForm.resetFields();
+            },
+            handleSubmit(ev) {
+                this.$refs.ruleForm.validate((valid) => {
+                    if (valid) {
+                        var _this = this;
+                        this.logining = true;
+                        this.http.post(this.port.manage.login, this.ruleForm , res => {
+                            this.logining = false;
+                            if (res.code == "ok") {
+                                sessionStorage.setItem('user', JSON.stringify(res.data));
+                                this.$router.push({ path: '/map' });
+                            } else {
+                                this.$message({
+                                    message: res.msg,
+                                    type: 'error'
+                                });
+                            }
+                        }, error => {
+                            this.logining = false;
+                            this.$message({
+                                message: error,
+                                type: 'error'
+                            });
+                        })
+                    }
+                });
+            }
+        }
+    }
+</script>
+
+<style lang="scss" scoped>
+    .login-par {
+        position: relative;
+    }
+
+    .login-logo {
+        text-align: center;
+        margin: 0 0 20px 0;
+    }
+
+    .login-container {
+        /*box-shadow: 0 0px 8px 0 rgba(0, 0, 0, 0.06), 0 1px 0px 0 rgba(0, 0, 0, 0.02);*/
+        -webkit-border-radius: 5px;
+        border-radius: 5px;
+        -moz-border-radius: 5px;
+        background-clip: padding-box;
+        margin: 180px auto;
+        // width: 350px;
+        width: 315px;
+        height: 365px;
+        // padding: 35px 35px 15px 35px;
+        padding: 25px 35px 25px 35px;
+        background: #fff;
+        border: 1px solid #eaeaea;
+        box-shadow: 0 0 5px #cac6c6;
+        border-top: 10px solid #409EFF;
+        .title {
+            font-size: 20px;
+            margin: 0px auto 40px auto;
+            text-align: center;
+            color: #505458;
+        }
+        .remember {
+            margin: 0px 0px 35px 0px;
+        }
+        .login-input {
+            margin: 30px 0 0 0;
+        }
+        .login-button {
+            margin: 30px 0 0 0;
+        }
+        .login-button .el-button {
+            padding: 14px;
+        }
+    }
+
+    .login-backImg {
+        position: absolute;
+        width: 100%;
+        height: 350px;
+        background-color: #409EFF;
+        top: 110px;
+        z-index: -1;
+        img {
+            width: 100%;
+            height: 100%;
+        }
+    }
+</style>

+ 639 - 0
lib_vue/src/views/base/allocation.vue

@@ -0,0 +1,639 @@
+<template>
+    <section>
+        <!--工具条-->
+        <el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
+            <el-form :inline="true" :model="filters">
+                <el-col :span="3">
+                    <el-form-item>
+                        <el-select v-model="filters.companyId" clearable filterable placeholder="请选择公司">
+                            <el-option v-for="item in companies" :key="item.id" :label="item.companyName" :value="item.id">
+                            </el-option>
+                        </el-select>
+                    </el-form-item>
+                </el-col>
+                <el-form-item>
+                    <el-input v-model="filters.keyName" placeholder="请输入关键字进行搜索"></el-input>
+                </el-form-item>
+                <el-form-item>
+                    <el-button type="primary" @click="getMoulds">查询</el-button>
+                </el-form-item>
+                <el-form-item style="float: right;">
+                    <a class="download" href="/upload/云模盒批量导入模板.xlsx" download="云模盒批量导入模板.xlsx">
+                        <el-button type="primary">
+                            下载模板
+                        </el-button>
+                    </a>
+                </el-form-item>
+                <el-form-item style="float: right;">
+                    <el-upload ref="upload" action="customize" :show-file-list="false" :http-request="uploadFile" :limit="1">
+                        <el-button type="primary" :loading="uploading">批量导入</el-button>
+                    </el-upload>
+                </el-form-item>
+                <el-form-item style="float: right;">
+                    <el-button type="primary" @click="showAllocation">新建</el-button>
+                </el-form-item>
+                <!-- <el-form-item style="float: right;">
+                    <el-button type="primary" @click="issued">下发</el-button>
+                </el-form-item> -->
+            </el-form>
+        </el-col>
+
+        <!--列表-->
+        <el-table :data="allocations" :height="tableHeight" highlight-current-row v-loading="listLoading" style="width: 100%;">
+            <!-- <el-table-column type="selection" width="50"></el-table-column> -->
+            <el-table-column type="index" width="60"></el-table-column>
+            <el-table-column prop="equipmentNo" label="云模盒编号" width="180" sortable></el-table-column>
+            <el-table-column prop="sim" label="SIM卡号" width="120" sortable></el-table-column>
+            <el-table-column prop="hillNumber" label="电量" width="80" align="center" sortable>
+                <template slot-scope="scope">{{scope.row.hillNumber}}<span v-if="scope.row.hillNumber">%</span></template>
+            </el-table-column>
+            <el-table-column prop="alarmBattery" label="报警电池电量" width="130" align="center" sortable>
+                <template slot-scope="scope">{{scope.row.alarmBattery}}<span v-if="scope.row.alarmBattery">%</span></template>
+            </el-table-column>
+            <el-table-column prop="alarmDegree" label="热报警度数" width="120" align="center" sortable>
+                <template slot-scope="scope">{{scope.row.alarmDegree}}<span v-if="scope.row.alarmDegree">℃</span></template>
+            </el-table-column>
+            <el-table-column prop="useLife" label="使用年限" width="100" align="center" sortable>
+                <template slot-scope="scope">{{scope.row.useLife}}年</template>
+            </el-table-column>
+            <el-table-column prop="diffTime" label="倒计时" width="100" align="center" sortable>
+                <template slot-scope="scope">{{scope.row.diffTime}}</template>
+            </el-table-column>
+            <el-table-column prop="modelName" label="模具名称" width="130" sortable></el-table-column>
+            <el-table-column prop="modelNo" label="模具编号" width="120" align="center" sortable></el-table-column>
+            <el-table-column prop="companyName" label="公司名称" width="180" sortable></el-table-column>
+            <el-table-column prop="agent" label="代理商" width="120" sortable></el-table-column>
+            <el-table-column label="云模盒状态" align="center" width="120" sortable>
+                <template slot-scope="scope">
+                    <span v-if="scope.row.isUse == 0">未启用</span>
+                    <span v-else>已启用</span>
+                </template>
+            </el-table-column>
+            <el-table-column label="操作" align="center" width="160">
+                <template slot-scope="scope">
+                    <el-button size="small" v-if="scope.row.modelNo != null && scope.row.isUse == 0" type="primary" @click="openEnable(scope.$index)">启用</el-button>
+                    <el-button size="small" v-if="scope.row.modelNo != null && scope.row.isUse == 1" type="danger" @click="disableEquipment(scope.$index)">停用</el-button>
+                    <!--  :disabled="scope.row.isUse == 1" -->
+                    <el-button size="small" :style="scope.row.modelNo != null?'':'float:right;margin-right:6px'" @click="showEdit(scope.$index, scope.row, scope.row.isUse == 1)">修改</el-button>
+                </template>
+            </el-table-column>
+        </el-table>
+
+        <!--工具条-->
+        <el-col :span="24" class="toolbar">
+        <el-pagination
+            @size-change="handleSizeChange"
+            @current-change="handleCurrentChange"
+            :page-sizes="[20 , 50 , 80 , 100]"
+            :page-size="20"
+            layout="total, sizes, prev, pager, next"
+            :total="total"
+            style="float:right;"
+        ></el-pagination>
+        </el-col>
+
+        <!--新增界面-->
+        <el-dialog title="新建云模盒" v-if="addFormVisible" :visible.sync="addFormVisible" :close-on-click-modal="false" customClass="customWidth">
+            <el-form :model="newAllocation" label-width="100px" :rules="formRules" ref="newAllocation" :inline="true" class="demo-form-inline">
+                <el-form-item label="云模盒编号" prop="equipmentNo">
+                    <el-input v-model="newAllocation.equipmentNo" autocomplete="off" placeholder="请输入云模盒编号"></el-input>
+                </el-form-item>
+                <el-form-item label="所属公司" prop="belongCompanyId">
+                    <el-select v-model="newAllocation.belongCompanyId" filterable clearable placeholder="请选择所属公司" style="width: 202px">
+                        <el-option v-for="item in companies" :key="item.id" :label="item.companyName" :value="item.id"></el-option>
+                    </el-select>
+                </el-form-item>
+                <el-form-item label="使用年限" prop="useLife">
+                    <el-input v-model.number="newAllocation.useLife" type="age" autocomplete="off" placeholder="请输入使用年限"></el-input>
+                </el-form-item>
+                <el-form-item label="代理商" prop="agent">
+                    <el-input v-model="newAllocation.agent" autocomplete="off" placeholder="请输入代理商" style="width: 202px"></el-input>
+                </el-form-item>
+            </el-form>
+            <div slot="footer" class="dialog-footer">
+                <el-button @click.native="addFormVisible = false">取消</el-button>
+                <el-button type="primary" @click="addMould()">提交</el-button>
+            </div>
+        </el-dialog>
+
+        <!--修改界面-->
+        <el-dialog title="修改云模盒" v-if="editFormVisible" :visible.sync="editFormVisible" :close-on-click-modal="false" customClass="customWidth">
+            <el-form :model="newAllocation" label-width="100px" :rules="formRules" ref="newAllocation" :inline="true" class="demo-form-inline">
+                <el-form-item label="云模盒编号" prop="equipmentNo">
+                    <el-input v-model="newAllocation.equipmentNo" autocomplete="off" placeholder="请输入云模盒编号"></el-input>
+                </el-form-item>
+                <el-form-item label="所属公司" prop="belongCompanyId">
+                    <el-select v-model="newAllocation.belongCompanyId" filterable clearable placeholder="请选择所属公司" style="width: 202px" :disabled="newAllocation.usage">
+                        <el-option v-for="item in companies" :key="item.id" :label="item.companyName" :value="item.id"></el-option>
+                    </el-select>
+                </el-form-item>
+                <el-form-item label="使用年限" prop="useLife">
+                    <el-input v-model.number="newAllocation.useLife" type="age" autocomplete="off" placeholder="请输入使用年限"></el-input>
+                </el-form-item>
+                <el-form-item label="代理商" prop="agent">
+                    <el-input v-model="newAllocation.agent" autocomplete="off" placeholder="请输入代理商" style="width: 202px"></el-input>
+                </el-form-item>
+            </el-form>
+            <div slot="footer" class="dialog-footer">
+                <el-button @click.native="editFormVisible = false">取消</el-button>
+                <el-button type="primary" @click="editMould(newAllocation.id)">提交</el-button>
+            </div>
+        </el-dialog>
+
+        <!-- 启用弹窗 -->
+        <el-dialog title="启用" :visible.sync="operateDialogVisible" width="450px">
+            <!-- <el-form label-width="100px" :rules="formRules" :inline="true" class="demo-form-inline">
+                <el-form-item label="某个参数">
+                    <el-input autocomplete="off" placeholder="填了也不会发生什么"></el-input>
+                </el-form-item>
+            </el-form>
+            <span slot="footer" class="dialog-footer">
+                <el-button @click="operateDialogVisible = false">取消</el-button>
+                <el-button type="primary" @click="enable">启用</el-button>
+            </span> -->
+            <el-form :model="issuedVal" label-width="130px" :rules="formRules" ref="issuedVal" :inline="true" class="demo-form-inline">
+                <el-form-item label="报警电池电量" prop="alarmBattery">
+                    <el-input v-model.number="issuedVal.alarmBattery" type="age" autocomplete="off" placeholder="请输入报警电池电量" style="width:250px;"></el-input>
+                    %
+                </el-form-item>
+                <el-form-item label="热报警度数" prop="alarmDegree">
+                    <el-input v-model.number="issuedVal.alarmDegree" type="age" autocomplete="off" placeholder="请输入热报警度数" style="width:250px;"></el-input>
+                    ℃
+                </el-form-item>
+            </el-form>
+            <span slot="footer" class="dialog-footer">
+                <el-button @click="operateDialogVisible = false">取消</el-button>
+                <el-button type="primary" @click="enable">启用</el-button>
+            </span>
+        </el-dialog>
+
+        <!-- 下发弹窗 -->
+        <el-dialog title="下发" :visible.sync="issuedVisible" width="450px">
+            <el-form :model="issuedVal" label-width="130px" :rules="formRules" ref="issuedVal" :inline="true" class="demo-form-inline">
+                <el-form-item label="报警电池电量" prop="alarmBattery">
+                    <el-input v-model.number="issuedVal.alarmBattery" type="age" autocomplete="off" placeholder="请输入报警电池电量" style="width:250px;"></el-input>
+                    %
+                </el-form-item>
+                <el-form-item label="热报警度数" prop="alarmDegree">
+                    <el-input v-model.number="issuedVal.alarmDegree" type="age" autocomplete="off" placeholder="请输入热报警度数" style="width:250px;"></el-input>
+                    ℃
+                </el-form-item>
+            </el-form>
+            <span slot="footer" class="dialog-footer">
+                <el-button @click="issuedVisible = false">取消</el-button>
+                <el-button type="primary" @click="saveIssued">下发</el-button>
+            </span>
+        </el-dialog>
+    </section>
+</template>
+
+<script>
+    import util from "../../common/js/util";
+    export default {
+        data() {
+            return {
+                allocations: [],
+                companies: {},
+                newAllocation: {
+                    equipmentNo: "", //设备编号
+                    useLife: "", //使用年限
+                    equipmentName: "", //设备名称
+                    id: "", //设备id
+                    belongCompanyId: "", //所属公司ID
+                    agent: "", //代理商
+                    usage: true //是否可以修改公司
+                },
+                filters: {
+                    keyName: "",
+                    companyId: ""
+                },
+                formRules: {
+                    equipmentNo: [
+                        { required: true, message: "请输入云模盒编号", trigger: "blur" }
+                    ],
+                    useLife: [
+                        { required: true, message: '请输入使用年限'},
+                        { type: 'number', message: '使用年限必须为数字值'}
+                    ],
+                    belongCompanyId: [
+                        { required: true, message: "请选择所属公司", trigger: ["blur", "change"] }
+                    ],
+                    agent: [
+                        { required: true, message: "请输入代理商", trigger: "blur" }
+                    ],
+                    alarmBattery: [
+                        { required: true, message: '请输入报警电池电量'},
+                        { type: 'number', message: '报警电池电量必须为数字值'}
+                    ],
+                    alarmDegree: [
+                        { required: true, message: '请输入热报警度数'},
+                        { type: 'number', message: '热报警度数必须为数字值'}
+                    ],
+                },
+
+                listLoading: false,
+                addLoading: false,
+                editLoading: false,
+                uploading: false,
+
+                total: 0,
+                page: 1,
+                size: 20,
+                tableHeight: 0,
+
+                addFormVisible: false,
+                editFormVisible: false,
+                operateDialogVisible: false,
+                activeIndex: 0,
+
+                issuedVal: {
+                    alarmBattery: 30,
+                    alarmDegree: 80,
+                },
+                issuedVisible: false,
+                multipleSelection: [],
+            };
+        },
+        methods: {
+            getMsg() {
+                //获取公司下拉列表
+                this.http.post( this.port.base.getCompanys, {},
+                res => {
+                    if (res.code == "ok") {
+                        this.companies = res.data;
+                    } else {
+                        this.$message({
+                            message: res.msg,
+                            type: "error"
+                        });
+                    }
+                },
+                error => {
+                    this.$message({
+                        message: error,
+                        type: "error"
+                    });
+                });
+            },
+
+            //分页
+            handleCurrentChange(val) {
+                this.page = val;
+                this.getMoulds();
+            },
+
+            handleSizeChange(val) {
+                this.size = val;
+                this.getMoulds();
+            },
+
+            //读取云模盒信息
+            getMoulds() {
+                this.listLoading = true;
+                this.http.post(this.port.base.mouldeList,{
+                    pageNum: this.page,
+                    pageSize: this.size,
+                    keyName: this.filters.keyName,
+                    companyId: this.filters.companyId
+                },
+                res => {
+                    this.listLoading = false;
+                    if (res.code == "ok") {
+                        var list = res.data.list
+                        for(var i in list){
+                            if(list[i].endTime == null){
+                                list[i].diffTime = "";
+                            } else {
+                                list[i].diffTime = util.formatDate.dateDiff(
+                                    //util.formatDate.format(new Date(list[i].endTime), 'yyyy-MM-dd'), 
+                                    list[i].endTime,
+                                    util.formatDate.format(new Date(new Date()), 'yyyy-MM-dd')
+                                );
+                            }
+                        }
+                        this.allocations = list;
+                        this.total = res.data.total;
+                    } else {
+                        this.$message({
+                        message: res.msg,
+                        type: "error"
+                        });
+                    }
+                },
+                error => {
+                    this.listLoading = false;
+                    this.$message({
+                        message: error,
+                        type: "error"
+                    });
+                });
+            },
+
+            //添加界面
+            showAllocation() {
+                this.addFormVisible = true;
+                this.newAllocation = {
+                    id: "",
+                    useLife: "",
+                    equipmentNo: "",
+                    belongCompanyId: "",
+                    agent: ""
+                };
+            },
+           
+            //添加模具
+            addMould() {
+                this.$refs.newAllocation.validate(valid => {
+                    if (valid) {
+                    this.addLoading = true;
+                    this.http.post(
+                        this.port.base.editMould,
+                        {
+                            equipmentNo: this.newAllocation.equipmentNo,
+                            belongCompanyId: this.newAllocation.belongCompanyId,
+                            useLife: this.newAllocation.useLife,
+                            agent: this.newAllocation.agent
+                        },
+                        res => {
+                            this.addLoading = false;
+                            if (res.code == "ok") {
+                                this.addFormVisible = false;
+                                this.$message({
+                                    message: "添加成功",
+                                    type: "success"
+                                });
+                                this.getMoulds();
+                            } else {
+                                this.$message({
+                                    message: res.msg,
+                                    type: "error"
+                                });
+                            }
+                        },
+                        error => {
+                            this.addLoading = false;
+                            this.addFormVisible = false;
+                            this.$message({
+                                message: error,
+                                type: "error"
+                            });
+                        }
+                    );
+                    }
+                });
+            },
+
+             //修改界面
+            showEdit(index, row, usageBoolean) {
+                this.editFormVisible = true;
+                this.newAllocation = {
+                    id: row.id,
+                    useLife: row.useLife,
+                    equipmentNo: row.equipmentNo,
+                    belongCompanyId: row.belongCompanyId,
+                    agent: row.agent,
+                    usage: usageBoolean
+                };
+            },
+
+            //编辑模具
+            editMould() {
+                this.$refs.newAllocation.validate(valid => {
+                    if (valid) {
+                        this.editLoading = true;
+                        this.http.post( this.port.base.editMould, {
+                            id: this.newAllocation.id,
+                            equipmentNo: this.newAllocation.equipmentNo,
+                            equipmentName: this.newAllocation.equipmentName,
+                            belongCompanyId: this.newAllocation.belongCompanyId,
+                            useLife: this.newAllocation.useLife,
+                            agent: this.newAllocation.agent
+                        },
+                        res => {
+                            this.editLoading = false;
+                            if (res.code == "ok") {
+                                this.editFormVisible = false;
+                                this.$message({
+                                    message: "修改成功",
+                                    type: "success"
+                                });
+                                this.getMoulds();
+                            } else {
+                                this.$message({
+                                    message: res.msg,
+                                    type: "error"
+                                });
+                            }
+                        },
+                        error => {
+                            this.editLoading = false;
+                            this.editFormVisible = false;
+                            this.$message({
+                                message: error,
+                                type: "error"
+                            });
+                        });
+                    }
+                });
+            },
+
+            //打开启用窗口
+            openEnable(index) {
+                this.operateDialogVisible = true;
+                this.issuedVal.alarmBattery = this.allocations[this.activeIndex].alarmBattery;
+                this.issuedVal.alarmDegree = parseInt(this.allocations[this.activeIndex].alarmDegree);
+                this.activeIndex = index;
+            },
+
+            //启用设备
+            enable() {
+                // if(this.allocations[this.activeIndex].belongCompanyId == null){
+                //     this.$message({
+                //         message: "输入所属公司后才能启用模具",
+                //         type: "error"
+                //     });
+                // }else{
+                this.allocations[this.activeIndex].isUse = 1;
+                this.operateDialogVisible = false;
+                // this.http.post( this.port.base.enableMould, {
+                //     id: this.allocations[this.activeIndex].id,
+                //     isUse: 1
+                // },
+                var str = this.allocations[this.activeIndex].equipmentNo;
+                this.http.post( this.port.base.setPacket, {
+                    lowPowerLimit: this.issuedVal.alarmBattery,//.toString(16),
+                    hotAlarmLimit: this.issuedVal.alarmDegree,//.toString(16),
+                    isUse: 1,
+                    equipmentNo: str
+                },
+                res => {
+                    if (res.code == "ok") {
+                        this.$message({
+                            message: "设备已启用",
+                            type: "success"
+                        });
+                        this.getMoulds();
+                    } else {
+                        this.$message({
+                            message: res.msg,
+                            type: "error"
+                        });
+                    }
+                },
+                error => {
+                    this.$message({
+                        message: error,
+                        type: "error"
+                    });
+                });
+            },
+
+            //停用云模盒
+            disableEquipment(index) {
+                // if(this.allocations[index].belongCompanyId == null){
+                //     this.$message({
+                //         message: "输入所属公司后才能启用模具",
+                //         type: "error"
+                //     });
+                // }else{
+                this.allocations[index].isUse = 0;
+                // this.http.post( this.port.base.enableMould, {
+                //     id: this.allocations[index].id,
+                //     isUse: 0
+                // },
+                var str = this.allocations[this.activeIndex].equipmentNo;
+                this.http.post( this.port.base.setPacket, {
+                    lowPowerLimit: this.issuedVal.alarmBattery,//.toString(16),
+                    hotAlarmLimit: this.issuedVal.alarmDegree,//.toString(16),
+                    isUse: 0,
+                    equipmentNo: str
+                },
+                res => {
+                    if (res.code == "ok") {
+                        this.$message({
+                            message: "设备已停用",
+                            type: "success"
+                        });
+                        this.getMoulds();
+                    } else {
+                        this.$message({
+                            message: res.msg,
+                            type: "error"
+                        });
+                    }
+                },
+                error => {
+                    this.$message({
+                        message: error,
+                        type: "error"
+                    });
+                });
+            },
+
+            //导入云模盒
+            uploadFile(params) {
+                var fileObj = params.file;
+                var form = new FormData();
+                form.append("file", fileObj);
+                this.uploading = true;
+                this.http.uploadFile( this.port.base.importMouldEquipmentExcel,  form,
+                res => {
+                    this.uploading = false;
+                    this.$refs.upload.clearFiles();
+                    if (res.code == "ok") {
+                        this.$message({
+                            message: "上传成功",
+                            type: "success"
+                        });
+                        this.getMoulds();
+                    } else {
+                        this.$message({
+                            message: res.msg,
+                            type: "error"
+                        });
+                    }
+                },
+                error => {
+                    this.uploading = false;
+                    this.$refs.upload.clearFiles();
+                    this.$message({
+                        message: error,
+                        type: "error"
+                    });
+                });
+            },
+
+            //列表选择
+            handleSelectionChange(val) {
+                this.multipleSelection = val;
+            },
+
+            //下发云模盒
+            issued() {
+                this.issuedVisible = true;
+            },
+
+            saveIssued() {
+                if(this.multipleSelection.length == 0) {
+                    this.$message({
+                        message: "请选择要下发的云模盒",
+                        type: "error"
+                    });
+                } else {
+                    var str = '';
+                    for(var i in this.multipleSelection) {
+                        str += this.multipleSelection[i].equipmentNo + ',';
+                    }
+                    str = str.substring(0,str.length-1)
+                    this.http.post( this.port.base.setPacket, {
+                        lowPowerLimit: this.issuedVal.alarmBattery,//.toString(16),
+                        hotAlarmLimit: this.issuedVal.alarmDegree,//.toString(16),
+                        equipmentNo: str
+                    },
+                    res => {
+                        if (res.code == "ok") {
+                            this.$message({
+                                message: "下发成功",
+                                type: "success"
+                            });
+                            this.issuedVisible = false;
+                            this.getMoulds();
+                        } else {
+                            this.$message({
+                                message: res.msg,
+                                type: "error"
+                            });
+                        }
+                    },
+                    error => {
+                        this.$message({
+                            message: error,
+                            type: "error"
+                        });
+                    });
+                }
+            }
+
+        },
+        created() {
+            let height = window.innerHeight;
+            this.tableHeight = height - 210;
+            const that = this;
+            window.onresize = function temp() {
+                that.tableHeight = window.innerHeight - 210;    
+            };
+        },
+        mounted() {
+            this.getMsg();
+            //获取模具列表
+            this.getMoulds();
+        }
+    };
+</script>
+
+<style scoped>
+    .download {
+        color: #fff;
+        text-decoration: none;
+    }
+</style>

+ 476 - 0
lib_vue/src/views/base/comp.vue

@@ -0,0 +1,476 @@
+<template>
+	<section>
+		<!--工具条-->
+		<el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
+			<el-form :inline="true" :model="filters">
+                <el-form-item>
+                    <el-input v-model="filters.keyName" placeholder="请输入资产方名称进行搜索" clearable></el-input>
+                </el-form-item>
+				<el-form-item>
+					<el-button type="primary" @click.native="getComp">查询</el-button>
+				</el-form-item>
+				<el-form-item style="float:right;">
+					<el-button type="primary" @click.native="handleAdd">新增</el-button>
+				</el-form-item>
+			</el-form>
+		</el-col>
+
+		<!--列表-->
+		<el-table :data="list" highlight-current-row :height="tableHeight" v-loading="listLoading" style="width: 100%;">
+            <el-table-column type="index" width="60"></el-table-column>
+			<el-table-column prop="companyName" label="资产方名称" width="250" sortable>
+            </el-table-column>
+            <el-table-column prop="administrator" label="资产方管理员" width="150" sortable>
+                <template slot-scope="scope">
+                    <router-link to="/staff" tag="span" style="cursor: pointer; color: #409eff;">{{scope.row.administrator}}</router-link>
+                </template>
+            </el-table-column>
+            <el-table-column prop="relateCompanyList" label="关联生产方" width="400" sortable>
+                <template slot-scope="scope">
+                    <span class="info" v-for="(item, index) in scope.row.relateCompanyList">
+                        {{item.companyName}}
+                        <span v-if="index != scope.row.relateCompanyList.length-1">、</span>
+                    </span>
+                </template>
+            </el-table-column>
+            <el-table-column prop="companyAddress" label="资产方地址" sortable></el-table-column>
+			<el-table-column label="操作" width="150">
+				<template slot-scope="scope">
+					<el-button size="small" @click.native="handleEdit(scope.$index, scope.row)">编辑</el-button>
+					<el-button type="danger" size="small" @click.native.native="handleDel(scope.$index, scope.row)">删除</el-button>
+				</template>
+			</el-table-column>
+		</el-table>
+
+		<!--工具条-->
+		<el-col :span="24" class="toolbar">
+            <el-pagination
+                @size-change="handleSizeChange"
+                @current-change="handleCurrentChange"
+                :page-sizes="[20 , 50 , 80 , 100]"
+                :page-size="20"
+                layout="total, sizes, prev, pager, next"
+                :total="total"
+                style="float:right;">
+            </el-pagination>
+		</el-col>
+
+        <!--新增界面-->
+		<el-dialog :title="addTitle" v-if="addFormVisible" :visible.sync="addFormVisible" :close-on-click-modal="false" customClass='customWidth'>
+			<el-form :model="addForm" label-width="100px" :rules="formRules" ref="addForm">
+				<el-form-item label="资产方名称" prop="companyName" v-show="addState">
+					<el-input v-model="addForm.companyName" autocomplete="off" placeholder="请输入资产方地址"></el-input>
+				</el-form-item>
+                <el-form-item label="关联生产方" v-show="addState">
+                    <el-select v-model="addForm.companyIds" clearable multiple filterable placeholder="请选择生产方" style="width:533px">
+                        <el-option v-for="item in companys" :key="item.id" :label="item.companyName" :value="item.id">
+                        </el-option>
+                    </el-select>
+				</el-form-item>
+                <el-form-item label="资产方地址" prop="companyAddress" v-show="addState">
+					<el-input v-model="addForm.companyAddress" autocomplete="off" placeholder="请输入资产方地址"></el-input>
+				</el-form-item>
+                <el-form-item label="姓名" prop="username" v-show="!addState">
+					<el-input v-model="addForm.username" autocomplete="off" placeholder="请输入姓名"></el-input>
+				</el-form-item>
+				<el-form-item label="手机号" prop="account" v-show="!addState">
+					<el-input v-model="addForm.account" autocomplete="off" placeholder="请输入手机号"></el-input>
+				</el-form-item>
+                <el-form-item label="角色" v-show="!addState">
+                    <el-input v-model="addForm.roleName" autocomplete="off" placeholder="请输入角色名称"></el-input>
+				</el-form-item>
+			</el-form>
+			<div slot="footer" class="dialog-footer">
+                <span v-if="!addState" style="color:#f00;float:left;margin-left:60px;">初始密码:000000</span>
+				<el-button @click.native="addFormVisible = false">取消</el-button>
+                <el-button v-if="addState" type="primary" @click.native="toNext(0)">下一步</el-button>
+                <el-button v-if="!addState" type="primary" @click.native="toPart(0)">上一步</el-button>
+				<el-button v-if="!addState" type="primary" @click.native="addSubmit" :loading="addLoading">提交</el-button>
+			</div>
+		</el-dialog>
+
+		<!--编辑界面-->
+		<el-dialog title="编辑资产方" v-if="editFormVisible" :visible.sync="editFormVisible" :close-on-click-modal="false" customClass='customWidth'>
+			<el-form :model="editForm" label-width="100px" :rules="formRules" ref="editForm">
+				<el-form-item label="资产方名称" prop="companyName">
+					<el-input v-model="editForm.companyName" autocomplete="off" placeholder="请输入资产方地址"></el-input>
+				</el-form-item>
+                <el-form-item label="关联生产方">
+                    <el-select v-model="editForm.companyIds" clearable multiple filterable placeholder="请选择生产方" style="width:533px">
+                        <el-option v-for="item in companys" :key="item.id" :label="item.companyName" :value="item.id">
+                        </el-option>
+                    </el-select>
+				</el-form-item>
+                <el-form-item label="资产方地址" prop="companyAddress">
+					<el-input v-model="editForm.companyAddress" autocomplete="off" placeholder="请输入资产方地址"></el-input>
+				</el-form-item>
+			</el-form>
+			<div slot="footer" class="dialog-footer">
+				<el-button @click.native="editFormVisible = false">取消</el-button>
+				<el-button type="primary" @click.native="editSubmit" :loading="editLoading">提交</el-button>
+			</div>
+		</el-dialog>
+	</section>
+</template>
+
+<script>
+	import util from '../../common/js/util'
+
+	export default {
+		data() {
+            var checkPhone = (rule, value, callback) => {
+                if (!value) {
+                    return callback(new Error('请输入联系方式'));
+                } else {
+                    const reg = /^1[0-9]\d{9}$/
+                    if (reg.test(value)) {
+                        callback();
+                    } else {
+                        return callback(new Error('请输入正确的联系方式'));
+                    }
+                }
+            };
+			return {
+				filters: {
+                    keyName: ''
+                },
+
+                user: JSON.parse(sessionStorage.getItem('user')),
+                companys:[],
+				list: [],
+				total: 0,
+                page: 1,
+                size: 20,
+                listLoading: false,
+                tableHeight: 0,
+                
+                formRules: {
+					companyName: [
+						{ required: true, message: '请输入资产方名称', trigger: 'blur' }
+                    ],
+                    companyAddress: [
+                        { required: true, message: '请输入资产方地址', trigger: 'blur' }
+                    ],
+                    username: [
+						{ required: true, message: '请输入姓名', trigger: 'blur' }
+                    ],
+                    account: [
+                        { required: true, validator: checkPhone, trigger: 'blur'}
+                    ]
+                },
+
+                team: [{label:'资产方',value:0},{label:'生产方',value:1}],
+
+                // 新增界面
+				addFormVisible: false,
+                addLoading: false,
+                addState: true,
+                addTitle: '新增资产方',
+				addForm: {
+                    companyName: '',
+                    companyAddress: '',
+                    companyIds: [],
+                    username: '',
+                    account: '',
+                    companyId: '',
+                    roleName: "系统管理员",
+                    flag: 0
+				},
+                
+                // 编辑界面
+				editFormVisible: false,
+                editLoading: false,
+				editForm: {
+					id: 0,
+                    companyName: '',
+                    companyType: 0,
+                    companyAddress: '',
+                    companyIds: [],
+                    flag: 1
+				}
+			}
+		},
+		methods: {
+            //  分页
+			handleCurrentChange(val) {
+				this.page = val;
+				this.getComp();
+            },
+
+            handleSizeChange(val) {
+                this.size = val;
+				this.getComp();
+            },
+
+            //获取基础数据
+            getMsg() {
+                this.http.post(this.port.base.relationList, {
+                    companyType: 1
+                }, res => {
+                    if (res.code == "ok") {
+                        this.companys = res.data;
+                    } else {
+                        this.$message({
+                            message: res.msg,
+                            type: 'error'
+                        });
+                    }
+                }, error => {
+                    this.$message({
+                        message: error,
+                        type: 'error'
+                    });
+                })
+            },
+
+			//获取资产方列表
+			getComp() {
+				this.listLoading = true;
+                this.http.post(this.port.base.companyList, {
+                    keyName: this.filters.keyName,
+                    pageNum: this.page,
+                    pageSize: this.size,
+                    companyType: 0
+                }, res => {
+                    this.listLoading = false;
+                    if (res.code == "ok") {
+                        this.list = res.data.list;
+                        this.total = res.data.total;
+                    } else {
+                        this.$message({
+                            message: res.msg,
+                            type: 'error'
+                        });
+                    }
+                }, error => {
+                    this.listLoading = false;
+                    this.$message({
+                        message: error,
+                        type: 'error'
+                    });
+                })
+            }, 
+
+            toNext(i) {
+                if(i == 0) {
+                    this.addState = false;
+                     this.addTitle = '新增资产方管理员';
+                }
+            },
+
+            toPart(i) {
+                if(i == 0) {
+                    this.addState = true;
+                    this.addTitle = '新增资产方';
+                }
+            },
+
+            //显示新增界面
+			handleAdd() {
+                this.addFormVisible = true;
+                this.addState = true;
+                this.addTitle = '新增资产方';
+				this.addForm = {
+                    companyName: '',
+                    companyAddress: '',
+                    companyIds: [],
+                    username: '',
+                    account: '',
+                    companyId: '',
+                    roleName: "系统管理员",
+                    flag: 0
+				};
+            },
+            
+            //新增
+			addSubmit() {
+				this.$refs.addForm.validate((valid) => {
+					if (valid) {
+                        this.addLoading = true;
+                        var str = "";
+                        for(var i in this.addForm.companyIds){
+                            if(i == this.addForm.companyIds.length-1){
+                                str += this.addForm.companyIds
+                            } else {
+                                str += this.addForm.companyIds + ","
+                            }
+                        }
+                        this.http.post(this.port.base.addCompany, {
+                            companyName: this.addForm.companyName,
+                            companyType: 0,
+                            companyAddress: this.addForm.companyAddress,
+                            companyIds: str,
+                            flag: 0
+                        } , res => {
+                            if (res.code == "ok") {
+                                this.addPeo(res.data.id);
+                            } else {
+                                this.$message({
+                                    message: res.msg,
+                                    type: 'error'
+                                });
+                            }
+                        }, error => {
+                            this.addLoading = false;
+                            this.addFormVisible = false;
+                            this.$message({
+                                message: error,
+                                type: 'error'
+                            });
+                        })
+					}
+				});
+            },
+
+            //添加人员
+            addPeo(companyId) {
+                this.$refs.addForm.validate((valid) => {
+					if (valid) {
+                        this.http.post(this.port.project.addUser, {
+                            username: this.addForm.username,
+                            account: this.addForm.account,
+                            companyId: companyId,
+                            roleName: this.addForm.roleName,
+                            parentId: this.user.id,
+                            addType: 0,
+                            flag: 0
+                        } , res => {
+                            this.addLoading = false;
+                            if (res.code == "ok") {
+                                this.addFormVisible = false;
+                                this.$message({
+                                    message: '创建成功',
+                                    type: 'success'
+                                });
+                                this.getComp();
+                            } else {
+                                this.$message({
+                                    message: res.msg,
+                                    type: 'error'
+                                });
+                            }
+                        }, error => {
+                            this.addLoading = false;
+                            this.addFormVisible = false;
+                            this.$message({
+                                message: error,
+                                type: 'error'
+                            });
+                        })
+					}
+				});
+            },
+            
+			//删除
+			handleDel(index, row) {
+				this.$confirm('确认删除该资产方吗?', '提示', {
+					type: 'warning'
+				}).then(() => {
+                    this.http.post(this.port.base.delCompany, {
+                        id: row.id
+                    }, res => {
+                        if (res.code == "ok") {
+                            this.$message({
+                                message: '删除成功',
+                                type: 'success'
+                            });
+                            this.getComp();
+                        } else {
+                            this.$message({
+                                message: res.msg,
+                                type: 'error'
+                            });
+                        }
+                    }, error => {
+                        this.$message({
+                            message: error,
+                            type: 'error'
+                        });
+                    })
+				});
+            },
+            
+			//显示编辑界面
+			handleEdit(index, row) {
+                this.editFormVisible = true;
+                var array = [];
+                for(var i in row.relateCompanyList) {
+                    array.push(row.relateCompanyList[i].id)
+                }
+                this.editForm = {
+                    id: row.id,
+                    companyName: row.companyName,
+                    companyType: 0,
+                    companyAddress: row.companyAddress,
+                    companyIds: array,
+                    flag: 1
+				};
+            },
+            
+			//编辑
+			editSubmit() {
+				this.$refs.editForm.validate((valid) => {
+					if (valid) {
+                        this.editLoading = true;
+                        var str = "";
+                        for(var i in this.editForm.companyIds){
+                            if(i == this.editForm.companyIds.length-1){
+                                str += this.editForm.companyIds
+                            } else {
+                                str += this.editForm.companyIds + ","
+                            }
+                        }
+                        this.http.post(this.port.base.addCompany, {
+                            id: this.editForm.id,
+                            companyName: this.editForm.companyName,
+                            companyType: 0,
+                            companyAddress: this.editForm.companyAddress,
+                            companyIds: str,
+                            flag: 1
+                        } , res => {
+                            this.editLoading = false;
+                            if (res.code == "ok") {
+                                this.editFormVisible = false;
+                                this.$message({
+                                    message: '修改成功',
+                                    type: 'success'
+                                });
+                                this.getComp();
+                            } else {
+                                this.$message({
+                                    message: res.msg,
+                                    type: 'error'
+                                });
+                            }
+                        }, error => {
+                            this.editLoading = false;
+                            this.editFormVisible = false;
+                            this.$message({
+                                message: error,
+                                type: 'error'
+                            });
+                        })
+					}
+				});
+            }
+        },
+
+        created() {
+            let height = window.innerHeight;
+            this.tableHeight = height - 210;
+            const that = this;
+            window.onresize = function temp() {
+                that.tableHeight = window.innerHeight - 210;    
+            };
+        },
+
+		mounted() {
+            this.getMsg();
+			this.getComp();
+        }
+	}
+</script>
+
+<style scoped>
+    
+</style>

+ 601 - 0
lib_vue/src/views/base/factory.vue

@@ -0,0 +1,601 @@
+<template>
+	<section>
+		<!--工具条-->
+		<el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
+			<el-form :inline="true" :model="filters">
+                <el-form-item>
+                    <el-input v-model="filters.keyName" placeholder="请输入生产方名称进行搜索" clearable></el-input>
+                </el-form-item>
+				<el-form-item>
+					<el-button type="primary" @click.native="getFactory">查询</el-button>
+				</el-form-item>
+				<el-form-item style="float:right;">
+					<el-button type="primary" @click.native="handleAdd">新增</el-button>
+				</el-form-item>
+			</el-form>
+		</el-col>
+
+		<!--列表-->
+		<el-table :data="list" highlight-current-row :height="tableHeight" v-loading="listLoading" style="width: 100%;">
+            <el-table-column type="index" width="60"></el-table-column>
+			<el-table-column prop="companyName" label="生产方名称" width="250" sortable></el-table-column>
+            <el-table-column prop="administrator" label="生产方管理员" width="150" sortable>
+            </el-table-column>
+            <el-table-column prop="relateCompanyList" label="关联资产方" width="400" sortable>
+                <template slot-scope="scope">
+                    <span class="info" v-for="(item, index) in scope.row.relateCompanyList">
+                        {{item.companyName}}
+                        <span v-if="index != scope.row.relateCompanyList.length-1">、</span>
+                    </span>
+                </template>
+            </el-table-column>
+            <el-table-column prop="companyAddress" label="生产方地址" sortable></el-table-column>
+			<el-table-column label="操作" width="150">
+				<template slot-scope="scope">
+					<el-button size="small" @click.native="handleEdit(scope.$index, scope.row)">编辑</el-button>
+					<el-button type="danger" size="small" @click.native.native="handleDel(scope.$index, scope.row)">删除</el-button>
+				</template>
+			</el-table-column>
+		</el-table>
+
+		<!--工具条-->
+		<el-col :span="24" class="toolbar">
+            <el-pagination
+                @size-change="handleSizeChange"
+                @current-change="handleCurrentChange"
+                :page-sizes="[20 , 50 , 80 , 100]"
+                :page-size="20"
+                layout="total, sizes, prev, pager, next"
+                :total="total"
+                style="float:right;">
+            </el-pagination>
+		</el-col>
+
+        <!--新增界面-->
+		<el-dialog :title="addTitle" v-if="addFormVisible" :visible.sync="addFormVisible" :close-on-click-modal="false" customClass='customWidth'>
+			<el-form :model="addForm" label-width="100px" :rules="formRules" ref="addForm">
+				<el-form-item label="生产方名称" prop="companyName" v-show="addState">
+					<el-input v-model="addForm.companyName" autocomplete="off" placeholder="请输入生产方名称"></el-input>
+				</el-form-item>
+                <el-form-item label="关联资产方" v-show="addState">
+                    <el-select v-model="addForm.companyIds" clearable multiple filterable placeholder="请选择资产方" style="width:533px">
+                        <el-option v-for="item in companys" :key="item.id" :label="item.companyName" :value="item.id">
+                        </el-option>
+                    </el-select>
+				</el-form-item>
+                <el-form-item label="生产方地址" prop="companyAddress" v-show="addState">
+					<el-input v-model.lazy="addForm.companyAddress" autocomplete="off" @change="changeFactoryArea('addContainer')" placeholder="请输入生产方地址"></el-input>
+				</el-form-item>
+                <div id="addContainer" class="formMap" v-show="addState"></div>
+                <el-form-item label="姓名" prop="username" v-show="!addState">
+					<el-input v-model="addForm.username" autocomplete="off" placeholder="请输入姓名"></el-input>
+				</el-form-item>
+				<el-form-item label="手机号" prop="account" v-show="!addState">
+					<el-input v-model="addForm.account" autocomplete="off" placeholder="请输入手机号"></el-input>
+				</el-form-item>
+                <el-form-item label="角色" v-show="!addState">
+                    <el-input v-model="addForm.roleName" autocomplete="off" placeholder="请输入角色名称"></el-input>
+				</el-form-item>
+			</el-form>
+			<div slot="footer" class="dialog-footer">
+                 <span v-if="!addState" style="color:#f00;float:left;margin-left:60px;">初始密码:000000</span>
+				<el-button @click.native="addFormVisible = false">取消</el-button>
+                <el-button v-if="addState" type="primary" @click.native="toNext(0)">下一步</el-button>
+                <el-button v-if="!addState" type="primary" @click.native="toPart(0)">上一步</el-button>
+				<el-button v-if="!addState" type="primary" @click.native="addSubmit" :loading="addLoading">提交</el-button>
+			</div>
+		</el-dialog>
+
+		<!--编辑界面-->
+		<el-dialog title="编辑生产方" v-if="editFormVisible" :visible.sync="editFormVisible" :close-on-click-modal="false" customClass='customWidth'>
+			<el-form :model="editForm" label-width="100px" :rules="formRules" ref="editForm">
+				<el-form-item label="生产方名称" prop="companyName">
+					<el-input v-model="editForm.companyName" autocomplete="off" placeholder="请输入生产方名称"></el-input>
+				</el-form-item>
+                <el-form-item label="关联资产方">
+                    <el-select v-model="editForm.companyIds" clearable multiple filterable placeholder="请选择资产方" style="width:533px">
+                        <el-option v-for="item in companys" :key="item.id" :label="item.companyName" :value="item.id">
+                        </el-option>
+                    </el-select>
+				</el-form-item>
+                <el-form-item label="生产方地址" prop="companyAddress">
+					<el-input v-model="editForm.companyAddress" autocomplete="off" :change="changeFactoryArea('editContainer')" placeholder="请输入生产方地址"></el-input>
+				</el-form-item>
+                <div id="editContainer" class="formMap"></div>
+			</el-form>
+			<div slot="footer" class="dialog-footer">
+				<el-button @click.native="editFormVisible = false">取消</el-button>
+				<el-button type="primary" @click.native="editSubmit" :loading="editLoading">提交</el-button>
+			</div>
+		</el-dialog>
+	</section>
+</template>
+
+<script>
+    import Vue from 'vue';
+	import util from '../../common/js/util'
+
+	export default {
+		data() {
+            var checkPhone = (rule, value, callback) => {
+                if (!value) {
+                    return callback(new Error('请输入联系方式'));
+                } else {
+                    const reg = /^1[0-9]\d{9}$/
+                    if (reg.test(value)) {
+                        callback();
+                    } else {
+                        return callback(new Error('请输入正确的联系方式'));
+                    }
+                }
+            };
+			return {
+				filters: {
+                    keyName: ''
+                },
+
+                user: JSON.parse(sessionStorage.getItem('user')),
+                companys:[],
+				list: [],
+				total: 0,
+                page: 1,
+                size: 20,
+                listLoading: false,
+                tableHeight: 0,
+                
+                formRules: {
+					companyName: [
+						{ required: true, message: '请输入生产方名称', trigger: 'blur' }
+                    ],
+                    companyAddress: [
+                        { required: true, message: '请输入生产方地址', trigger: 'blur' }
+                    ],
+                    username: [
+						{ required: true, message: '请输入姓名', trigger: 'blur' }
+                    ],
+                    account: [
+                        { required: true, validator: checkPhone, trigger: 'blur'}
+                    ]
+                },
+
+                // 地图
+                map: '',
+                marker: '',
+
+                // 新增界面
+				addFormVisible: false,
+                addLoading: false,
+                addState: true,
+                addTitle: '新增生产方',
+				addForm: {
+                    companyName: '',
+                    companyType: 1,
+                    companyAddress: '',
+                    yLng: 116.397511,
+                    xLat: 39.907545,
+                    companyIds: [],
+                    username: '',
+                    account: '',
+                    companyId: '',
+                    roleName: "系统管理员",
+                    flag: 0
+				},
+                
+                // 编辑界面
+				editFormVisible: false,
+				editLoading: false,
+				editForm: {
+					id: 0,
+					companyName: '',
+                    companyType: 1,
+                    companyAddress: '',
+                    yLng: 0,
+                    xLat: 0,
+                    companyIds: [],
+                    flag: 1
+				}
+			}
+		},
+		methods: {
+            //  分页
+			handleCurrentChange(val) {
+				this.page = val;
+				this.getFactory();
+            },
+
+            handleSizeChange(val) {
+                this.size = val;
+				this.getFactory();
+            },
+
+            //获取基础数据
+            getMsg() {
+                this.http.post(this.port.base.relationList, {
+                    companyType: 0
+                }, res => {
+                    if (res.code == "ok") {
+                        this.companys = res.data;
+                    } else {
+                        this.$message({
+                            message: res.msg,
+                            type: 'error'
+                        });
+                    }
+                }, error => {
+                    this.$message({
+                        message: error,
+                        type: 'error'
+                    });
+                })
+            },
+
+			//获取列表
+			getFactory() {
+				this.listLoading = true;
+                this.http.post(this.port.base.companyList, {
+                    keyName: this.filters.keyName,
+                    pageNum: this.page,
+                    pageSize: this.size,
+                    companyType: 1
+                }, res => {
+                    this.listLoading = false;
+                    if (res.code == "ok") {
+                        this.list = res.data.list;
+                        this.total = res.data.total;
+                    } else {
+                        this.$message({
+                            message: res.msg,
+                            type: 'error'
+                        });
+                    }
+                }, error => {
+                    this.listLoading = false;
+                    this.$message({
+                        message: error,
+                        type: 'error'
+                    });
+                })
+            },
+            
+            //地址输入切换
+            changeFactoryArea(mapId) {
+                if(mapId == "addContainer"){
+                    this.markLocation(this.addForm.companyAddress, mapId);
+                } else {
+                    this.markLocation(this.editForm.companyAddress, mapId);
+                }
+                
+            },
+
+            toNext(i) {
+                if(i == 0) {
+                    this.addState = false;
+                     this.addTitle = '新增生产方管理员';
+                }
+            },
+
+            toPart(i) {
+                if(i == 0) {
+                    this.addState = true;
+                    this.addTitle = '新增生产方';
+                }
+                var _this = this
+                setTimeout(function(){ _this.setMap('addContainer'); }, 100);
+            },
+
+            //显示新增界面
+			handleAdd() {
+                this.addFormVisible = true;
+                this.addState = true;
+                this.addTitle = '新增生产方';
+				this.addForm = {
+                    companyName: '',
+                    companyAddress: '',
+                    yLng: 116.397511,
+                    xLat: 39.907545,
+                    companyIds: [],
+                    username: '',
+                    account: '',
+                    companyId: '',
+                    roleName: "系统管理员",
+                    flag: 0
+                };
+            },
+
+            //新增
+			addSubmit() {
+				this.$refs.addForm.validate((valid) => {
+					if (valid) {
+                        this.addLoading = true;
+                        var str = "";
+                        for(var i in this.addForm.companyIds){
+                            if(i == this.addForm.companyIds.length-1){
+                                str += this.addForm.companyIds
+                            } else {
+                                str += this.addForm.companyIds + ","
+                            }
+                        }
+                        this.http.post(this.port.base.addCompany, {
+                            companyName: this.addForm.companyName,
+                            companyType: 1,
+                            companyAddress: this.addForm.companyAddress,
+                            yLng: this.addForm.yLng,
+                            xLat: this.addForm.xLat,
+                            companyIds: str,
+                            flag: 0
+                        } , res => {
+                            this.addLoading = false;
+                            if (res.code == "ok") {
+                                this.addPeo(res.data.id);
+                            } else {
+                                this.$message({
+                                    message: res.msg,
+                                    type: 'error'
+                                });
+                            }
+                        }, error => {
+                            this.addLoading = false;
+                            this.addFormVisible = false;
+                            this.$message({
+                                message: error,
+                                type: 'error'
+                            });
+                        })
+					}
+				});
+            },
+
+            //添加人员
+            addPeo(companyId) {
+                this.$refs.addForm.validate((valid) => {
+					if (valid) {
+                        this.http.post(this.port.project.addUser, {
+                            username: this.addForm.username,
+                            account: this.addForm.account,
+                            companyId: companyId,
+                            roleName: this.addForm.roleName,
+                            parentId: this.user.id,
+                            addType: 0,
+                            flag: 0
+                        } , res => {
+                            this.addLoading = false;
+                            if (res.code == "ok") {
+                                this.addFormVisible = false;
+                                this.$message({
+                                    message: '创建成功',
+                                    type: 'success'
+                                });
+                                this.getFactory();
+                            } else {
+                                this.$message({
+                                    message: res.msg,
+                                    type: 'error'
+                                });
+                            }
+                        }, error => {
+                            this.addLoading = false;
+                            this.addFormVisible = false;
+                            this.$message({
+                                message: error,
+                                type: 'error'
+                            });
+                        })
+					}
+				});
+            },
+            
+			//删除
+			handleDel(index, row) {
+				this.$confirm('确认删除该生产方吗?', '提示', {
+					type: 'warning'
+				}).then(() => {
+                    this.http.post(this.port.base.delCompany, {
+                        id: row.id
+                    }, res => {
+                        if (res.code == "ok") {
+                            this.$message({
+                                message: '删除成功',
+                                type: 'success'
+                            });
+                            this.getFactory();
+                        } else {
+                            this.$message({
+                                message: res.msg,
+                                type: 'error'
+                            });
+                        }
+                    }, error => {
+                        this.$message({
+                            message: error,
+                            type: 'error'
+                        });
+                    })
+				});
+            },
+            
+			//显示编辑界面
+			handleEdit(index, row) {
+                this.editFormVisible = true;
+                var array = [];
+                for(var i in row.relateCompanyList){
+                    array.push(row.relateCompanyList[i].id)
+                }
+                this.editForm = {
+                    id: row.id,
+                    companyName: row.companyName,
+                    companyType: 1,
+                    companyAddress: row.companyAddress,
+                    yLng: row.ylng,
+                    xLat: row.xlat,
+                    companyIds: array,
+                    flag: 1
+                };
+            },
+            
+			//编辑
+			editSubmit() {
+				this.$refs.editForm.validate((valid) => {
+					if (valid) {
+                        this.editLoading = true;
+                        var str = "";
+                        for(var i in this.editForm.companyIds){
+                            if(i == this.editForm.companyIds.length-1){
+                                str += this.editForm.companyIds[i]
+                            } else {
+                                str += this.editForm.companyIds[i] + ","
+                            }
+                        }
+                        this.http.post(this.port.base.addCompany, {
+                            id: this.editForm.id,
+                            companyName: this.editForm.companyName,
+                            companyType: 1,
+                            companyAddress: this.editForm.companyAddress,
+                            yLng: this.editForm.yLng,
+                            xLat: this.editForm.xLat,
+                            companyIds: str,
+                            flag: 1
+                        } , res => {
+                            this.editLoading = false;
+                            if (res.code == "ok") {
+                                this.editFormVisible = false;
+                                this.$message({
+                                    message: '修改成功',
+                                    type: 'success'
+                                });
+                                this.getFactory();
+                            } else {
+                                this.$message({
+                                    message: res.msg,
+                                    type: 'error'
+                                });
+                            }
+                        }, error => {
+                            this.editLoading = false;
+                            this.editFormVisible = false;
+                            this.$message({
+                                message: error,
+                                type: 'error'
+                            });
+                        })
+					}
+				});
+            },
+
+            //获取地图
+            setMap(mapId) {
+                if(mapId == 'addContainer') {
+                    this.map = new AMap.Map('addContainer', {
+                        resizeEnable: true, // 允许缩放
+                        center:[ this.addForm.yLng , this.addForm.xLat ],
+                        zoom:10
+                    })
+
+                    this.marker = new AMap.Marker({
+                        map: this.map,
+                        position: new AMap.LngLat(this.addForm.yLng , this.addForm.xLat),   // 经纬度
+                    });
+                } else {
+                    this.map = new AMap.Map('editContainer', {
+                        resizeEnable: true, // 允许缩放
+                        center:[this.editForm.yLng , this.editForm.xLat],
+                        zoom:10
+                    })
+
+                    this.marker = new AMap.Marker({
+                        map: this.map,
+                        position: new AMap.LngLat(this.editForm.yLng , this.editForm.xLat),   // 经纬度
+                    });
+                }
+                
+                var _this = this;
+                this.map.on('click', function(e) {
+                    if(_this.map){
+                        _this.map.remove(_this.marker);
+                    }
+                    var Lng = e.lnglat.getLng(),
+                    Lat = e.lnglat.getLat();
+                    if(mapId == 'addContainer') {
+                        _this.addForm.yLng = Lng;
+                        _this.addForm.xLat = Lat;
+                    } else {
+                        _this.editForm.yLng = Lng;
+                        _this.editForm.xLat = Lat;
+                    }
+                    _this.marker = new AMap.Marker({
+                        map: _this.map,
+                        position: new AMap.LngLat(Lng , Lat),   // 经纬度
+                    });
+                });
+            },
+
+            // 获取经纬度
+            markLocation(address,mapId) {
+                var _this = this;
+                AMap.plugin('AMap.Geocoder', function() {
+                    var geocoder = new AMap.Geocoder();            
+                    geocoder.getLocation(address, function(status, result) {
+                        if (status === 'complete' && result.info === 'OK') {
+                            // 经纬度                      
+                            var lng = result.geocodes[0].location.lng;
+                            var lat = result.geocodes[0].location.lat;
+                            
+                            _this.noSub = false;
+                            if(mapId == "addContainer") {
+                                _this.addForm.yLng = lng;
+                                _this.addForm.xLat = lat;
+                            } else {
+                                _this.editForm.yLng = lng;
+                                _this.editForm.xLat = lat;
+                            }
+                            
+                            // 添加标记
+                            if(_this.map){
+                                _this.map.remove(_this.marker);
+                                _this.map.setZoomAndCenter(10, [lng, lat]);
+                                _this.marker = new AMap.Marker({
+                                    map: _this.map,
+                                    position: new AMap.LngLat(lng, lat),   // 经纬度
+                                });
+                            }
+
+                        } else {
+                            //console.log('定位失败!');
+                        }
+                    });
+                });
+            }
+        },
+        created() {
+            let height = window.innerHeight;
+            this.tableHeight = height - 210;
+            const that = this;
+            window.onresize = function temp() {
+                that.tableHeight = window.innerHeight - 210;    
+            };
+        },
+        watch: {
+            addFormVisible(val) {
+                if(val){
+                    var _this = this
+                    setTimeout(function(){ _this.setMap('addContainer'); }, 300);
+                }
+            },
+            editFormVisible(val) {
+                if(val){
+                    var _this = this
+                    setTimeout(function(){ _this.setMap('editContainer'); }, 300);
+                }
+            }
+        },
+		mounted() {
+            this.getMsg();
+			this.getFactory();
+        }
+	}
+</script>
+
+<style scoped>
+    .formMap {
+        height: 400px;
+    }
+</style>

+ 173 - 0
lib_vue/src/views/detection/detection.vue

@@ -0,0 +1,173 @@
+<template>
+    <section>
+        <!--工具条-->
+        <el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
+            <el-form :inline="true" :model="filters">
+                <el-col :span="2">
+                    <el-form-item>
+                        <el-select v-model="filters.value" placeholder="请选择查询条件">
+                        <el-option label="编号" value="0"></el-option>
+                        <el-option label="名称" value="1"></el-option>
+                        </el-select>
+                    </el-form-item>
+                </el-col>
+                <el-form-item>
+                    <el-input v-model="filters.name" placeholder="请输入关键字进行搜索" style="width: 300px;" clearable></el-input>
+                </el-form-item>
+                <el-form-item>
+                    <el-button type="primary" @click="getMoulds(filters.name)">查询</el-button>
+                </el-form-item>
+            </el-form>
+        </el-col>
+
+        <!--列表-->
+        <el-table :data="moulds" :height="tableHeight" highlight-current-row v-loading="listLoading" style="width: 100%;">
+            <el-table-column type="index" width="60"></el-table-column>
+            <el-table-column prop="modelNo" label="模具编号" width="100" sortable></el-table-column>
+            <el-table-column label="模具名称" width="200" sortable>
+                <template slot-scope="scope">
+                    <a style="color: #409EFF; cursor: pointer" @click="toMould(scope.row.id)">{{scope.row.modelName}}</a>
+                </template>
+            </el-table-column>
+            <el-table-column prop="equipmentNo" label="云模盒编号" width="180" sortable></el-table-column>
+            <el-table-column prop="projectName" label="所属项目" width="200" sortable></el-table-column>
+            <el-table-column prop="factoryName" label="制造工厂" width="200" sortable></el-table-column>
+            <el-table-column prop="area" label="位置" width="200" sortable></el-table-column>
+            <el-table-column prop="runTimes" label="运行次数" align="center" width="100" sortable></el-table-column>
+            <el-table-column prop="ocCycle" label="每模平均周期" align="center" width="140" sortable></el-table-column>
+            <el-table-column prop="hillNumber" label="电量" align="center" width="80" sortable></el-table-column>
+            <el-table-column prop="lastOpenTime" label="最后开模时间" align="center" width="150" sortable></el-table-column>
+            <el-table-column label="模具状态" align="center" width="100" sortable>
+                <template slot-scope="scope">
+                    <span v-if="scope.row.state == 0">静止</span>
+                    <span v-else-if="scope.row.state == 1">运行</span>
+                    <span v-else-if="scope.row.state == 2">告警</span>
+                    <span v-else-if="scope.row.state == 3">待报废</span>
+                    <span v-else-if="scope.row.state == 4">已报废</span>
+                </template>
+            </el-table-column>
+            <el-table-column label="云模盒报警" align="center" width="160">
+                <template slot-scope="scope">
+                    <span v-if="scope.row.stage == 0">正常</span>
+                    <span v-else-if="scope.row.stage == 1">温度过高</span>
+                    <span v-else-if="scope.row.stage == 2">电量过低</span>
+                    <span v-else-if="scope.row.stage == 3">安装被拆</span>
+                    <span v-else>不明</span>
+                </template>
+            </el-table-column>
+            <el-table-column label="模具保养" align="center" width="100">
+                <template slot-scope="scope">
+                    <span v-if="scope.row.isMaintain == 1">需要</span>
+                    <span v-else>正常</span>
+                </template>
+            </el-table-column>
+            <el-table-column label="处理" align="center" width="85">
+                <template slot-scope="scope">
+                    <el-button size="small" type="primary" @click="toMaintenance(scope.row.id)">详情</el-button>
+                </template>
+            </el-table-column>
+        </el-table>
+
+        <!--工具条-->
+        <el-col :span="24" class="toolbar">
+            <el-pagination
+                @size-change="handleSizeChange"
+                @current-change="handleCurrentChange"
+                :page-sizes="[20 , 50 , 80 , 100 , 200]"
+                :page-size="20"
+                layout="total, sizes, prev, pager, next"
+                :total="total"
+                style="float:right;"
+            ></el-pagination>
+        </el-col>
+    </section>
+</template>
+
+<script>
+import util from "../../common/js/util";
+export default {
+  data() {
+    return {
+      moulds: [],
+      filters: {
+        name: "",
+        value: "0"
+      },
+      listLoading: false,
+      total: 0,
+      tableHeight: 0,
+      page: 1,
+      size: 20
+    };
+  },
+  methods: {
+    //分页
+    handleCurrentChange(val) {
+      this.page = val;
+      this.getMoulds();
+    },
+    handleSizeChange(val) {
+      this.size = val;
+      this.getMoulds();
+    },
+    //跳转到运行监测详情
+    toMaintenance(id) {
+      this.$router.push("/detection/" + id);
+    },
+    //跳转到模具详情
+    toMould(id) {
+      this.$router.push("/moldList/" + id + "/0");
+    },
+    //获取模具信息
+    getMoulds(keyWord) {
+      this.listLoading = true;
+      if (keyWord == null) {
+        var type = 0;
+      } else {
+        var type = this.filters.value;
+      }
+      var params = {
+        pageNum: this.page,
+        pageSize: this.size,
+        projectId: -1,
+        searchType: type,
+        keyName: keyWord,
+        type: 0
+      };
+      this.http.post(
+        this.port.mold.molds,
+        params,
+        res => {
+          this.listLoading = false;
+          if (res.code == "ok") {
+            this.moulds = res.data.list;
+            this.total = res.data.total;
+          } else {
+            this.$message({
+              message: res.msg,
+              type: "error"
+            });
+          }
+        },
+        error => {
+          this.listLoading = false;
+          this.$message({
+            message: error,
+            type: "error"
+          });
+        }
+      );
+    }
+  },
+  created() {
+    let height = window.innerHeight;
+    this.tableHeight = height - 210;
+  },
+  mounted() {
+    this.getMoulds();
+  }
+};
+</script>
+
+<style scoped>
+</style>

+ 726 - 0
lib_vue/src/views/detection/maintenance.vue

@@ -0,0 +1,726 @@
+<template>
+    <section>
+        <!--工具条-->
+        <el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
+            <el-form :inline="true">
+                <el-form-item>
+                    <el-button type="text" @click="backToDetection" icon="el-icon-back" class="back">返回</el-button>
+                </el-form-item>
+                <el-form-item class="divLine"></el-form-item>
+                <el-form-item>{{mouldName}}</el-form-item>
+                <el-form-item class="state" style="float: right;">当前状态:
+                    <span v-if="mouldState == 0">静止</span>
+                    <span v-else-if="mouldState == 1">运动</span>
+                    <span v-else-if="mouldState == 2">告警</span>
+                    <span v-else-if="mouldState == 3">待报废</span>
+                    <span v-else-if="mouldState == 4">已报废</span>
+                </el-form-item>
+            </el-form>
+        </el-col>
+        
+        <el-col :span="24" :style="allDetail">
+            <!-- 模具处理 -->
+            <el-col :span="24" class="title">模具处理</el-col>
+            <el-col :span="6" style="line-height: 32px; border-right: #c3c3c3 1px solid;">
+                当前保养状态:
+                <span v-if="requirement" style="color: #ff4949;">需要</span>
+                <span v-else style="color: black;">正常</span>
+                <el-button size="small" type="primary" @click="showMaintenance" style="margin-left: 16px;"
+                    v-if="!(user.parentId == 1 && user.subordinateType == 1) && requirement">立即处理
+                </el-button>
+            </el-col>
+            <el-col :span="8" :offset="2" style="line-height: 32px;">
+                云模盒告警:{{warningInfo}}
+                <el-button size="small" type="primary" @click="warningFormVisible = true" style="margin-left: 16px;"
+                    v-if="!(user.parentId == 1 && user.subordinateType == 1) && stage != 0">立即处理
+                </el-button>
+            </el-col>
+
+            <!-- 开合周期 -->
+            <el-col :span="24" class="title">开合周期</el-col>
+            <el-col :span="24">
+                <el-col :span="11">
+                    <div style="padding:0 20px">
+                        <b style="font-size:20px;text-align:center;margin-bottom:20px;">开合次数表</b>
+                        <el-date-picker v-model="openNum" style="float:right;width:125px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" @change='changeOpen(1)' size="mini" :clearable="false" type="date" placeholder="选择日期"></el-date-picker>
+                    </div>
+                    <div id="myChart1" :style="{ height: '300px'}"></div>
+                </el-col>
+                <el-col :span="11" :offset="2">
+                    <div style="padding:0 20px">
+                        <b style="font-size:20px;text-align:center;margin-bottom:20px;">开合周期表</b>
+                        <el-date-picker v-model="openCycle" style="float:right;width:210px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" @change='changeOpen(2)' size="mini" :clearable="false" type="daterange" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
+                    </div>
+                    <div id="myChart2" :style="{ height: '300px'}"></div>
+                </el-col>
+            </el-col>
+
+            <!-- 操作记录 -->
+            <el-col :span="24" class="title">处理记录</el-col>
+            <!-- 列表 -->
+            <el-table :data="records" highlight-current-row v-loading="listLoading" style="width: 100%;" :height="tableHeight">
+                <el-table-column type="index" width="60"></el-table-column>
+                <el-table-column prop="maintainUserName" label="保养人" width="100" sortable></el-table-column>
+                <el-table-column prop="maintainType" label="保养方案" sortable>
+                    <template slot-scope="scope">
+                        <span v-if="scope.row.maintainType == 0">喷漆</span>
+                        <span v-else-if="scope.row.maintainType == 1">检查</span>
+                        <span v-else="scope.row.maintainType == 2">易损件</span>
+                    </template>
+                </el-table-column>
+                <el-table-column prop="fileName" label="保养照片" width="200" sortable>
+                    <template slot-scope="scope" v-if="scope.row.fileUrl != null">
+                        <!-- <a style="color: #409EFF; cursor: pointer; text-decoration: none;"
+                            :href="scope.row.fileUrl" :download="scope.row.fileName"> -->
+                            <!-- 大图加载 -->
+                            <div class="demo-image__preview">
+                                <el-image style="width: 100px; height: 100px"
+                                    :src="scope.row.fileUrl" :preview-src-list="scope.row.fileUrl"></el-image>
+                            </div>
+                        <!-- </a> -->
+                    </template>
+                </el-table-column>
+                <el-table-column prop="indate" label="关闭时间" width="200" sortable></el-table-column>
+            </el-table>
+
+            <!--工具条-->
+            <el-col :span="24" class="toolbar">
+                <el-pagination
+                    @size-change="handleSizeChange"
+                    @current-change="handleCurrentChange"
+                    :page-sizes="[20 , 50 , 80 , 100 , 200]"
+                    :page-size="20"
+                    layout="total, sizes, prev, pager, next"
+                    :total="total"
+                    style="float:right;"
+                ></el-pagination>
+            </el-col>
+        </el-col>
+
+        <!--新增界面-->
+        <el-dialog title="处理保养" v-if="maintenanceFormVisible" :visible.sync="maintenanceFormVisible" :close-on-click-modal="false" customClass="customWidth">
+            <el-form :model="maintenanceForm" label-width="100px" :rules="formRules" ref="addForm" :inline="true" class="demo-form-inline">
+                <el-form-item label="保养类型" prop="type">
+                    <!-- 保养类型选择 -->
+                    <el-select v-model="type.value" filterable placeholder="请选择保养类型" style="width:202px">
+                        <el-option v-for="item in type" :key="item.value" :label="item.label" :value="item.value"></el-option>
+                    </el-select>
+                </el-form-item>
+
+                <!-- 保养类型为1时 选择易损件ID -->
+                <el-form-item v-if="type.value == 1" label="易损件" prop="vulnerable">
+                    <el-select v-model="vulnerable.value" clearable filterable placeholder="请选择易损件" style="width:202px">
+                        <el-option v-for="item in vulnerable" :key="item.value" :label="item.label" :value="item.value"></el-option>
+                    </el-select>
+                </el-form-item>
+
+                <!-- 保养类型为0时 选择保养动作 -->
+                <el-form-item v-else label="动作" prop="action">
+                    <el-select v-model="action.value" filterable placeholder="请选择动作" style="width:202px">
+                        <el-option v-for="item in action" :key="item.value" :label="item.label" :value="item.value"></el-option>
+                    </el-select>
+                </el-form-item>
+
+                <el-form-item label="保养照片">
+                    <el-upload ref="upload" action="customize" :http-request="maintain" :limit="1" :auto-upload="false" :before-upload="beforeUpload">
+                        <el-button size="small" type="primary">上传</el-button>
+                    </el-upload>
+                </el-form-item>
+            </el-form>
+            <div slot="footer" class="dialog-footer">
+                <el-button @click.native="maintenanceFormVisible = false">取消</el-button>
+                <el-button type="primary" @click.native="maintainConfirm" :loading="maintenanceLoading">立即处理</el-button>
+            </div>
+        </el-dialog>
+
+        <!--告警处理界面-->
+        <el-dialog title="告警处理" v-if="warningFormVisible" :visible.sync="warningFormVisible" :close-on-click-modal="false" customClass="customWidth">
+            <el-form :model="warningForm" label-width="100px" :rules="formRules" ref="addForm" :inline="true" class="demo-form-inline">
+                <el-form-item label="告警类型">
+                    <el-input placeholder="请选择告警类型" v-model="warningInfo" :disabled="true"></el-input>
+                </el-form-item>
+                <el-form-item label="云模盒设置" prop="action">
+                    <el-select v-model="warningForm.equipmentId" filterable placeholder="请选择云模盒" style="width:202px">
+                        <el-option v-for="item in equipments" :key="item.value" :label="item.label" :value="item.value"></el-option>
+                    </el-select>
+                </el-form-item>
+            </el-form>
+            <div slot="footer" class="dialog-footer">
+                <el-button @click.native="warningFormVisible = false">取消</el-button>
+                <el-button type="primary" @click.native="warningArrangement" :loading="warningLoading">立即处理</el-button>
+            </div>
+        </el-dialog>
+    </section>
+</template>
+
+<script>
+    import util from "../../common/js/util";
+    export default {
+        data() {
+            return {
+                user: JSON.parse(sessionStorage.getItem("user")),
+                detail: '',
+                //本页模具ID
+                mouldId: null,
+                //模具名字
+                mouldName: null,
+                //模具状态
+                mouldState: 0,
+                //记录
+                records: [],
+                //警告信息
+                warningInfo: "",
+                stage: 0,
+                //告警时需要更换的设备的列表
+                equipments: [],
+                //标题栏过滤器
+                filters: {
+                    name: "",
+                    value: ""
+                },
+                listLoading: false,
+                page: 1,
+                size: 20,
+                total: 0,
+                tableHeight: 0,
+                //活跃页面
+                activePage: 0,
+                formRules: {},
+                //保养界面 种类
+                type: [{ label: "动作", value: 0 }, { label: "易损件", value: 1 }],
+                //保养界面 动作
+                action: [{ label: "喷漆", value: 0 }, { label: "检查", value: 1 }],
+                //易损件 假数据
+                vulnerable: [],
+                //是否需要保养 提示
+                requirement: false,
+                prompt: true,
+                //保养详情界面显示
+                maintenanceFormVisible: false,
+                maintenanceLoading: false,
+                //告警详情界面显示
+                warningFormVisible: false,
+                warningLoading: false,
+                //保养详情界面数据
+                maintenanceForm: {
+                    username: "",
+                    account: "",
+                    mobile: "",
+                    teamName: "",
+                    companyId: "",
+                    roleType: "",
+                    flag: 0
+                },
+                //告警处理截面数据
+                warningForm: {
+                    mouldId: null,
+                    equipmentId: null
+                },
+                imageUrl: "",
+                openNum: util.formatDate.format(new Date(), 'yyyy-MM-dd'),
+                openCycle: [util.formatDate.format(new Date(), 'yyyy-MM-dd') , util.formatDate.format(new Date(), 'yyyy-MM-dd')],
+                allDetail: {
+                    overflow: 'auto',
+                    padding: '0px 5px',
+                    height: 0
+                },
+                echarts1: {},
+                echarts2: {},
+            };
+        },
+        methods: {
+            //分页
+            handleCurrentChange(val) {
+                this.page = val;
+                this.getList();
+            },
+
+            handleSizeChange(val) {
+                this.size = val;
+                this.getList();
+            },
+
+            //标签页面切换时
+            handleClick(tab, event) {
+                this.activeTab = tab.name;
+                //应该是取得对应的消息 目前还没写
+            },
+
+            selsChange: function(sels) {
+                this.sels = sels;
+            },
+
+            backToDetection() {
+                this.$router.go(-1);
+            },
+
+            //上传格式和大小限制
+            beforeUpload(file) {
+                const isJPG = file.type === "image/jpg";
+                const isJPEG = file.type === "image/jpeg";
+                const isPNG = file.type === "image/png";
+                var rightType = isJPG || isPNG || isJPEG;
+                const isLt5M = file.size / 1024 / 1024 < 5;
+                if (!rightType) {
+                    this.$message.error("上传的图片只能是 JPG 或 PNG 格式!");
+                }
+                if (!isLt5M) {
+                    this.$message.error("上传的图片大小不能超过 5MB!");
+                }
+                return rightType && isLt5M;
+            },
+
+            //显示保养界面
+            showMaintenance: function() {
+                this.maintenanceFormVisible = true;
+            },
+
+            //获取记录
+            getList() {
+                this.listLoading = true;
+                this.http.post( this.port.mold.moldMaintainList, { 
+                    mouldId: this.mouldId, 
+                    pageSize: this.size, 
+                    pageNum: this.page 
+                },
+                res => {
+                    this.listLoading = false;
+                    if (res.code == "ok") {
+                        this.records = res.data.list;
+                        this.total = res.data.total;
+                    } else {
+                        this.$message({
+                        message: res.msg,
+                        type: "error"
+                        });
+                    }
+                },
+                error => {
+                    this.listLoading = false;
+                    this.$message({
+                        message: error,
+                        type: "error"
+                    });
+                });
+            },
+
+            //模具详情 获取模具名字用的
+            getDetail() {
+                this.http.post( this.port.mold.moldDetail, {
+                    id: this.mouldId
+                },
+                res => {
+                    if (res.code == "ok") {
+                        this.detail = res.data.vo;
+                        this.getEcharts1();
+                        this.getEcharts2();
+                        this.mouldName = res.data.vo.modelName;
+                        this.mouldState = res.data.vo.state;
+                        this.requirement = res.data.vo.isMaintain == 1;
+                        this.stage = res.data.vo.stage;
+                        if(this.stage == 0){
+                            this.warningInfo = "正常";
+                        }else if(this.stage == 1){
+                            this.warningInfo = "温度过高";
+                        }else if(this.stage == 2){
+                            this.warningInfo = "电量过低";
+                        }else if(this.stage == 3){
+                            this.warningInfo = "温度过高、电量过低";
+                        }else{
+                            this.warningInfo = "状况不明";
+                        }
+                    } else {
+                        this.$message({
+                            message: res.msg,
+                            type: "error"
+                        });
+                    }
+                },
+                error => {
+                    this.$message({
+                        message: error,
+                        type: "error"
+                    });
+                });
+            },
+
+            //模具保养的按钮按下之后(关闭之后也要清理文件但是还没写)
+            maintainConfirm() {
+                if (this.$refs.upload.uploadFiles.length == 1) {
+                    this.$refs.upload.submit();
+                } else {
+                    this.$message({
+                    message: "必须上传照片",
+                    type: "error"
+                    });
+                }
+            },
+
+            //模具保养
+            maintain(params) {
+                if (this.type.value != null) {
+                    var fileObj = params.file;
+                    var form = new FormData();
+                    form.append("file", fileObj);
+                    form.append("mouldId", this.mouldId);
+                    form.append("maintainType", this.type.value);
+                    if (this.type.value == 0) {
+                        if (this.action.value == null) {
+                            return;
+                        }
+                        form.append("ways", this.action.value);
+                    } else {
+                        if (this.vulnerable.value == null) {
+                            return;
+                        }
+                        form.append("ways", this.vulnerable.value); //后面应该换成易损件的ID
+                    }
+                    this.http.uploadFile( this.port.mold.moldMaintain, form,
+                    res => {
+                        if (res.code == "ok") {
+                            this.$message({
+                                message: "保养完成",
+                                type: "success"
+                            });
+                            this.maintenanceFormVisible = false;
+                            this.requirement = false;
+                            this.$refs.upload.clearFiles();
+                            this.getList();
+                        } else {
+                            this.$message({
+                                message: res.msg,
+                                type: "error"
+                            });
+                        }
+                    },
+                    error => {
+                        this.listLoading = false;
+                        this.$message({
+                            message: error,
+                            type: "error"
+                        });
+                    });
+                }
+            },
+
+            //获取告警时可以更换的设备列表
+            getAlternativeEquipment() {
+                this.http.post( this.port.mold.moldChangeRequirement, {
+                    mouldId: this.mouldId
+                },
+                res => {
+                    if (res.code == "ok") {
+                        this.equipments = [];
+                        res.data.forEach(item => {
+                            this.equipments.push({ label: item.equipmentNo, value: item.id });
+                        });
+                    } else {
+                        this.$message({
+                            message: res.msg,
+                            type: "error"
+                        });
+                    }
+                },
+                error => {
+                    this.$message({
+                        message: error,
+                        type: "error"
+                    });
+                });
+            },
+
+            //告警处理
+            warningArrangement() {
+                if (this.warningForm.equipmentId == null) {
+                    this.$message({
+                    message: "请选择云模盒",
+                    type: "error"
+                    });
+                } else {
+                    this.http.post( this.port.mold.moldChange, this.warningForm,
+                    res => {
+                        if (res.code == "ok") {
+                            this.$message({
+                                message: "告警处理完毕",
+                                type: "success"
+                            });
+                            this.warningFormVisible = false;
+                        } else {
+                            this.$message({
+                                message: res.msg,
+                                type: "error"
+                            });
+                        }
+                    },
+                    error => {
+                        this.$message({
+                            message: error,
+                            type: "error"
+                        });
+                    });
+                }
+            },
+
+            // 绘制折线图
+            getEcharts1() {
+                this.http.post( this.port.base.openingAndClosingTimesChart, {
+                    equipmentNo: this.detail.equipmentNo,//"898602B5191730002945",
+                    time: this.openNum
+                },
+                res => {
+                    if (res.code == "ok") {
+                        var option = {
+                            tooltip: {
+                                trigger: 'axis'
+                            },
+                            // grid: {
+                            //     left: '3%',
+                            //     right: '4%',
+                            //     bottom: '6%',
+                            //     containLabel: true
+                            // },
+                            xAxis: {
+                                type: 'category',
+                                boundaryGap: false,
+                                data: []
+                            },
+                            yAxis: {
+                                name: '次数(‰)',
+                                type: 'value'
+                            },
+                            dataZoom: [{
+                                type: 'inside',
+                                start: 0,
+                                end: 10
+                            }, {
+                                start: 0,
+                                end: 10,
+                                handleIcon: 'M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4v1.3h1.3v-1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7V23h6.6V24.4z M13.3,19.6H6.7v-1.4h6.6V19.6z',
+                                handleSize: '80%',
+                                handleStyle: {
+                                    color: '#fff',
+                                    shadowBlur: 3,
+                                    shadowColor: 'rgba(0, 0, 0, 0.6)',
+                                    shadowOffsetX: 2,
+                                    shadowOffsetY: 2
+                                }
+                            }],
+                            series: [
+                                {
+                                    name:'开合次数',
+                                    type:'line',
+                                    data:[],
+                                    itemStyle : { 
+                                        normal : { 
+                                            color: "#009ad6", //改变折线点的颜色
+                                            lineStyle:{ 
+                                                color: "#009ad6" //改变折线颜色
+                                            } 
+                                        } 
+                                    }
+                                }
+                            ]
+                        },
+                        list = res.data, 
+                        xData = [], 
+                        sData = [];
+
+                        for(var i in list) {
+                            xData.push(i);
+                            sData.push(list[i])
+                        }
+                        option.xAxis.data = xData;
+                        option.series[0].data = sData;
+
+                        this.drawEchart(1,JSON.stringify(option))
+                    } else {
+                        this.$message({
+                            message: res.msg,
+                            type: "error"
+                        });
+                    }
+                },
+                error => {
+                    this.$message({
+                        message: error,
+                        type: "error"
+                    });
+                });
+            },
+            
+            getEcharts2() {
+                this.http.post( this.port.base.openingAndClosingTimesChartCycle, {
+                    equipmentNo: this.detail.equipmentNo,//"898602B5191730002945",
+                    startTime: this.openCycle[0],
+                    endTime: this.openCycle[1]
+                },
+                res => {
+                    if (res.code == "ok") {
+                        var option = {
+                            tooltip: {
+                                trigger: 'axis'
+                            },
+                            grid: {
+                                left: '3%',
+                                right: '4%',
+                                bottom: '3%',
+                                containLabel: true
+                            },
+                            xAxis: {
+                                type: 'category',
+                                boundaryGap: false,
+                                data: []
+                            },
+                            yAxis: {
+                                name: '秒(s)',
+                                type: 'value'
+                            },
+                            series: [{
+                                name:'最大开盒周期',
+                                type:'line',
+                                stack: '开盒周期',
+                                data:[],
+                                itemStyle : { 
+                                    normal : { 
+                                        color: "#d93a49", //改变折线点的颜色
+                                        lineStyle:{ 
+                                            color: "#d93a49" //改变折线颜色
+                                        } 
+                                    } 
+                                }
+                            },
+                            {
+                                name:'最小开盒周期',
+                                type:'line',
+                                stack: '开盒周期',
+                                data:[],
+                                itemStyle : { 
+                                    normal : { 
+                                        color: "#009ad6", //改变折线点的颜色
+                                        lineStyle:{ 
+                                            color: "#009ad6" //改变折线颜色
+                                        } 
+                                    } 
+                                }
+                            },
+                            {
+                                name:'平均开盒周期',
+                                type:'line',
+                                stack: '开盒周期',
+                                data:[],
+                                itemStyle : { 
+                                    normal : { 
+                                        color: "#7fb80e", //改变折线点的颜色
+                                        lineStyle:{ 
+                                            color: "#7fb80e" //改变折线颜色
+                                        } 
+                                    } 
+                                }
+                            }]
+                        },
+                        list = res.data, 
+                        xData = [], 
+                        avg = [] , max = [] , min = [];
+
+                        for(var i in list) {
+                            xData.push(list[i].time);
+                            max.push(list[i].maxCycle/1000);
+                            min.push(list[i].minCycle/1000);
+                            avg.push(list[i].avgCycle/1000);
+                        }
+                        option.xAxis.data = xData;
+                        option.series[0].data = max;
+                        option.series[1].data = min;
+                        option.series[2].data = avg;
+
+            
+                        this.drawEchart(2,JSON.stringify(option));
+                    } else {
+                        this.$message({
+                            message: res.msg,
+                            type: "error"
+                        });
+                    }
+                },
+                error => {
+                    this.$message({
+                        message: error,
+                        type: "error"
+                    });
+                });
+            },
+            
+
+            drawEchart(type,option) {
+                let myChart = this.echarts.init(document.getElementById("myChart" + type));
+                if(type == 1) {
+                    this.echarts1 = myChart;
+                } else {
+                    this.echarts2 = myChart;
+                }
+                myChart.setOption(JSON.parse(option));
+            },
+
+            changeOpen(type) {
+                if(type == 1) {
+                    this.getEcharts1();
+                } else if(type == 2) {
+                    this.getEcharts2();
+                }
+            },
+        },
+        created() {
+            let height = window.innerHeight;
+            this.tableHeight = height - 370;
+            this.allDetail.height = height - 170 + "px";
+            const that = this;
+            window.onresize = function temp() {
+                that.allDetail.height = window.innerHeight - 170;
+            };
+        },
+        mounted() {
+            this.mouldId = this.$route.params.id; //传到当前页面的模具编号
+            this.warningForm.mouldId = this.mouldId; //顺便把相关的告警中的模具ID赋值一下
+            this.getList();
+            this.getDetail();
+            this.getAlternativeEquipment();
+
+            const that = this
+            window.onresize = function temp() {
+                that.echarts1.resize();
+                that.echarts2.resize();
+            };
+        }
+    };
+</script>
+
+<style scoped>
+    .title {
+        padding-left: 10px;
+        padding-bottom: 0px;
+        margin: 20px 0;
+        font-size: 16px;
+        line-height: 24px;
+        border-left: 1px #20a0ff solid;
+    }
+
+    .toolbar .el-form-item {
+        font-size: 14px;
+        vertical-align: middle;
+    }
+
+    .back {
+        font-size: 16px;
+    }
+
+    .divLine {
+        width: 2px;
+        background: #c3c3c3;
+        height: 100%;
+    }
+
+    .projectTitle {
+        font-size: 18px;
+        color: #333;
+    }
+</style>

+ 151 - 0
lib_vue/src/views/invite.vue

@@ -0,0 +1,151 @@
+<template>
+    <div class="main">
+        <div class="title">云模管理平台</div>
+        <p class="hello">{{detail.invitee}}您好!</p>
+        <p class="invite">
+            {{detail.operator}} 邀您参与
+            <span class="impoortant">{{detail.companyName}}</span>的
+            <span class="impoortant">{{detail.projectName}}</span>项目
+        </p>
+        <div class="info">
+            <p class="info1">您的账户信息</p>
+            <p class="info2">
+                手机号
+                <span>{{detail.account}}</span>
+            </p>
+            <p class="info3">
+                初始密码
+                <span>000000</span>
+            </p>
+        </div>
+        <button @click="join">立即加入</button>
+    </div>
+</template>
+
+<script>
+    import util from "../common/js/util";
+    export default {
+        data() {
+            return {
+                inviteeId: "",
+                projectId: "",
+                operatorId: "",
+                detail: ""
+            };
+        },
+        methods: {
+            join() {
+                this.$router.push("/login");
+            }
+        },
+        created() {},
+        mounted() {
+            //获取传入的值
+            this.inviteeId = this.$route.params.inviteeId;
+            this.projectId = this.$route.params.projectId;
+            this.operatorId = this.$route.params.operatorId;
+
+            this.http.post(this.port.project.inviteUser, {
+                inviteeId: this.inviteeId,
+                projectId: this.projectId,
+                operatorId: this.operatorId
+            } , res => {
+                if (res.code == "ok") {
+                    this.detail = res.data;
+                } else {
+                    this.$message({
+                        message: res.msg,
+                        type: 'error'
+                    });
+                }
+            }, error => {
+                this.$message({
+                    message: error,
+                    type: 'error'
+                });
+            })
+        }
+    };
+</script>
+
+<style scoped>
+    * {
+        margin: 0;
+        padding: 0;
+    }
+
+    .main {
+        margin: 80px auto;
+        width: 360px;
+        color: #555;
+    }
+
+    .title {
+        text-align: center;
+        font-size: 20px;
+        color: #999;
+        line-height: 50px;
+        border-bottom: #ddd 1px solid;
+        margin-bottom: 5px;
+        padding: 0 10px;
+    }
+
+    .impoortant {
+        color: #1e72ff;
+    }
+
+    .hello {
+        line-height: 40px;
+        padding: 0 10px;
+    }
+
+    .invite {
+        line-height: 22px;
+        padding: 0 10px;
+    }
+
+    .info {
+        background-color: #eee;
+        margin: 20px 0;
+        padding: 10px;
+        border-radius: 3px;
+    }
+
+    .info1 {
+        padding-left: 10px;
+        border-left: #1e72ff 1px solid;
+        line-height: 18px;
+    }
+
+
+    .info2 {
+        line-height: 20px;
+        padding: 10px 0;
+    }
+
+    .info3 {
+        line-height: 20px;
+    }
+
+    .info2 span {
+        position: relative;
+        left: 40px;
+        color: #999;
+    }
+
+    .info3 span {
+        position: relative;
+        left: 25px;
+        color: #999;
+    }
+
+    button {
+        background-color: #1e72ff;
+        border: 0;
+        color: white;
+        border-radius: 5px;
+        width: 100%;
+        height: 40px;
+        cursor: pointer;
+    }
+</style>

+ 344 - 0
lib_vue/src/views/map/map.vue

@@ -0,0 +1,344 @@
+<template>
+	<div id="container"></div> 
+</template>
+
+<script>
+    import Vue from 'vue';
+
+	export default {
+		data() {
+			return {
+				
+			}
+		},
+		methods: {
+            getMap() {
+                var _this = this
+                this.http.post( this.port.map.mapList, {},
+                res => {
+                    if (res.code == "ok") {
+                        var list = res.data;
+
+                        if(list != null && list.length > 0){
+                            var map = new AMap.Map('container', {
+                                resizeEnable: true,   
+                                zoom: 5
+                            });
+                            map.clearMap();  
+                            var markers = [] , 
+                                infoWindow , 
+                                data = list;
+
+                            var marker;
+                            for(var i in data){
+                                var jfong=[ data[i].ylng , data[i].xlat];
+                                marker = new AMap.Marker({
+                                    position: jfong,
+                                    zIndex: 101,
+                                    map:map
+                                });	
+                                marker.setMap(map);	
+                                marker.msg = data[i];
+                                marker.on('click', function(data){
+                                    var str = "<div class='window'>" +
+                                        "<div class='info-top'><div>"+ data.target.msg.companyName +"</div><i class='el-icon-close' @click='closeInfoWindow()'></i></div>" +
+                                        "<div class='info-middle'>";
+                                        for(var i in data.target.msg.list){
+                                            str += "<div class='info-item'><a @click='jumpToMold("+ data.target.msg.list[i].id +")'>" + data.target.msg.list[i].modelName + "(" + data.target.msg.list[i].modelNo + ")</a>"
+                                                if(data.target.msg.list[i].state=='0'){
+                                                    str += "<span class='info-state'><span class='info-ball' style='background:#999999;'></span>静止</span>"
+                                                } else {
+                                                    str += "<span class='info-state'><span class='info-ball' style='background:#00CD66;'></span>运行</span>"
+                                                }
+                                            str += "</div>"
+                                        }
+                                        str += "</div>" +
+                                    "</div>"
+
+                                    var MyComponent = Vue.extend({
+                                        template: str ,
+                                        methods:{
+                                            closeInfoWindow:function() {
+                                                map.clearInfoWindow();
+                                            },
+                                            jumpToMold:function(id) {
+                                                _this.$router.push("/moldList/" + id + "/0");
+                                            }
+                                        }
+                                    });
+                                    var component= new MyComponent().$mount();
+                                    infoWindow.setContent(component.$el);
+                                    infoWindow.open(map, data.lnglat);
+                                });
+                            }
+
+                            infoWindow = new AMap.InfoWindow({
+                                isCustom:	true,
+                                draggable: true,  //是否可拖动
+                                showShadow: true,
+                                autoMove: true,
+                                offset: new AMap.Pixel(0, -31),
+                                content:""
+                            });
+
+                            marker.setMap(map);
+                        }
+                    } else {
+                        this.$message({
+                            message: res.msg,
+                            type: "error"
+                        });
+                    }
+                },
+                error => {
+                    this.$message({
+                        message: error,
+                        type: "error"
+                    });
+                });
+            },
+        },
+        mounted() {
+            //this.getMap();
+
+            this.$el.style.height = (window.innerHeight - 100) + "px";
+            const that = this;
+            window.onresize = function temp() {
+                that.$el.style.height = (window.innerHeight - 100) + "px";
+            };
+
+            //新地图
+            var map = new AMap.Map('container', {
+                zoom: 4,
+                //mapStyle: "amap://styles/grey",
+                mapStyle: "amap://styles/8016abec658e1132508723183f848f14",
+                features: ['bg']
+            });
+
+            var _this = this;
+            //加载相关组件
+            AMapUI.load(['ui/geo/DistrictCluster', 'ui/misc/PointSimplifier', 'lib/$' ,  'lib/utils'], function(DistrictCluster, PointSimplifier , $ , utils) {
+
+                window.DistrictCluster = DistrictCluster;
+
+                //启动页面
+                var pointSimplifierIns = new PointSimplifier({
+                    map: map, //所属的地图实例
+                    autoSetFitView: false, //禁止自动更新地图视野
+                    zIndex: 110,
+                    getPosition: function(item) {
+                        if (!item) {
+                            return null;
+                        }
+                        //var parts = item.split(',');
+                        //返回经纬度
+                        //return [parseFloat(parts[0]), parseFloat(parts[1])];
+                        return [parseFloat(item.lng), parseFloat(item.lat)];
+                    },
+                    getHoverTitle: function(dataItem, idx) {
+                        var state = "";
+                        if(dataItem.state == '0'){
+                            state = "静止"
+                        } else if(dataItem.state == '1'){
+                            state = "运动"
+                        } else if(dataItem.state == '2'){
+                            state = "告警"
+                        } else if(dataItem.state == '3'){
+                            state = "报废"
+                        }
+                        return dataItem.modelName + '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' + state;
+                    },
+                    renderOptions: {
+                        //点的样式
+                        pointStyle: {
+                            width: 6,
+                            height: 6,
+                            fillStyle:'rgba(0, 236, 252, 0.9)'
+                        },
+                        //鼠标hover时的title信息
+                        hoverTitleStyle: {
+                            position: 'top'
+                        }
+                    }
+                });
+
+                function MyRender(distClusterIns, opts) {
+                    //直接调用父类的构造函数
+                    MyRender.__super__.constructor.apply(this, arguments);
+                }
+
+                //继承默认引擎
+                utils.inherit(MyRender, DistrictCluster.Render.Default);
+
+                utils.extend(MyRender.prototype, {
+                    drawFeaturePolygons: function(ctx, polygons, styleOptions, feature, dataItems) {
+                        //调用父类方法
+                        MyRender.__super__.drawFeaturePolygons.apply(this, arguments);
+
+                        //直接绘制聚合信息
+                        this.drawMyLabel(feature, dataItems);
+                    },
+                    _initContainter: function() {
+                        //调用父类方法
+                        MyRender.__super__._initContainter.apply(this, arguments);
+
+                        //创建一个新的canvas
+                        this._createCanvas('mylabel', this._container);
+                    },
+                    /**
+                     * 绘制一个蓝底白字的label替代聚合标注
+                     */
+                    drawMyLabel: function(feature, dataItems) {
+                        //if(dataItems.length != 0){
+                            var pixelRatio = this.getPixelRatio(); //高清下存在比例放大
+
+                            var containerPos = map.lngLatToContainer(feature.properties.centroid || feature.properties.center);
+
+                            var labelCtx = this._getCanvasCxt('mylabel');
+
+                            //文字的中心点
+                            var centerX = containerPos.getX() * pixelRatio,
+                                centerY = containerPos.getY() * pixelRatio;
+
+                            labelCtx.save();
+
+                            labelCtx.font = 12 * pixelRatio + 'px 微软雅黑';
+                            
+                            var name = feature.properties.name;
+                            if(feature.properties.level == "province") {
+                                if(name == "黑龙江省" || name == "内蒙古自治区"){
+                                    name = name.substring(0,3)
+                                } else {
+                                    name = name.substring(0,2)
+                                }
+                            }
+                            var text = name;//feature.properties.name ;//+ '\n' + dataItems.length;
+                            var textMetrics = labelCtx.measureText(text);
+                            var halfTxtWidth = textMetrics.width / 2;
+
+                            var num = dataItems.length;
+                            var numMetrics = labelCtx.measureText(num);
+                            var halfNumWidth = numMetrics.width / 2;
+
+                            // labelCtx.fillStyle = 'rgba(3 , 94 , 255 , 0.5)';//'#3366cc';
+                            
+                            labelCtx.beginPath();
+                            labelCtx.fillStyle = 'rgba(12 , 239 , 231 , 0.8)';//'#3366cc';
+
+                            //绘制一个蓝色背景
+                            labelCtx.strokeStyle= "rgba(12 , 239 , 231 , 0.65)"
+                            labelCtx.fillStyle = 'rgba(12 , 239 , 231 , 0.65)';
+                            
+                            var radius = 0;
+                            if(textMetrics.width > numMetrics.width) {
+                                radius = (textMetrics.width + 6 * pixelRatio) / 2;
+                            } else {
+                                radius = (numMetrics.width + 6 * pixelRatio) / 2;
+                            }
+
+                            labelCtx.arc(centerX , centerY, radius + 6,
+                                0*Math.PI, 2*Math.PI, false);
+
+                            labelCtx.closePath();
+                            labelCtx.fill();
+                            // labelCtx.fillRect(centerX - halfTxtWidth - 3 * pixelRatio,
+                            //     centerY - 11 * pixelRatio,
+                            //     textMetrics.width + 6 * pixelRatio,
+                            //     22 * pixelRatio);
+
+                            labelCtx.fillStyle = '#ffffff';
+                            labelCtx.textBaseline = 'middle';
+                            //labelCtx.stroke();
+
+                            labelCtx.fillText(text, centerX - halfTxtWidth, centerY - 5);
+                            labelCtx.fillText(num , centerX - halfNumWidth, centerY + 12);
+
+                            labelCtx.stroke();
+                            labelCtx.restore();
+                        //}
+                    }
+                });
+
+                var distCluster = new DistrictCluster({
+                    zIndex: 100,
+                    map: map, //所属的地图实例
+                    getPosition: function(item) {
+                        if (!item) {
+                            return null;
+                        }
+                        // var parts = item.split(',');
+                        //返回经纬度
+                        //return [parseFloat(parts[0]), parseFloat(parts[1])];
+                        return [parseFloat(item.lng), parseFloat(item.lat)];
+                    },
+                    renderConstructor: MyRender,
+                    //特定区划级别的默认样式
+                    renderOptions: {
+                        getClusterMarker: null,
+                        featureClickToShowSub: true,
+                        featureStyle: {
+                            lineWidth: 2, //描边线宽
+                            // strokeStyle: 'rgba(0, 119, 180, 0.5)', //描边色
+                            strokeStyle: 'rgba(75, 143, 239, 0.5)', //描边色
+                            //鼠标Hover后的样式
+                            hoverOptions: {
+                                fillStyle: 'rgba(255,255,255,0.2)'
+                            }
+                        },
+                        getFeatureStyle: function(feature, dataItems) {
+                            return {
+                                fillStyle: ''
+                            };
+                        }
+                    },
+                });
+
+                window.distCluster = distCluster;
+
+                map.on('zoomend', function() {
+                    var zoom = map.getZoom();
+                    //获取 pointStyle
+                    var pointStyle = pointSimplifierIns.getRenderOptions().pointStyle;
+                    //根据当前zoom调整点的尺寸
+                    pointStyle.width = pointStyle.height = 2 * Math.pow(1.2, map.getZoom() - 3);
+                });
+
+                var zoom = map.getZoom();
+                //获取 pointStyle
+                var pointStyle = pointSimplifierIns.getRenderOptions().pointStyle;
+                //根据当前zoom调整点的尺寸
+                pointStyle.width = pointStyle.height = 2 * Math.pow(1.2, map.getZoom() - 3);
+
+                $('<div id="loadingTip">加载数据,请稍候...</div>').appendTo(document.body);
+                // $.get('https://a.amap.com/amap-ui/static/data/10w.txt', function(csv) {
+                
+                //     $('#loadingTip').remove();
+                //     var data = csv.split('\n');
+                //     distCluster.setData(data);
+                //     pointSimplifierIns.setData(data);
+                // });
+                _this.http.post( _this.port.map.newMap, {},
+                res => {
+                    $('#loadingTip').remove();
+                    var data = res.data;
+                    distCluster.setData(data);
+                    pointSimplifierIns.setData(data);
+                },
+                error => {
+                    _this.$message({
+                        message: error,
+                        type: "error"
+                    });
+                })
+            });
+        }
+	}
+
+</script>
+
+<style scoped lang="scss">
+    #container {
+        width: 100%; 
+        margin-top: 10px;
+    }  
+</style>

+ 264 - 0
lib_vue/src/views/message.vue

@@ -0,0 +1,264 @@
+<template>
+  <section>
+    <!--工具条-->
+    <el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
+      <el-form :inline="true">
+        <el-col :span="2">
+          <el-form-item>消息中心</el-form-item>
+        </el-col>
+      </el-form>
+    </el-col>
+
+    <!--选项卡-->
+    <el-col :span="24">
+      <el-tabs v-model="activePage" @tab-click="handleClick" type="card">
+        <el-tab-pane name="0" label="审批">
+          <div :style="heightString">
+            <span v-if="messages[0].length == 0">目前暂无消息</span>
+            <div
+              class="message-div"
+              v-for="item in messages[0]"
+              @click="locationHerf(item.id, item.refId, item.noticeType, item.belongType)"
+            >
+              <p>
+                <span class="message-title isRead" v-if="item.isRead == 1">{{item.projectName}}</span>
+                <span class="message-title" v-else>{{item.projectName}}</span>
+                <span class="message-time">{{item.indate}}</span>
+              </p>
+              <p class="message-article">{{item.content}}</p>
+            </div>
+          </div>
+          <!--分页1-->
+          <el-col :span="24" class="toolbar">
+            <el-pagination
+              @size-change="handleSizeChange0"
+              @current-change="handleCurrentChange0"
+              :page-sizes="[20 , 50 , 80 , 100 , 200]"
+              :page-size="20"
+              layout="total, sizes, prev, pager, next"
+              :total="total[0]"
+              style="float:right;"
+            ></el-pagination>
+          </el-col>
+        </el-tab-pane>
+        <el-tab-pane name="1" label="警告">
+          <div :style="heightString">
+            <span v-if="messages[1].length == 0">目前暂无消息</span>
+            <div
+              class="message-div"
+              v-for="item in messages[1]"
+              @click="locationHerf(item.id, item.refId, item.noticeType, null)"
+            >
+              <p>
+                <span class="message-title isRead" v-if="item.isRead == 1">{{item.projectName}}</span>
+                <span class="message-title" v-else>{{item.projectName}}</span>
+                <span class="message-time">{{item.indate}}</span>
+              </p>
+              <p class="message-article">{{item.content}}</p>
+            </div>
+          </div>
+          <!--分页2-->
+          <el-col :span="24" class="toolbar">
+            <el-pagination
+              @size-change="handleSizeChange1"
+              @current-change="handleCurrentChange1"
+              :page-sizes="[20 , 50 , 80 , 100 , 200]"
+              :page-size="20"
+              layout="total, sizes, prev, pager, next"
+              :total="total[1]"
+              style="float:right;"
+            ></el-pagination>
+          </el-col>
+        </el-tab-pane>
+        <el-tab-pane name="2" label="保养">
+          <div :style="heightString">
+            <span v-if="messages[2].length == 0">目前暂无消息</span>
+            <div
+              class="message-div"
+              v-for="item in messages[2]"
+              @click="locationHerf(item.id, item.refId, item.noticeType, null)"
+            >
+              <p>
+                <span class="message-title isRead" v-if="item.isRead == 1">{{item.projectName}}</span>
+                <span class="message-title" v-else>{{item.projectName}}</span>
+                <span class="message-time">{{item.indate}}</span>
+              </p>
+              <p class="message-article">{{item.content}}</p>
+            </div>
+          </div>
+          <!--分页3-->
+          <el-col :span="24" class="toolbar">
+            <el-pagination
+              @size-change="handleSizeChange2"
+              @current-change="handleCurrentChange2"
+              :page-sizes="[20 , 50 , 80 , 100 , 200]"
+              :page-size="20"
+              layout="total, sizes, prev, pager, next"
+              :total="total[2]"
+              style="float:right;"
+            ></el-pagination>
+          </el-col>
+        </el-tab-pane>
+      </el-tabs>
+    </el-col>
+  </section>
+</template>
+
+<script>
+import util from "../common/js/util";
+export default {
+  data() {
+    return {
+      messages: [[], [], []],
+      page0: 1,
+      page1: 1,
+      page2: 1,
+      size: 20,
+      total: [0, 0, 0],
+      tableHeight: 0,
+      activePage: 0,
+      heightString: ""
+    };
+  },
+  methods: {
+    //分页1
+    handleCurrentChange0(val) {
+      this.page0 = val;
+      this.loadNotice();
+    },
+    handleSizeChange0(val) {
+      this.size1 = val;
+      this.loadNotice();
+    },
+    //分页2
+    handleCurrentChange1(val) {
+      this.page2 = val;
+      this.loadNotice();
+    },
+    handleSizeChange1(val) {
+      this.size = val;
+      this.loadNotice();
+    },
+    //分页3
+    handleCurrentChange2(val) {
+      this.page = val;
+      this.loadNotice();
+    },
+    handleSizeChange2(val) {
+      this.size = val;
+      this.loadNotice();
+    },
+    //标签页面切换时
+    handleClick(tab, event) {
+      this.activeTab = tab.name;
+    },
+    //读取消息提示
+    loadNotice() {
+      this.http.post(
+        this.port.notice.list,
+        {
+          pageNum: this.page,
+          pageSize: this.size
+        },
+        res => {
+          if (res.code == "ok") {
+            this.messages = [];
+            this.messages.push(res.data[0].approvelList.list);
+            this.messages.push(res.data[1].matainList.list);
+            this.messages.push(res.data[2].emergencyList.list);
+            this.total[0] = res.data[0].approvelList.total;
+            this.total[1] = res.data[1].matainList.total;
+            this.total[2] = res.data[2].emergencyList.total;
+          } else {
+            this.$message({
+              message: res.msg,
+              type: "error"
+            });
+          }
+        },
+        error => {
+          this.$message({
+            message: error,
+            type: "error"
+          });
+        }
+      );
+    },
+    //点击消息的跳转
+    locationHerf(id, refid, type, approval) {
+      this.http.post(
+        this.port.notice.read,
+        {
+          id: id
+        },
+        res => {
+          if (res.code == "ok") {
+          } else {
+            this.$message({
+              message: res.msg,
+              type: "error"
+            });
+          }
+        },
+        error => {
+          this.$message({
+            message: error,
+            type: "error"
+          });
+        }
+      );
+      if (type == 0) {
+        //审批 跳转到模具详情
+        this.$router.push("/moldList/" + refid + "/" + approval);
+      } else if (type == 1) {
+        //警告 跳转到运行监测
+        this.$router.push("/detection");
+      } else if (type == 2) {
+        //保养 跳转到运行监测详情
+        this.$router.push("/detection/" + refid);
+      }
+    }
+  },
+  created() {
+    let height = window.innerHeight;
+    this.tableHeight = height - 260;
+    this.heightString = "height: " + this.tableHeight + "px";
+  },
+  mounted() {
+    this.loadNotice();
+  }
+};
+</script>
+
+<style scoped>
+.message-div {
+  cursor: pointer;
+  padding: 5px 0;
+}
+
+.message-div > p {
+  line-height: 25px;
+  margin: 0;
+}
+
+.message-type {
+  font-weight: 700;
+}
+
+.message-time {
+  padding-left: 30px;
+  color: #777;
+}
+
+.message-title {
+  color: #409eff;
+}
+
+.message-article {
+  color: #555;
+}
+
+.isRead {
+  color: #999 !important;
+}
+</style>

Разлика између датотеке није приказан због своје велике величине
+ 1776 - 0
lib_vue/src/views/mold/moldDetail.vue


+ 250 - 0
lib_vue/src/views/mold/moldDownload.vue

@@ -0,0 +1,250 @@
+<template slot-scope="scope">
+  <section>
+    <!--工具条-->
+    <el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
+      <el-form :inline="true" :model="filters">
+        <el-form-item>
+          <el-input v-model="filters.name" placeholder="请输入模具名称进行搜索"></el-input>
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" @click="getFileList(filters.name)">查询</el-button>
+        </el-form-item>
+        <el-form-item style="float: right;">
+          <el-dropdown>
+            <el-button type="primary">
+              下载
+              <i class="el-icon-arrow-down el-icon--right"></i>
+            </el-button>
+            <el-dropdown-menu slot="dropdown">
+              <el-dropdown-item @click.native="download(0)">全部下载</el-dropdown-item>
+              <el-dropdown-item @click.native="download(1)" divided>模具3D图档</el-dropdown-item>
+              <el-dropdown-item @click.native="download(2)">模具2D图档</el-dropdown-item>
+              <el-dropdown-item @click.native="download(3)">零件3D图档</el-dropdown-item>
+              <el-dropdown-item @click.native="download(4)">零件2D图档</el-dropdown-item>
+              <el-dropdown-item @click.native="download(5)">保养方案</el-dropdown-item>
+            </el-dropdown-menu>
+          </el-dropdown>
+        </el-form-item>
+      </el-form>
+    </el-col>
+
+    <!--列表-->
+    <el-table :data="documents" :height="tableHeight" highlight-current-row v-loading="listLoading" style="width: 100%;" @selection-change="selectionChanged">
+        <el-table-column type="selection" width="50"></el-table-column>
+        <el-table-column type="index" width="60"></el-table-column>
+        <el-table-column label="模具名称">
+            <template slot-scope="scope">
+                <router-link :to="'/moldList/' + scope.row.id + '/0'" tag="span" style="color: #409eff;cursor: pointer;">{{scope.row.modelName}}</router-link>
+            </template>
+        </el-table-column>
+        <el-table-column width="250" label="模具3D图档">
+            <template slot-scope="scope">
+            <span v-if="scope.row.mould3DFiles.length == 0">未上传</span>
+            <span v-else-if="scope.row.mould3DFilesState">已通过</span>
+            <span v-else>未通过</span>
+            </template>
+        </el-table-column>
+        <el-table-column width="250" label="模具2D图档">
+            <template slot-scope="scope">
+            <span v-if="scope.row.mould2DFiles.length == 0">未上传</span>
+            <span v-else-if="scope.row.mould2DFilesState">已通过</span>
+            <span v-else>未通过</span>
+            </template>
+        </el-table-column>
+        <el-table-column width="250" label="零件3D图档">
+            <template slot-scope="scope">
+            <span v-if="scope.row.sparepart3DFiles.length == 0">未上传</span>
+            <span v-else-if="scope.row.sparepart3DFilesState">已通过</span>
+            <span v-else>未通过</span>
+            </template>
+        </el-table-column>
+        <el-table-column width="250" label="零件2D图档">
+            <template slot-scope="scope">
+            <span v-if="scope.row.sparepart2DFiles.length == 0">未上传</span>
+            <span v-else-if="scope.row.sparepart2DFilesState">已通过</span>
+            <span v-else>未通过</span>
+            </template>
+        </el-table-column>
+        <el-table-column width="250" label="保养方案">
+            <template slot-scope="scope">
+            <span v-if="scope.row.maintainFiles.length == 0">未上传</span>
+            <span v-else-if="scope.row.maintainFilesState">已通过</span>
+            <span v-else>未通过</span>
+            </template>
+        </el-table-column>
+    </el-table>
+
+    <!--工具条-->
+    <el-col :span="24" class="toolbar">
+      <el-pagination
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+        :page-sizes="[20 , 50 , 80 , 100 , 200]"
+        :page-size="20"
+        layout="total, sizes, prev, pager, next"
+        :total="total"
+        style="float:right;"
+      ></el-pagination>
+    </el-col>
+  </section>
+</template>
+
+<script>
+import util from "../../common/js/util";
+export default {
+  data() {
+    return {
+      documents: [],
+      filters: {
+        name: "",
+        value: ""
+      },
+      listLoading: false,
+      page: 1,
+      size: 20,
+      total: 0,
+      tableHeight: 0,
+      selectedArray: []
+    };
+  },
+  methods: {
+    //分页
+    handleCurrentChange(val) {
+      this.page = val;
+      this.getFileList();
+    },
+    handleSizeChange(val) {
+      this.size = val;
+      this.getFileList();
+    },
+    //获取列表
+    getFileList(keyword) {
+      this.http.post(
+        this.port.mold.moldFileDowloadList,
+        {
+          keyName: keyword,
+          pageSize: this.size,
+          pageNum: this.page
+        },
+        res => {
+          if (res.code == "ok") {
+            this.documents = res.data.list;
+            this.total = res.data.total;
+            //对于拿到的所有数据
+            this.documents.forEach(file => {
+              var mould2DFilesState = true;
+              var mould3DFilesState = true;
+              var sparepart2DFilesState = true;
+              var sparepart3DFilesState = true;
+              var maintainFilesState = true;
+              //看看每种文档中的所有文件
+              file.mould2DFiles.forEach(item => {
+                if (item.state != 3) {
+                  mould2DFilesState = false;
+                }
+              });
+              file.mould3DFiles.forEach(item => {
+                if (item.state != 3) {
+                  mould3DFilesState = false;
+                }
+              });
+              file.sparepart2DFiles.forEach(item => {
+                if (item.state != 3) {
+                  sparepart2DFilesState = false;
+                }
+              });
+              file.sparepart3DFiles.forEach(item => {
+                if (item.state != 3) {
+                  sparepart3DFilesState = false;
+                }
+              });
+              file.maintainFiles.forEach(item => {
+                if (item.state != 3) {
+                  maintainFilesState = false;
+                }
+              });
+              //把计算好的状态装进这个模具对象中
+              file.mould2DFilesState = mould2DFilesState;
+              file.mould3DFilesState = mould3DFilesState;
+              file.sparepart2DFilesState = sparepart2DFilesState;
+              file.sparepart3DFilesState = sparepart3DFilesState;
+              file.maintainFilesState = maintainFilesState;
+            });
+          } else {
+            this.$message({
+              message: res.msg,
+              type: "error"
+            });
+          }
+        },
+        error => {
+          this.$message({
+            message: error,
+            type: "error"
+          });
+        }
+      );
+    },
+    //点击复选时
+    selectionChanged(row) {
+      this.selectedArray = [];
+      row.forEach(item => {
+        this.selectedArray.push(item.id);
+      });
+    },
+    //下载
+    download(type) {
+      if (this.selectedArray.length == 0) {
+        this.$message("请选择要下载的文档");
+      } else {
+        this.downloadPost(type);
+      }
+    },
+    //具体的下载
+    downloadPost(type) {
+        var user = sessionStorage.getItem('user') , token = "";
+        if(user != null){
+            token = JSON.parse(user).headImgurl
+        }
+        this.http.get(
+            this.port.mold.moldFileDowloadFile + 
+                "?ids="+ this.selectedArray.join(",") + 
+                "&dwgType=" + type +
+                "&token=" + token
+            ,
+            res => {
+                this.listLoading = false;
+                if (res.code == "ok") {
+                    let a = document.createElement('a')
+                    a.setAttribute('download', res.data.split("/")[2]);
+                    a.setAttribute("href", res.data);
+                    a.click();
+                } else {
+                    this.$message({
+                        message: res.msg,
+                        type: "error"
+                    });
+                }
+            },
+            error => {
+            this.listLoading = false;
+            this.$message({
+                message: error,
+                type: "error"
+            });
+            }
+        );
+    }
+  },
+  created() {
+    let height = window.innerHeight;
+    this.tableHeight = height - 210;
+  },
+  mounted() {
+    this.getFileList();
+  }
+};
+</script>
+
+<style scoped>
+</style>

+ 459 - 0
lib_vue/src/views/mold/moldList.vue

@@ -0,0 +1,459 @@
+<template>
+    <section>
+        <!--工具条-->
+        <el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
+            <el-form :inline="true" :model="filters">
+                <el-col :span="3">
+                    <el-form-item>
+                        <el-select v-model="filters.projectId" clearable placeholder="请选择项目">
+                        <el-option v-for="item in projects" :key="item.id" :label="item.projectName" :value="item.id"></el-option>
+                        </el-select>
+                    </el-form-item>
+                </el-col>
+                <el-col :span="2">
+                    <el-form-item>
+                        <el-select v-model="filters.searchType" placeholder="请选择查询条件">
+                        <el-option label="编号" value="0"></el-option>
+                        <el-option label="名称" value="1"></el-option>
+                        </el-select>
+                    </el-form-item>
+                </el-col>
+                <el-form-item>
+                    <el-input v-model="filters.keyName" placeholder="请输入编号或名称进行搜索"></el-input>
+                </el-form-item>
+                <el-form-item>
+                    <el-button type="primary" @click="getMoldList">查询</el-button>
+                </el-form-item>
+                <el-form-item style="float: right" v-if="user.parentId == 1 && user.subordinateType == 0">
+                    <el-button type="primary" @click="showAdd">新建</el-button>
+                </el-form-item>
+            </el-form>
+        </el-col>
+
+        <!--列表-->
+        <el-table :data="molds" :height="tableHeight" highlight-current-row v-loading="listLoading" style="width: 100%;">
+            <el-table-column type="index" width="40"></el-table-column>
+            <el-table-column prop="modelName" label="模具名称" width="140" sortable>
+                <template slot-scope="scope">
+                    <el-link :underline="false" type="primary" @click="toDetail(scope.row)">{{scope.row.modelName}}</el-link>
+                </template>
+            </el-table-column>
+            <el-table-column prop="modelNo" label="模具编号" width="120" sortable></el-table-column>
+            <el-table-column prop="equipmentNo" label="云模盒编号" width="120" sortable></el-table-column>
+            <el-table-column prop="hillNumber" label="电量" align="center" width="100" sortable></el-table-column>
+            <el-table-column prop="diffTime" label="倒计时" align="center" width="100" sortable></el-table-column>
+            <el-table-column prop="projectName" label="所属项目" width="140" sortable></el-table-column>
+            <el-table-column prop="companyName" label="所属资产方" width="300" sortable></el-table-column>
+            <el-table-column prop="produceCompany" label="所属生产方" width="200" sortable></el-table-column>
+            <el-table-column prop="initialModulus" label="初始模次" width="100" align="center" sortable></el-table-column>
+            <el-table-column prop="settingLife" label="模次寿命" width="100" align="center" sortable></el-table-column>
+            <el-table-column prop="holes" label="穴数" width="100" align="center" sortable></el-table-column>
+            <el-table-column prop="rfid" label="对应RFID码" width="120" align="center" sortable></el-table-column>
+            <el-table-column label="状态" width="100" align="center" sortable>
+                <template slot-scope="scope">
+                    <span v-if="scope.row.state == 1" style="color:#00CD66;">运行</span>
+                    <span v-else style="color:#999999;">静止</span>
+                </template>
+            </el-table-column>
+            <el-table-column label="操作" width="150" align="center" sortable v-if="user.parentId == 1 && user.subordinateType == 0">
+                <template slot-scope="scope">
+                    <el-button size="small" type="danger" @click="handleDel(scope.row)">删除</el-button>
+                </template>
+            </el-table-column>
+        </el-table>
+
+        <!--工具条-->
+        <el-col :span="24" class="toolbar">
+            <el-pagination
+                @size-change="handleSizeChange"
+                @current-change="handleCurrentChange"
+                :page-sizes="[20 , 50 , 80 , 100]"
+                :page-size="20"
+                layout="total, sizes, prev, pager, next"
+                :total="total"
+                style="float:right;"
+            ></el-pagination>
+        </el-col>
+
+        <!--新增界面-->
+        <el-dialog title="新建模具" v-if="addFormVisible" :visible.sync="addFormVisible" :close-on-click-modal="false" customClass="customWidth">
+            <el-form :model="addForm" label-width="100px" :rules="formRules" ref="addForm" :inline="true" class="demo-form-inline">
+                <el-form-item label="模具名称" prop="modelName">
+                    <el-input v-model="addForm.modelName" autocomplete="off" placeholder="请输入模具名称" style="width:202px"></el-input>
+                </el-form-item>
+                <el-form-item label="模具编号" prop="modelNo">
+                    <el-input v-model="addForm.modelNo" autocomplete="off" placeholder="请输入模具编号" style="width:202px"></el-input>
+                </el-form-item>
+                <el-form-item label="云模盒编号" prop="equipmentId">
+                    <el-select v-model="addForm.equipmentId" clearable filterable placeholder="请选择云模盒编号" style="width:202px">
+                        <el-option v-for="item in boxes" :key="item.id" :label="item.equipmentNo" :value="item.id"></el-option>
+                    </el-select>
+                </el-form-item>
+                <el-form-item label="初始模次" prop="initialModulus">
+                    <el-input v-model="addForm.initialModulus" autocomplete="off" placeholder="请输入初始模次" style="width:202px"></el-input>
+                </el-form-item>
+                <el-form-item label="模次寿命" prop="settingLife">
+                    <el-input v-model="addForm.settingLife" autocomplete="off" placeholder="请输入模次寿命" style="width:202px"></el-input>
+                </el-form-item>
+                <el-form-item label="RIFD码" prop="rfid">
+                    <el-input v-model="addForm.rfid" autocomplete="off" placeholder="请输入RIFD码" style="width:202px"></el-input>
+                </el-form-item>
+                <el-form-item label="穴数" prop="holes">
+                    <el-input v-model="addForm.holes" autocomplete="off" placeholder="请输入穴数" style="width:202px"></el-input>
+                </el-form-item>
+                <el-form-item label="所属生产方" prop="produceCompanyId">
+                    <el-select v-model="addForm.produceCompanyId" clearable filterable placeholder="请选择所属生产方" style="width:202px">
+                        <el-option v-for="item in companys" :key="item.id" :label="item.companyName" :value="item.id"></el-option>
+                    </el-select>
+                </el-form-item>
+                <el-form-item label="保养次数" prop="maintainCount">
+                    <el-select v-model="addForm.maintainCount" clearable multiple allow-create filterable default-first-option placeholder="请选择保养次数" style="width:515px">
+                        <el-option v-for="item in maintainCount" :key="item" :label="item" :value="item"></el-option>
+                    </el-select>
+                </el-form-item>
+            </el-form>
+            <div slot="footer" class="dialog-footer">
+                <el-button @click.native="addFormVisible = false">取消</el-button>
+                <el-button type="primary" @click.native="addSubmit" :loading="addLoading">提交</el-button>
+            </div>
+        </el-dialog>
+    </section>
+</template>
+
+<script>
+    import util from "../../common/js/util";
+    export default {
+        data() {
+            const checkInitialModulus = (rule, value, callback) => {
+                if (!value) {
+                    return callback(new Error('请输入初始模次'));
+                } else {
+                    if((/^[+]{0,1}(\d+)$|^[+]{0,1}(\d+\.\d+)$/).test(value) == false){
+                        callback(new Error("请填写大于0的数字"));
+                    }else{
+                        if (value > 100000000) {
+                            callback(new Error("请填写小于等于1亿的数字"));
+                        }else{
+                            callback();
+                        }
+                    }
+                }
+            };
+            const checkSettingLife = (rule, value, callback) => {
+                if (!value) {
+                    return callback(new Error('请输入模次寿命'));
+                } else {
+                    if((/^[+]{0,1}(\d+)$|^[+]{0,1}(\d+\.\d+)$/).test(value) == false){
+                        callback(new Error("请填写大于0的数字"));
+                    }else{
+                        if (value > 100000000) {
+                            callback(new Error("请填写小于等于1亿的数字"));
+                        }else{
+                            callback();
+                        }
+                    }
+                }
+            };
+            return {
+                user: JSON.parse(sessionStorage.getItem("user")),
+                molds: [],
+                filters: {
+                    keyName: "",
+                    searchType: "编号",
+                    projectId: ""
+                },
+                team: [{label:'资产方',value:0},{label:'生产方',value:1}],
+
+                formRules: {
+                    modelNo: [
+                        { required: true, message: "请输入模具编号", trigger: "blur" }
+                    ],
+                    modelName: [
+                        { required: true, message: "请输入模具名称", trigger: "blur" }
+                    ],
+                    equipmentId: [
+                        { required: true, message: "请选择云模盒编号", trigger: ["blur", "change"] }
+                    ],
+                    initialModulus: [
+                        // { required: true, message: "请输入初始模次", trigger: "blur" }
+                        { required: true, validator: checkInitialModulus, trigger: 'blur'}
+                    ],
+                    settingLife: [
+                        // { required: true, message: "请输入模次寿命", trigger: "blur" }
+                        { required: true, validator: checkSettingLife, trigger: 'blur'}
+                    ],
+                    rfid: [
+                        { required: true, message: "请输入RIFD码", trigger: "blur" }
+                    ],
+                    holes: [
+                        { required: true, message: "请输入穴数", trigger: "blur" }
+                    ],
+                    produceCompanyId: [
+                        { required: true, message: "请选择所属生产方", trigger: ["blur", "change"] }
+                    ],
+                    maintainCount: [
+                        { required: true, message: "请输入保养次数", trigger: ["blur", "change"] }
+                    ]
+                },
+                listLoading: false,
+                total: 0,
+                size: 20,
+                tableHeight: 0,
+
+                boxes: [],
+                companys: [],
+                projects: [],
+
+                maintainCount: [5000,10000,15000,20000,25000],
+
+                addLoading: false,
+                addFormVisible: false,
+                addForm: {
+                    modelNo: "",
+                    modelName: "",
+                    equipmentId: "",
+                    initialModulus: "",
+                    settingLife: "",
+                    maintainCount: [],
+                    rfid: "",
+                    holes: "",
+                    produceCompanyId: ""
+                }
+            };
+        },
+        methods: {
+            //获取模具
+            getMoulds(){
+                this.http.post( this.port.base.moulds, {
+                    belongCompanyId: this.user.companyId
+                },
+                res => {
+                    if (res.code == "ok") {
+                        this.boxes = res.data;
+                    } else {
+                        this.$message({
+                        message: res.msg,
+                        type: "error"
+                        });
+                    }
+                },
+                error => {
+                    this.listLoading = false;
+                    this.$message({
+                        message: error,
+                        type: "error"
+                    });
+                });
+            },
+            getMsg() {
+                //获取模具
+                this.getMoulds();
+                //新版获取公司
+                this.http.post(this.port.base.relationList, {
+                    companyType: 1
+                }, res => {
+                    if (res.code == "ok") {
+                        this.companys = res.data;
+                    } else {
+                        this.$message({
+                            message: res.msg,
+                            type: 'error'
+                        });
+                    }
+                }, error => {
+                    this.$message({
+                        message: error,
+                        type: 'error'
+                    });
+                });
+                
+            },
+            getPro() {
+                //获取项目
+                this.http.post( this.port.project.projects, {},
+                res => {
+                    if (res.code == "ok") {
+                        this.projects = res.data;
+                    } else {
+                        this.$message({
+                            message: res.msg,
+                            type: "error"
+                        });
+                    }
+                },
+                error => {
+                    this.listLoading = false;
+                    this.$message({
+                        message: error,
+                        type: "error"
+                    });
+                });
+            },
+            //分页
+            handleCurrentChange(val) {
+                this.page = val;
+                this.getMoldList();
+            },
+
+            handleSizeChange(val) {
+                this.size = val;
+                this.getMoldList();
+            },
+
+            //获取模具列表
+            getMoldList() {
+                this.listLoading = true;
+                this.http.post( this.port.mold.molds, {
+                    keyName: this.filters.keyName,
+                    pageNum: this.page,
+                    pageSize: this.size,
+                    projectId: this.filters.projectId == "" ? -1 : this.filters.projectId,
+                    searchType: this.filters.searchType == "编号"? 0:1
+                },
+                res => {
+                    this.listLoading = false;
+                    if (res.code == "ok") {
+                        var list = res.data.list
+                        for(var i in list){
+                            if(list[i].endTime == null){
+                                list[i].diffTime = "";
+                            } else {
+                                list[i].diffTime = util.formatDate.dateDiff(
+                                    // util.formatDate.format(new Date(list[i].endTime), 'yyyy-MM-dd'), 
+                                    list[i].endTime,
+                                    util.formatDate.format(new Date(new Date()), 'yyyy-MM-dd')
+                                );
+                            }
+                        }
+                        this.molds = list;
+                        this.total = res.data.total;
+                    } else {
+                        this.$message({
+                            message: res.msg,
+                            type: "error"
+                        });
+                    }
+                },
+                error => {
+                    this.listLoading = false;
+                    this.$message({
+                        message: error,
+                        type: "error"
+                    });
+                });
+            },
+
+            //详情
+            toDetail(row) {
+                this.$router.push("/moldList/" + row.id + "/0");
+            },
+
+            //删除
+			handleDel: function (row) {
+                this.$confirm('确认删除该模具吗?', '提示', {
+					type: 'warning'
+				}).then(() => {
+                    this.http.post(this.port.mold.delMold, {
+                        id: row.id
+                    }, res => {
+                        if (res.code == "ok") {
+                            this.$message({
+                                message: '删除成功',
+                                type: 'success'
+                            });
+                            this.getMoldList();
+                        } else {
+                            this.$message({
+                                message: res.msg,
+                                type: 'error'
+                            });
+                        }
+                    }, error => {
+                        this.$message({
+                            message: error,
+                            type: 'error'
+                        });
+                    })
+				});
+            },
+
+            //添加界面
+            showAdd() {
+                this.getMoulds();
+                this.addFormVisible = true;
+                this.addForm = {
+                    modelNo: "",
+                    modelName: "",
+                    equipmentId: "",
+                    initialModulus: "",
+                    settingLife: "",
+                    maintainCount: [],
+                    rfid: "",
+                    holes: "",
+                    produceCompanyId: ""
+                };
+            },
+
+            addSubmit() {
+                this.$refs.addForm.validate(valid => {
+                    if (valid) {
+                        this.addLoading = true;
+                        var maintainCount = this.addForm.maintainCount , str = "";
+                        for(var i in maintainCount) {
+                            if(i == maintainCount.length-1){
+                                str += maintainCount[i]
+                            } else {
+                                str += maintainCount[i] + ","
+                            }
+                        }
+                        this.addForm.maintainCount = str;
+                        this.http.post( this.port.mold.addMold, this.addForm,
+                        res => {
+                            this.addLoading = false;
+                            if (res.code == "ok") {
+                                this.addFormVisible = false;
+                                this.$message({
+                                    message: "创建成功",
+                                    type: "success"
+                                });
+                                this.getMoldList();
+                            } else {
+                                this.$message({
+                                    message: res.msg,
+                                    type: "error"
+                                });
+                            }
+                        },
+                        error => {
+                            this.addLoading = false;
+                            this.addFormVisible = false;
+                            this.$message({
+                                message: error,
+                                type: "error"
+                            });
+                        });
+                    }
+                });
+            },
+        },
+        created() {
+            let height = window.innerHeight;
+            this.tableHeight = height - 210;
+            const that = this;
+            window.onresize = function temp() {
+                that.tableHeight = window.innerHeight - 210;
+            };
+        },
+        mounted() {
+            var user = JSON.parse(sessionStorage.getItem("user"));
+            if(user.parentId == 1 && user.subordinateType == 0){
+                this.getMsg();
+            }
+            this.getPro()
+            this.getMoldList();
+        }
+    };
+</script>
+
+<style scoped>
+</style>

+ 296 - 0
lib_vue/src/views/project/competence.vue

@@ -0,0 +1,296 @@
+<template>
+	<section>
+		<!--工具条-->
+		<el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
+			<el-form :inline="true" :model="filters">
+                <el-col :span="3">
+                    <el-form-item>
+                        <el-select v-model="filters.projectId" clearable filterable placeholder="请选择项目">
+                            <el-option v-for="item in projects" :key="item.id" :label="item.projectName" :value="item.id">
+                            </el-option>
+                        </el-select>
+                    </el-form-item>
+                </el-col>
+				<el-form-item>
+					<el-input v-model="filters.keyName" placeholder="请输入姓名进行搜索"></el-input>
+				</el-form-item>
+				<el-form-item>
+					<el-button type="primary" @click="getPowerList">查询</el-button>
+				</el-form-item>
+			</el-form>
+		</el-col>
+
+		<!--列表-->
+		<el-table :data="list" highlight-current-row v-loading="listLoading" :height="tableHeight" style="width: 100%;">
+			<el-table-column type="index" width="60">
+			</el-table-column>
+			<el-table-column prop="username" label="姓名" width="150" sortable>
+			</el-table-column>
+			<el-table-column prop="companyName" label="所属公司" sortable>
+			</el-table-column>
+			<el-table-column prop="projectName" label="项目名称" width="220" sortable>
+			</el-table-column>
+			<el-table-column prop="addr" label="上传" align="center" width="150">
+                <template slot-scope="scope">
+                    <el-checkbox :value="scope.row.update==1?true:false"></el-checkbox>
+                </template>
+			</el-table-column>
+            <el-table-column prop="addr" label="下载" align="center" width="150">
+                <template slot-scope="scope">
+                    <el-checkbox :value="scope.row.download==1?true:false"></el-checkbox>
+                </template>
+			</el-table-column>
+            <el-table-column prop="addr" label="浏览" align="center" width="150">
+                <template slot-scope="scope">
+                    <el-checkbox :value="scope.row.view==1?true:false"></el-checkbox>
+                </template>
+			</el-table-column>
+            <el-table-column prop="addr" label="审批" align="center" width="150">
+                <template slot-scope="scope">
+                    <el-checkbox :value="scope.row.approve==1?true:false"></el-checkbox>
+                </template>
+			</el-table-column>
+			<el-table-column label="操作" width="150" align="center">
+				<template slot-scope="scope">
+					<el-button size="small" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
+				</template>
+			</el-table-column>
+		</el-table>
+
+		<!--工具条-->
+		<el-col :span="24" class="toolbar">
+            <el-pagination
+                @size-change="handleSizeChange"
+                @current-change="handleCurrentChange"
+                :page-sizes="[20 , 50 , 80 , 100]"
+                :page-size="20"
+                layout="total, sizes, prev, pager, next"
+                :total="total"
+                style="float:right;">
+            </el-pagination>
+		</el-col>
+
+		<!--编辑界面-->
+		<el-dialog title="编辑权限" v-if="editFormVisible" :visible.sync="editFormVisible" :close-on-click-modal="false" customClass='customWidth'>
+			<el-form :model="editForm" label-width="80px" ref="editForm">
+				<el-col :span="24">
+                    <el-form-item label="权限配置">
+                        <el-row>
+                            <el-col :span="6" v-for="(item,index) in roleList" :key="item.val" style="text-align:center;">
+                                <el-checkbox v-model="editForm[item.label]" :disabled="index==3?true:false" :checked="editForm[item.label]">{{item.name}}</el-checkbox>
+                            </el-col>
+                        </el-row>
+                    </el-form-item>
+                </el-col>
+			</el-form>
+			<div slot="footer" class="dialog-footer">
+				<el-button @click.native="editFormVisible = false">取消</el-button>
+				<el-button type="primary" @click.native="editSubmit" :loading="editLoading">提交</el-button>
+			</div>
+		</el-dialog>
+	</section>
+</template>
+
+<script>
+	import util from '../../common/js/util'
+	export default {
+		data() {
+			return {
+				filters: {
+                    keyName: '',
+                    projectId: '',
+                },
+                user: JSON.parse(sessionStorage.getItem('user')),
+
+                projects: [],
+
+				list: [],
+				total: 0,
+                page: 1,
+                size: 20,
+                listLoading: false,
+                tableHeight: 0,
+
+				editFormVisible: false,//编辑界面是否显示
+                editLoading: false,
+                roleList: [
+                    {name:'上传',val:0,label:'uploadPower',uploadPower:false},
+                    {name:'下载',val:1,label:'dowloadPower',dowloadPower:false},
+                    {name:'浏览',val:2,label:'viewPower',viewPower:false},
+                    {name:'审批',val:3,label:'approvalPower',approvalPower:false}
+                ],
+				//编辑界面数据
+				editForm: {
+                    id: 0,
+                    projectId: 0,
+                    uploadPower: false,
+                    dowloadPower:false,
+                    viewPower:false,
+                    approvalPower:false,
+				}
+			}
+		},
+		methods: {
+            getMsg() {
+                this.http.post(this.port.project.projects, {}, res => {
+                    if (res.code == "ok") {
+                        this.projects = res.data;
+                    } else {
+                        this.$message({
+                            message: res.msg,
+                            type: 'error'
+                        });
+                    }
+                }, error => {
+                    this.$message({
+                        message: error,
+                        type: 'error'
+                    });
+                })
+            },
+
+            //分页
+			handleCurrentChange(val) {
+				this.page = val;
+				this.getPowerList();
+            },
+
+            handleSizeChange(val) {
+                this.size = val;
+				this.getPowerList();
+            },
+
+			//获取权限列表
+			getPowerList() {
+				this.listLoading = true;
+                this.http.post(this.port.project.powerList, {
+                    projectId: this.filters.projectId,
+                    keyName: this.filters.keyName,
+                    pageNum: this.page,
+                    pageSize: this.size
+                }, res => {
+                    this.listLoading = false;
+                    if (res.code == "ok") {
+                        var list = res.data.list;
+                        for(var i in list){
+                            list[i].update = 0;
+                            list[i].download = 0;
+                            list[i].view = 0;
+                            list[i].approve = 0;
+
+                            var powers = list[i].powers;
+                            for(var j in powers){
+                                if(powers[j].powerType == 0){
+                                    list[i].update = 1;
+                                } else if(powers[j].powerType == 1){
+                                    list[i].download = 1;
+                                } else if(powers[j].powerType == 2){
+                                    list[i].view = 1;
+                                } else if(powers[j].powerType == 3){
+                                    list[i].approve = 1;
+                                }
+                            }
+                        }
+                        this.list = list;
+                        this.total = res.data.total;
+                    } else {
+                        this.$message({
+                            message: res.msg,
+                            type: 'error'
+                        });
+                    }
+                }, error => {
+                    this.listLoading = false;
+                    this.$message({
+                        message: error,
+                        type: 'error'
+                    });
+                })
+            },
+            
+			//显示编辑界面
+			handleEdit: function (index, row) {
+				this.editFormVisible = true;
+				this.editForm = {
+                    id: row.userId,
+                    projectId: row.projectId,
+                    uploadPower: row.update==1?true:false,
+                    dowloadPower: row.download==1?true:false,
+                    viewPower: row.view==1?true:false,
+                    approvalPower: row.approve==1?true:false
+                };
+			},
+			//编辑
+			editSubmit: function () {
+                var str = "";
+
+                if(this.editForm.uploadPower) {
+                    str += "0,"
+                }
+                if(this.editForm.dowloadPower) {
+                    str += "1,"
+                }
+                if(this.editForm.viewPower) {
+                    str += "2,"
+                }
+                if(this.editForm.approvalPower) {
+                    str += "3,"
+                }
+
+                str = str.substring(0,str.length-1)
+
+				this.editLoading = true;
+                this.http.post(this.port.project.powerUpdate, {
+                    id: this.editForm.id,
+                    projectId: this.editForm.projectId,
+                    powers: str
+                }, res => {
+                    this.editLoading = false;
+                    this.editFormVisible = false;
+                    if (res.code == "ok") {
+                        this.$message({
+                            message: '修改成功',
+                            type: 'success'
+                        });
+                        this.getPowerList();
+                    } else {
+                        this.$message({
+                            message: res.msg,
+                            type: 'error'
+                        });
+                    }
+                }, error => {
+                    this.editLoading = false;
+                    this.editFormVisible = false;
+                    this.$message({
+                        message: error,
+                        type: 'error'
+                    });
+                })
+			}
+        },
+        created() {
+            let height = window.innerHeight;
+            this.tableHeight = height - 210;
+            const that = this;
+            window.onresize = function temp() {
+                that.tableHeight = window.innerHeight - 210;    
+            };
+        },
+		mounted() {
+            this.getMsg();
+			this.getPowerList();
+		}
+	}
+
+</script>
+
+<style>
+    .el-table__row .el-checkbox__inner:hover {
+        border-color: #DCDFE6;
+    }
+
+    .el-table__row .el-checkbox , .el-table__row .el-checkbox__input {
+        cursor: inherit;
+    }
+</style>

+ 354 - 0
lib_vue/src/views/project/project.vue

@@ -0,0 +1,354 @@
+<template>
+	<section>
+		<!--工具条-->
+		<el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
+			<el-form :inline="true" :model="filters">
+				<el-form-item>
+					<el-input v-model="filters.keyName" placeholder="请输入项目名称"></el-input>
+				</el-form-item>
+				<el-form-item>
+					<el-button type="primary" v-on:click="getProject">查询</el-button>
+				</el-form-item>
+				<el-form-item style="float:right;" v-if="user.parentId == 1 && user.subordinateType == 0">
+					<el-button type="primary" @click="handleAdd">新增</el-button>
+				</el-form-item>
+			</el-form>
+		</el-col>
+
+		<!--列表-->
+		<el-table :data="list" highlight-current-row v-loading="listLoading" :height="tableHeight" style="width: 100%;">
+			<el-table-column type="index" width="60">
+			</el-table-column>
+			<el-table-column prop="projectName" label="项目名称" width="250" sortable>
+                <template slot-scope="scope">
+                    <el-link :underline="false" type="primary" @click="toDetail(scope.row)">{{scope.row.projectName}}</el-link>
+				</template>
+			</el-table-column>
+            <el-table-column prop="ownerCompanyName" label="资产方公司" sortable>
+			</el-table-column>
+            <el-table-column prop="customCompaniesStr" label="生产方公司" width="450">
+			</el-table-column>
+            <el-table-column prop="manager" label="项目经理" width="100" align="center" sortable>
+			</el-table-column>
+			<el-table-column prop="indate" label="创建时间" width="250" align="center" sortable>
+			</el-table-column>
+			<!-- <el-table-column label="操作" width="250" align="center">
+				<template slot-scope="scope">
+                    <el-button size="small" type="primary" @click="toDetail(scope.row.id)">详情</el-button>
+					<el-button size="small" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
+					<el-button type="danger" size="small" @click="handleDel(scope.$index, scope.row)">删除</el-button>
+				</template>
+			</el-table-column> -->
+		</el-table>
+
+		<!--工具条-->
+		<el-col :span="24" class="toolbar">
+			<el-pagination
+                @size-change="handleSizeChange"
+                @current-change="handleCurrentChange"
+                :page-sizes="[20 , 50 , 80 , 100]"
+                :page-size="20"
+                layout="total, sizes, prev, pager, next"
+                :total="total"
+                style="float:right;">
+            </el-pagination>
+		</el-col>
+
+        <!--新增界面-->
+		<el-dialog title="新增项目" v-if="addFormVisible" :visible.sync="addFormVisible" :close-on-click-modal="false" customClass='customWidth'>
+			<el-form :model="addForm" label-width="120px" :rules="formRules" ref="addForm">
+                <el-col :span="24">
+                    <el-form-item label="项目名称" prop="projectName">
+                        <el-input v-model="addForm.projectName" autocomplete="off" placeholder="请输入项目名称" style="width:510px"></el-input>
+                    </el-form-item>
+                </el-col>
+                <el-col :span="24">
+                    <el-form-item label="项目模具" prop="mold">
+                        <el-select v-model="addForm.mold" @change="companyChange" clearable filterable multiple placeholder="请选择项目模具" value-key='id' style="width:510px">
+                            <el-option v-for="item in molds" :key="item.id" :label="item.modelName" :value="item">
+                                <span style="float: left">{{ item.modelName }}</span>
+                                <span style="float: right; color: #8492a6; font-size: 6px;margin-right:17px;">{{ item.produceCompany }}</span>
+                            </el-option>
+                        </el-select>
+                    </el-form-item>
+                </el-col>
+                <el-col :span="24">
+                    <el-form-item label="项目经理" prop="managerId">
+                        <el-select v-model="addForm.managerId" clearable filterable placeholder="请选择项目经理" value-key='id' style="width:510px">
+                            <!-- <el-option v-for="item in charger" :key="item.id" :label="item.username" :value="item">
+                            </el-option> -->
+                            <el-option v-for="item in charger" :key="item.id" :label="item.username" :value="item">
+                                <span style="float: left">{{ item.username }}</span>
+                                <span style="float: right; color: #8492a6; font-size: 13px;">{{ item.companyName }}</span>
+                            </el-option>
+                        </el-select>
+                    </el-form-item>
+                </el-col>
+			</el-form>
+			<div slot="footer" class="dialog-footer">
+				<el-button @click.native="addFormVisible = false">取消</el-button>
+				<el-button type="primary" @click.native="addSubmit" :loading="addLoading">提交</el-button>
+			</div>
+		</el-dialog>
+	</section>
+</template>
+
+<script>
+	import util from '../../common/js/util'
+
+	export default {
+		data() {
+			return {
+				filters: {
+					keyName: ''
+                },
+                user: JSON.parse(sessionStorage.getItem('user')),
+                charger: [],
+                molds: [],
+
+				list: [],
+				total: 0,
+                page: 1,
+                size: 20,
+                listLoading: false,
+                tableHeight: 0,
+
+                formRules: {
+					projectName: [
+						{ required: true, message: '请输入项目名称', trigger: 'blur' }
+                    ],
+                    mold: [
+                        { required: true, message: '请选择项目模具', trigger: ['blur','change'] }
+                    ],
+                    managerId: [
+                        { required: true, message: '请选择项目经理', trigger: ['blur','change'] }
+                    ]
+                },
+                
+                addFormVisible: false, //新增界面是否显示
+				addLoading: false,
+				//新增界面数据
+				addForm: {
+					projectName: '',
+                    mold: [],
+                    managerId: ''
+				}
+
+			}
+		},
+		methods: {
+            //获取基础数据
+            getMsg(){
+                this.http.post(this.port.project.getUserById, {
+                    companyIds: this.user.companyId,
+                    id: this.user.id
+                } , res => {
+                    if (res.code == "ok") {
+                        this.charger = res.data;
+                    } else {
+                        this.$message({
+                            message: res.msg,
+                            type: 'error'
+                        });
+                    }
+                }, error => {
+                    this.$message({
+                        message: error,
+                        type: 'error'
+                    });
+                })
+
+                //获取模具
+                this.getMoulds();
+            },
+
+            //获取模具
+            getMoulds(){
+                this.http.post(this.port.mold.modelList, {
+                    parentId: this.user.parentId,
+                    id: this.user.id
+                }, res => {
+                    if (res.code == "ok") {
+                        this.molds = res.data;
+                    } else {
+                        this.$message({
+                            message: res.msg,
+                            type: 'error'
+                        });
+                    }
+                }, error => {
+                    this.$message({
+                        message: error,
+                        type: 'error'
+                    });
+                })
+            },
+
+			//分页
+			handleCurrentChange(val) {
+				this.page = val;
+				this.getProject();
+            },
+
+            handleSizeChange(val) {
+                this.size = val;
+				this.getProject();
+            },
+            
+			//获取项目列表
+			getProject() {
+				this.listLoading = true;
+				this.http.post(this.port.project.projectList, {
+                    keyName: this.filters.keyName,
+                    pageNum: this.page,
+                    pageSize: this.size,
+                }, res => {
+                    this.listLoading = false;
+                    if (res.code == "ok") {
+                        var list = res.data.list;
+                        for(var i in list){
+                            var customCompaniesStr = "";
+                            for(var j in list[i].customCompanies){
+                                if(j == list[i].customCompanies.length -1){
+                                    customCompaniesStr += list[i].customCompanies[j].companyName;
+                                } else {
+                                    customCompaniesStr += list[i].customCompanies[j].companyName + "、";
+                                }
+                            }
+                            list[i].customCompaniesStr = customCompaniesStr;
+                        }
+                        this.list = list;
+                        this.total = res.data.total;
+                    } else {
+                        this.$message({
+                            message: res.msg,
+                            type: 'error'
+                        });
+                    }
+                }, error => {
+                    this.listLoading = false;
+                    this.$message({
+                        message: error,
+                        type: 'error'
+                    });
+                })
+            },
+
+            //详情
+            toDetail(row) {
+                this.$router.push('/project/' + row.id);
+            },
+
+            //选择公司切换人员
+            companyChange() {
+                var param = {} ,
+                    str = this.user.companyId;
+                for(var i in this.addForm.mold){
+                    str += "," + this.addForm.mold[i].produceCompanyId;
+                }
+                param.companyIds = str;
+                param.id = this.user.id
+                this.http.post(this.port.project.getUserById, param , res => {
+                    if (res.code == "ok") {
+                        this.charger = res.data;
+                    } else {
+                        this.$message({
+                            message: res.msg,
+                            type: 'error'
+                        });
+                    }
+                }, error => {
+                    this.$message({
+                        message: error,
+                        type: 'error'
+                    });
+                })
+            },
+
+            //显示新增界面
+			handleAdd() {
+                //重新获取一下模具
+                this.getMoulds();
+				this.addFormVisible = true;
+				this.addForm = {
+					projectName: '',
+                    mold: [],
+                    managerId: ''
+				};
+            },
+
+            //新增
+			addSubmit() {
+				this.$refs.addForm.validate((valid) => {
+					if (valid) {
+                        var cId = "",
+                            cName = "",
+                            mId = "";
+
+                        for(var i in this.addForm.mold){
+                            if(cId.indexOf(this.addForm.mold[i].produceCompanyId) == -1){
+                                cId += this.addForm.mold[i].produceCompanyId + ",";
+                                cName += this.addForm.mold[i].produceCompanyName + ",";
+                            }
+                            mId += this.addForm.mold[i].id + ","
+                        }
+
+                        cId = cId.substring(0,cId.length-1);
+                        cName = cName.substring(0,cName.length-1);
+                        mId = mId.substring(0,mId.length-1);
+
+                        this.addLoading = true;
+                        this.http.post(this.port.project.addProject, {
+                            projectName: this.addForm.projectName,
+                            customerCompanyIds: cId,
+                            customerCompanyNames: cName,
+                            manager: this.addForm.managerId.username,
+                            managerId: this.addForm.managerId.id,
+                            modelIds: mId,
+                            flag: 0
+                        } , res => {
+                            this.addLoading = false;
+                            if (res.code == "ok") {
+                                this.addFormVisible = false;
+                                this.$message({
+                                    message: '创建成功',
+                                    type: 'success'
+                                });
+                                this.getProject();
+                            } else {
+                                this.$message({
+                                    message: res.msg,
+                                    type: 'error'
+                                });
+                            }
+                        }, error => {
+                            this.addLoading = false;
+                            this.addFormVisible = false;
+                            this.$message({
+                                message: error,
+                                type: 'error'
+                            });
+                        })
+					}
+				});
+			},
+        },
+        created() {
+            let height = window.innerHeight;
+            this.tableHeight = height - 210;
+            const that = this;
+            window.onresize = function temp() {
+                that.tableHeight = window.innerHeight - 210;    
+            };
+        },
+		mounted() {
+            this.getMsg();
+			this.getProject();
+		}
+	}
+
+</script>
+
+<style scoped>
+
+</style>

Разлика између датотеке није приказан због своје велике величине
+ 1139 - 0
lib_vue/src/views/project/projectDetail.vue


+ 547 - 0
lib_vue/src/views/project/staff.vue

@@ -0,0 +1,547 @@
+<template>
+	<section>
+		<!--工具条-->
+		<el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
+			<el-form :inline="true" :model="filters">
+                <el-col :span="3">
+                    <el-form-item>
+                        <el-select v-model="filters.companyId" clearable filterable placeholder="请选择公司">
+                            <el-option v-for="item in allCompanies" :key="item.id" :label="item.companyName" :value="item.id">
+                            </el-option>
+                        </el-select>
+                    </el-form-item>
+                </el-col>
+                <el-col :span="3">
+                    <el-form-item>
+                        <el-select v-model="filters.flag" placeholder="请选择查询条件">
+                            <el-option label="姓名" value="0"></el-option>
+                            <el-option label="手机号" value="1"></el-option>
+                        </el-select>
+                    </el-form-item>
+                </el-col>
+                <el-form-item>
+                    <el-input v-model="filters.keyName" clearable placeholder="请输入姓名或手机号进行搜索" style="width:250px;"></el-input>
+                </el-form-item>
+				<el-form-item>
+					<el-button type="primary" @click="getUsers">查询</el-button>
+				</el-form-item>
+				<el-form-item style="float:right;" v-if="user.subordinateType == 0 || user.isManager == 1">
+					<el-button type="primary" @click="handleAdd">新增</el-button>
+				</el-form-item>
+			</el-form>
+		</el-col>
+
+		<!--列表-->
+		<el-table :data="list" highlight-current-row :height="tableHeight" v-loading="listLoading" style="width: 100%;">
+			<el-table-column type="index" width="60"></el-table-column>
+			<el-table-column prop="username" label="姓名" width="120" sortable></el-table-column>
+			<el-table-column prop="account" label="手机号" width="180" sortable></el-table-column>
+			<!-- <el-table-column prop="mobile" label="联系方式" width="150" sortable></el-table-column> -->
+            <el-table-column prop="projects" label="参与项目" sortable>
+                <template slot-scope="scope">
+                    <span class="info" v-for="(item, index) in scope.row.projects">
+                        {{item.projectName}}
+                        <span v-if="scope.row.projects != null && index != scope.row.projects.length-1">、</span>
+                    </span>
+                </template>
+			</el-table-column>
+            <el-table-column prop="roleName" label="备注" width="180" sortable></el-table-column>
+            <el-table-column prop="teamName" label="类型" width="120" align="center" sortable></el-table-column>
+			<el-table-column prop="companyName" label="所属公司" sortable></el-table-column>
+			<el-table-column label="操作" align="left" width="230">
+				<template slot-scope="scope" v-if="user.id == scope.row.parentId || user.isManager == 1 || (user.parentId == 1 && user.subordinateType == 0)">
+					<el-button size="small" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
+					<el-button type="danger" size="small" @click="handleDel(scope.$index, scope.row)">删除</el-button>
+                    <el-button type="primary" size="small" @click="invite(scope.$index, scope.row)" v-if="user.id != 1 && scope.row.projects != null && scope.row.projects.length == 1">邀请</el-button>
+				</template>
+			</el-table-column>
+		</el-table>
+
+		<!--工具条-->
+		<el-col :span="24" class="toolbar">
+            <el-pagination
+                @size-change="handleSizeChange"
+                @current-change="handleCurrentChange"
+                :page-sizes="[20 , 50 , 80 , 100]"
+                :page-size="20"
+                layout="total, sizes, prev, pager, next"
+                :total="total"
+                style="float:right;">
+            </el-pagination>
+		</el-col>
+
+        <!--新增界面-->
+		<el-dialog title="新增人员" v-if="addFormVisible" :visible.sync="addFormVisible" :close-on-click-modal="false" customClass='customWidth'>
+			<el-form :model="addForm" label-width="100px" :rules="formRules" ref="addForm" :inline="true" class="demo-form-inline">
+				<el-form-item label="姓名" prop="username">
+					<el-input v-model="addForm.username" autocomplete="off" placeholder="请输入姓名"></el-input>
+				</el-form-item>
+				<el-form-item label="手机号" prop="account">
+					<el-input v-model="addForm.account" autocomplete="off" placeholder="请输入手机号(登录账号)"></el-input>
+				</el-form-item>
+                <el-form-item v-if="!(user.parentId == 1 && user.subordinateType == 0)" label="参与项目" prop="projectIds">
+					<el-select v-model="addForm.projectIds" @change="choseProject" clearable filterable placeholder="请选择参与项目" style="width:202px">
+                        <el-option v-for="item in projects" :key="item.id" :label="item.projectName" :value="item.id">
+                        </el-option>
+                    </el-select>
+				</el-form-item>
+                <el-form-item label="公司" prop="companyId">
+					<el-select v-model="addForm.companyId" clearable filterable placeholder="请选择所属公司" style="width:202px">
+                        <el-option v-for="item in company" :key="item.id" :label="item.companyName" :value="item.id">
+                        </el-option>
+                    </el-select>
+				</el-form-item>
+                <el-form-item label="备注">
+                    <el-input v-model="addForm.roleName" autocomplete="off" placeholder="请输入备注"></el-input>
+				</el-form-item>
+			</el-form>
+			<div slot="footer" class="dialog-footer">
+                <span style="color:#f00;float:left;margin-left:60px;">初始密码:000000</span>
+				<el-button @click.native="addFormVisible = false">取消</el-button>
+				<el-button type="primary" @click.native="addSubmit" :loading="addLoading">提交</el-button>
+			</div>
+		</el-dialog>
+
+		<!--编辑界面-->
+		<el-dialog title="编辑人员" v-if="editFormVisible" :visible.sync="editFormVisible" :close-on-click-modal="false" customClass='customWidth'>
+			<el-form :model="editForm" label-width="80px" :rules="formRules" ref="editForm" :inline="true" class="demo-form-inline">
+				<el-form-item label="姓名" prop="username">
+					<el-input v-model="editForm.username" autocomplete="off" placeholder="请输入姓名"></el-input>
+				</el-form-item>
+				<el-form-item label="手机号" prop="account">
+					<el-input v-model="editForm.account" disabled autocomplete="off" placeholder="请输入手机号(登录账号)"></el-input>
+				</el-form-item>
+                <el-form-item label="公司" prop="companyId">
+                    <el-input v-model="editForm.companyId" disabled autocomplete="off" placeholder="请选择所属公司"></el-input>
+				</el-form-item>
+                <el-form-item label="备注">
+                    <el-input v-model="editForm.roleName" autocomplete="off" placeholder="请输入备注"></el-input>
+				</el-form-item>
+			</el-form>
+			<div slot="footer" class="dialog-footer">
+                 <span style="color:#f00;float:left;margin-left:60px;">初始密码:000000</span>
+				<el-button @click.native="editFormVisible = false">取消</el-button>
+				<el-button type="primary" @click.native="editSubmit" :loading="editLoading">提交</el-button>
+			</div>
+		</el-dialog>
+
+        <!--邀请界面-->
+		<el-dialog title="邀请" v-if="inviteVisible" :visible.sync="inviteVisible" :close-on-click-modal="false" customClass='customWidth'>
+			<el-input placeholder="请复制邀请链接" v-model="inviteLink" class="input-with-select">
+                <el-button slot="append" v-clipboard:copy="inviteLink" v-clipboard:success="copyLink" v-clipboard:error="onError" type="primary" icon="el-icon-share">复制链接</el-button>
+            </el-input>
+		</el-dialog>
+	</section>
+</template>
+
+<script>
+	import util from '../../common/js/util'
+
+	export default {
+		data() {
+            var checkPhone = (rule, value, callback) => {
+                if (!value) {
+                    return callback(new Error('请输入联系方式'));
+                } else {
+                    const reg = /^1[0-9]\d{9}$/
+                    if (reg.test(value)) {
+                        callback();
+                    } else {
+                        return callback(new Error('请输入正确的联系方式'));
+                    }
+                }
+            };
+			return {
+				filters: {
+                    keyName: '',
+                    roleName: '',
+                    flag: '姓名',
+                    companyId: ''
+                },
+                
+                user: JSON.parse(sessionStorage.getItem('user')),
+                company: [],
+                projects: [],
+                //搜索用 涉及到的所有公司
+                allCompanies: [],
+
+				list: [],
+				total: 0,
+                page: 1,
+                size: 20,
+                listLoading: false,
+                tableHeight: 0,
+
+                formRules: {
+                    username: [
+						{ required: true, message: '请输入姓名', trigger: 'blur' }
+                    ],
+                    account: [
+                        { required: true, validator: checkPhone, trigger: 'blur'}
+                    ],
+                    teamName: [
+						{ required: true, message: '请选择人员类型', trigger: ["blur",'change'] }
+                    ],
+                    projectIds: [
+						{ required: true, message: '请选择参与项目', trigger: ["blur",'change'] }
+					],
+                    companyId: [
+						{ required: true, message: '请选择所属公司', trigger: ["blur",'change'] }
+					]
+                },
+
+                //新增界面是否显示
+                addFormVisible: false,
+				addLoading: false,
+				//新增界面数据
+				addForm: {
+					username: '',
+                    account: '',
+                    projectIds: '',
+                    companyId: '',
+                    roleName: '',
+                    flag: 0
+				},
+
+                //编辑界面是否显示
+				editFormVisible: false,
+				editLoading: false,
+				//编辑界面数据
+				editForm: {
+					id: 0,
+					username: '',
+                    account: '',
+                    companyId: '',
+                    roleName: '',
+                    flag: 1
+                },
+                
+                //邀请
+                inviteVisible: false,
+                inviteLink: ''
+			}
+		},
+		methods: {
+            //获取基础数据
+            getMsg(){
+                if(this.user.parentId == 1 && this.user.subordinateType == 0) {
+                    this.company = [];
+                    this.allCompanies = [];
+                    this.http.post(this.port.base.getCompanyList, {
+                        id: this.user.id,
+                        parentId: this.user.parentId
+                    }, res => {
+                        if (res.code == "ok") {
+                            this.company = res.data;
+                            this.allCompanies = res.data;
+                        } else {
+                            this.$message({
+                                message: res.msg,
+                                type: 'error'
+                            });
+                        }
+                    }, error => {
+                        this.$message({
+                            message: error,
+                            type: 'error'
+                        });
+                    })
+                } else if(this.user.parentId > 1 && this.user.isManager == 1) {
+                    this.http.post(this.port.project.projectByUser, {}, 
+                    res => {
+                        if (res.code == "ok") {
+                            this.projects = res.data;
+                            //再获取一下公司列表
+                            this.getAllCompanies();
+                        } else {
+                            this.$message({
+                                message: res.msg,
+                                type: 'error'
+                            });
+                        }
+                    }, error => {
+                        this.$message({
+                            message: error,
+                            type: 'error'
+                        });
+                    });
+                }
+            },  
+
+            //新版获取所有公司
+            getAllCompanies(){
+                this.allCompanies = [];
+                this.http.post(this.port.base.getInfo, {}, res => {
+                    if (res.code == "ok") {
+                        this.allCompanies = res.data;
+                    } else {
+                        this.$message({
+                            message: res.msg,
+                            type: 'error'
+                        });
+                    }
+                }, error => {
+                    this.$message({
+                        message: error,
+                        type: 'error'
+                    });
+                });
+            },
+
+            //分页
+			handleCurrentChange(val) {
+				this.page = val;
+				this.getUsers();
+            },
+
+            handleSizeChange(val) {
+                this.size = val;
+				this.getUsers();
+            },
+
+			//获取用户列表
+			getUsers() {
+				this.listLoading = true;
+                this.http.post(this.port.project.userList, {
+                    keyName: this.filters.keyName,
+                    currentPage: this.page,
+                    pageSize: this.size,
+                    companyId: this.filters.companyId==''?-1:this.filters.companyId,
+                    flag: this.filters.flag=='姓名'?0:this.filters.flag
+                }, res => {
+                    this.listLoading = false;
+                    if (res.code == "ok") {
+                        this.list = res.data.list;
+                        this.total = res.data.total;
+                    } else {
+                        this.$message({
+                            message: res.msg,
+                            type: 'error'
+                        });
+                    }
+                }, error => {
+                    this.listLoading = false;
+                    this.$message({
+                        message: error,
+                        type: 'error'
+                    });
+                })
+            },
+            
+            //显示新增界面
+			handleAdd() {
+                this.addFormVisible = true;
+				this.addForm = {
+                    parentId: this.user.id,
+					username: '',
+                    account: '',
+                    mobile: '',
+                    projectIds: '',
+					companyId: '',
+                    roleName: '',
+                    flag: 0
+				};
+            },
+
+            //新增
+			addSubmit() {
+				this.$refs.addForm.validate((valid) => {
+					if (valid) {
+						this.addLoading = true;
+                        this.http.post(this.port.project.addUser, this.addForm , res => {
+                            this.addLoading = false;
+                            if (res.code == "ok") {
+                                this.addFormVisible = false;
+                                this.$message({
+                                    message: '创建成功',
+                                    type: 'success'
+                                });
+                                this.getUsers();
+                            } else {
+                                this.$message({
+                                    message: res.msg,
+                                    type: 'error'
+                                });
+                            }
+                        }, error => {
+                            this.addLoading = false;
+                            this.addFormVisible = false;
+                            this.$message({
+                                message: error,
+                                type: 'error'
+                            });
+                        })
+					}
+				});
+			},
+
+			//删除
+			handleDel(index, row) {
+                this.$confirm('确认删除该人员吗?', '提示', {
+					type: 'warning'
+				}).then(() => {
+                    this.http.post(this.port.project.delUser, {
+                        id: row.id
+                    }, res => {
+                        if (res.code == "ok") {
+                            this.$message({
+                                message: '删除成功',
+                                type: 'success'
+                            });
+                            this.getUsers();
+                        } else {
+                            this.$message({
+                                message: res.msg,
+                                type: 'error'
+                            });
+                        }
+                    }, error => {
+                        this.$message({
+                            message: error,
+                            type: 'error'
+                        });
+                    })
+				});
+            },
+            
+			//显示编辑界面
+			handleEdit(index, row) {
+                this.editFormVisible = true;
+				this.editForm = {
+                    id: row.id,
+                    parentId: this.user.id,
+					username: row.username,
+                    account: row.account,
+					companyId: row.companyName,
+                    roleName: row.roleName,
+                    flag: 1
+                };
+            },
+            
+			//编辑
+			editSubmit() {
+				this.$refs.editForm.validate((valid) => {
+					if (valid) {
+                        this.editLoading = true;
+                        this.http.post(this.port.project.addUser, {
+                            id: this.editForm.id,
+                            parentId: this.editForm.parentId,
+                            username: this.editForm.username,
+                            roleName: this.editForm.roleName,
+                            flag: 1
+                        } , res => {
+                            this.editLoading = false;
+                            if (res.code == "ok") {
+                                this.editFormVisible = false;
+                                this.$message({
+                                    message: '修改成功',
+                                    type: 'success'
+                                });
+                                this.getUsers();
+                            } else {
+                                this.$message({
+                                    message: res.msg,
+                                    type: 'error'
+                                });
+                            }
+                        }, error => {
+                            this.editLoading = false;
+                            this.editFormVisible = false;
+                            this.$message({
+                                message: error,
+                                type: 'error'
+                            });
+                        })
+					}
+				});
+            },
+            
+            //修改
+            choseProject() {
+                if(this.addForm.projectIds == ""){
+                    this.company = [];
+                    this.addForm.companyId = null;
+                }else{
+                    this.http.post(this.port.base.getProduceCompany, {
+                        projectId: this.addForm.projectIds
+                    }, res => {
+                        if (res.code == "ok") {
+                            this.company = res.data;
+                        } else {
+                            this.$message({
+                                message: res.msg,
+                                type: 'error'
+                            });
+                        }
+                    }, error => {
+                        this.$message({
+                            message: error,
+                            type: 'error'
+                        });
+                    })
+                }
+            },
+
+            //邀请
+            invite(index, row) {
+                this.http.post(this.port.project.inviteUser, {
+                    inviteeId: row.id,
+                    projectId: row.projects[0].id,
+                    operatorId: this.user.id
+                } , res => {
+                    if (res.code == "ok") {
+                        this.inviteVisible = true;
+                        this.inviteLink = res.data.addressUrl;
+                    } else {
+                        this.$message({
+                            message: res.msg,
+                            type: 'error'
+                        });
+                    }
+                }, error => {
+                    this.$message({
+                        message: error,
+                        type: 'error'
+                    });
+                })
+            },
+
+            //复制链接
+            copyLink() {
+                //this.inviteVisible = false;
+                this.$message({
+                    message: "复制成功!",
+                    type: 'success'
+                });
+            },
+
+            onError(e) {
+                //this.inviteVisible = false;
+                this.$message({
+                    message: "复制失败!",
+                    type: 'error'
+                });
+            }
+        },
+        created() {
+            let height = window.innerHeight;
+            this.tableHeight = height - 210;
+            const that = this;
+            window.onresize = function temp() {
+                that.tableHeight = window.innerHeight - 210;    
+            };
+        },
+		mounted() {
+            this.getMsg();
+			this.getUsers();
+        }
+	}
+</script>
+
+<style scoped>
+    .el-input-group__append button.el-button {
+        background-color: #409EFF;
+        border-color: #409EFF;
+        color: #fff;
+    }
+</style>

+ 7 - 0
lib_vue/src/vuex/actions.js

@@ -0,0 +1,7 @@
+//test
+export const increment = ({commit}) => {
+    commit('INCREMENT')
+}
+export const decrement = ({commit}) => {
+    commit('DECREMENT')
+}

+ 4 - 0
lib_vue/src/vuex/getters.js

@@ -0,0 +1,4 @@
+//test
+export const getCount = state => {
+    return state.count
+}

+ 29 - 0
lib_vue/src/vuex/store.js

@@ -0,0 +1,29 @@
+import Vue from 'vue'
+import Vuex from 'vuex'
+import * as actions from './actions'
+import * as getters from './getters'
+
+Vue.use(Vuex)
+
+// 应用初始状态
+const state = {
+    count: 10
+}
+
+// 定义所需的 mutations
+const mutations = {
+    INCREMENT(state) {
+        state.count++
+    },
+    DECREMENT(state) {
+        state.count--
+    }
+}
+
+// 创建 store 实例
+export default new Vuex.Store({
+    actions,
+    getters,
+    state,
+    mutations
+})

+ 0 - 0
lib_vue/static/.gitkeep