Sfoglia il codice sorgente

云塑网前端代码

sunyadv 5 anni fa
parent
commit
b54b7a0314
100 ha cambiato i file con 10350 aggiunte e 1 eliminazioni
  1. 0 1
      ys_admin
  2. 5 0
      ys_vue/.babelrc
  3. 5 0
      ys_vue/.gitignore
  4. 21 0
      ys_vue/LICENSE
  5. 57 0
      ys_vue/README.md
  6. 35 0
      ys_vue/build/build.js
  7. 48 0
      ys_vue/build/check-versions.js
  8. 9 0
      ys_vue/build/dev-client.js
  9. 89 0
      ys_vue/build/dev-server.js
  10. 71 0
      ys_vue/build/utils.js
  11. 12 0
      ys_vue/build/vue-loader.conf.js
  12. 59 0
      ys_vue/build/webpack.base.conf.js
  13. 36 0
      ys_vue/build/webpack.dev.conf.js
  14. 121 0
      ys_vue/build/webpack.prod.conf.js
  15. 6 0
      ys_vue/config/dev.env.js
  16. 33 0
      ys_vue/config/index.js
  17. 3 0
      ys_vue/config/prod.env.js
  18. 15 0
      ys_vue/index.html
  19. 9509 0
      ys_vue/package-lock.json
  20. 74 0
      ys_vue/package.json
  21. 65 0
      ys_vue/src/App.vue
  22. 17 0
      ys_vue/src/api/api.js
  23. 3 0
      ys_vue/src/api/index.js
  24. BIN
      ys_vue/src/assets/bg1.jpg
  25. BIN
      ys_vue/src/assets/logo.png
  26. BIN
      ys_vue/src/assets/logo4.png
  27. 1 0
      ys_vue/src/assets/theme/theme-darkblue/alert.css
  28. 1 0
      ys_vue/src/assets/theme/theme-darkblue/autocomplete.css
  29. 1 0
      ys_vue/src/assets/theme/theme-darkblue/badge.css
  30. 1 0
      ys_vue/src/assets/theme/theme-darkblue/base.css
  31. 0 0
      ys_vue/src/assets/theme/theme-darkblue/breadcrumb-item.css
  32. 1 0
      ys_vue/src/assets/theme/theme-darkblue/breadcrumb.css
  33. 0 0
      ys_vue/src/assets/theme/theme-darkblue/button-group.css
  34. 1 0
      ys_vue/src/assets/theme/theme-darkblue/button.css
  35. 1 0
      ys_vue/src/assets/theme/theme-darkblue/card.css
  36. 1 0
      ys_vue/src/assets/theme/theme-darkblue/carousel-item.css
  37. 1 0
      ys_vue/src/assets/theme/theme-darkblue/carousel.css
  38. 1 0
      ys_vue/src/assets/theme/theme-darkblue/cascader.css
  39. 0 0
      ys_vue/src/assets/theme/theme-darkblue/checkbox-group.css
  40. 1 0
      ys_vue/src/assets/theme/theme-darkblue/checkbox.css
  41. 1 0
      ys_vue/src/assets/theme/theme-darkblue/col.css
  42. 0 0
      ys_vue/src/assets/theme/theme-darkblue/collapse-item.css
  43. 1 0
      ys_vue/src/assets/theme/theme-darkblue/collapse.css
  44. 1 0
      ys_vue/src/assets/theme/theme-darkblue/color-picker.css
  45. 1 0
      ys_vue/src/assets/theme/theme-darkblue/date-picker.css
  46. 1 0
      ys_vue/src/assets/theme/theme-darkblue/dialog.css
  47. 0 0
      ys_vue/src/assets/theme/theme-darkblue/dropdown-item.css
  48. 0 0
      ys_vue/src/assets/theme/theme-darkblue/dropdown-menu.css
  49. 1 0
      ys_vue/src/assets/theme/theme-darkblue/dropdown.css
  50. BIN
      ys_vue/src/assets/theme/theme-darkblue/fonts/element-icons.ttf
  51. BIN
      ys_vue/src/assets/theme/theme-darkblue/fonts/element-icons.woff
  52. 0 0
      ys_vue/src/assets/theme/theme-darkblue/form-item.css
  53. 1 0
      ys_vue/src/assets/theme/theme-darkblue/form.css
  54. 1 0
      ys_vue/src/assets/theme/theme-darkblue/icon.css
  55. 1 0
      ys_vue/src/assets/theme/theme-darkblue/index.css
  56. 1 0
      ys_vue/src/assets/theme/theme-darkblue/input-number.css
  57. 1 0
      ys_vue/src/assets/theme/theme-darkblue/input.css
  58. 1 0
      ys_vue/src/assets/theme/theme-darkblue/loading.css
  59. 0 0
      ys_vue/src/assets/theme/theme-darkblue/menu-item-group.css
  60. 0 0
      ys_vue/src/assets/theme/theme-darkblue/menu-item.css
  61. 1 0
      ys_vue/src/assets/theme/theme-darkblue/menu.css
  62. 1 0
      ys_vue/src/assets/theme/theme-darkblue/message-box.css
  63. 1 0
      ys_vue/src/assets/theme/theme-darkblue/message.css
  64. 1 0
      ys_vue/src/assets/theme/theme-darkblue/notification.css
  65. 1 0
      ys_vue/src/assets/theme/theme-darkblue/option-group.css
  66. 1 0
      ys_vue/src/assets/theme/theme-darkblue/option.css
  67. 1 0
      ys_vue/src/assets/theme/theme-darkblue/pagination.css
  68. 1 0
      ys_vue/src/assets/theme/theme-darkblue/popover.css
  69. 1 0
      ys_vue/src/assets/theme/theme-darkblue/progress.css
  70. 0 0
      ys_vue/src/assets/theme/theme-darkblue/radio-button.css
  71. 0 0
      ys_vue/src/assets/theme/theme-darkblue/radio-group.css
  72. 1 0
      ys_vue/src/assets/theme/theme-darkblue/radio.css
  73. 1 0
      ys_vue/src/assets/theme/theme-darkblue/rate.css
  74. 1 0
      ys_vue/src/assets/theme/theme-darkblue/reset.css
  75. 1 0
      ys_vue/src/assets/theme/theme-darkblue/row.css
  76. 1 0
      ys_vue/src/assets/theme/theme-darkblue/scrollbar.css
  77. 1 0
      ys_vue/src/assets/theme/theme-darkblue/select-dropdown.css
  78. 1 0
      ys_vue/src/assets/theme/theme-darkblue/select.css
  79. 1 0
      ys_vue/src/assets/theme/theme-darkblue/slider.css
  80. 1 0
      ys_vue/src/assets/theme/theme-darkblue/spinner.css
  81. 1 0
      ys_vue/src/assets/theme/theme-darkblue/step.css
  82. 1 0
      ys_vue/src/assets/theme/theme-darkblue/steps.css
  83. 0 0
      ys_vue/src/assets/theme/theme-darkblue/submenu.css
  84. 1 0
      ys_vue/src/assets/theme/theme-darkblue/switch.css
  85. 0 0
      ys_vue/src/assets/theme/theme-darkblue/tab-pane.css
  86. 1 0
      ys_vue/src/assets/theme/theme-darkblue/table-column.css
  87. 1 0
      ys_vue/src/assets/theme/theme-darkblue/table.css
  88. 1 0
      ys_vue/src/assets/theme/theme-darkblue/tabs.css
  89. 1 0
      ys_vue/src/assets/theme/theme-darkblue/tag.css
  90. 1 0
      ys_vue/src/assets/theme/theme-darkblue/time-picker.css
  91. 1 0
      ys_vue/src/assets/theme/theme-darkblue/time-select.css
  92. 1 0
      ys_vue/src/assets/theme/theme-darkblue/tooltip.css
  93. 1 0
      ys_vue/src/assets/theme/theme-darkblue/tree.css
  94. 1 0
      ys_vue/src/assets/theme/theme-darkblue/upload.css
  95. 1 0
      ys_vue/src/assets/theme/theme-green/alert.css
  96. 1 0
      ys_vue/src/assets/theme/theme-green/autocomplete.css
  97. 1 0
      ys_vue/src/assets/theme/theme-green/badge.css
  98. 1 0
      ys_vue/src/assets/theme/theme-green/base.css
  99. 0 0
      ys_vue/src/assets/theme/theme-green/breadcrumb-item.css
  100. 0 0
      ys_vue/src/assets/theme/theme-green/breadcrumb.css

+ 0 - 1
ys_admin

@@ -1 +0,0 @@
-Subproject commit bf72c3a62e93b7a9a80a490f2b6d64e0f4084998

+ 5 - 0
ys_vue/.babelrc

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

+ 5 - 0
ys_vue/.gitignore

@@ -0,0 +1,5 @@
+.DS_Store
+node_modules/
+npm-debug.log
+.editorconfig
+dist/

+ 21 - 0
ys_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.

+ 57 - 0
ys_vue/README.md

@@ -0,0 +1,57 @@
+**demo**: [https://taylorchen709.github.io/vue-admin/](https://taylorchen709.github.io/vue-admin/)
+
+# To start
+
+This is a project template for [vue-cli](https://github.com/vuejs/vue-cli)
+
+``` bash
+# install dependencies
+npm install
+
+# serve with hot reload at localhost:8081
+npm run dev
+
+# build for production with minification
+npm run build
+
+```
+
+# Folder structure
+* build - webpack config files
+* config - webpack config files
+* dist - build
+* src -your app
+    * api
+    * assets
+    * common
+    * components - your vue components
+    * mock
+    * styles
+    * views - your pages
+    * vuex
+    * App.vue
+    * main.js - main file
+    * routes.js
+* static - static assets
+
+# Theme
+You can change theme by 
+1. Generate theme packages by [https://elementui.github.io/theme-preview/#/](https://elementui.github.io/theme-preview/#/)
+2. Put theme packages in src/assets/theme/
+3. Edit src/main.js 
+``` bash
+   import 'element-ui/lib/theme-default/index.css'
+   to
+   import './assets/theme/your-theme/index.css'
+```
+4. Edit src/styles/vars.scss
+
+![theme-blue](https://raw.githubusercontent.com/taylorchen709/markdown-images/master/vueadmin/rec-demo.gif)
+![theme-green](https://raw.githubusercontent.com/taylorchen709/markdown-images/master/vueadmin/theme-green.png)
+
+# Browser support
+
+Modern browsers and IE 10+.
+
+# License
+[MIT](http://opensource.org/licenses/MIT)

+ 35 - 0
ys_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
ys_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
ys_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
ys_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()
+  }
+}

+ 71 - 0
ys_vue/build/utils.js

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

+ 59 - 0
ys_vue/build/webpack.base.conf.js

@@ -0,0 +1,59 @@
+var path = require('path')
+var utils = require('./utils')
+var config = require('../config')
+var vueLoaderConfig = require('./vue-loader.conf')
+
+function resolve(dir) {
+  return path.join(__dirname, '..', dir)
+}
+
+module.exports = {
+  entry: {
+    app: './src/main.js'
+  },
+  output: {
+    path: config.build.assetsRoot,
+    filename: '[name].js',
+    publicPath: process.env.NODE_ENV === 'production'
+      ? config.build.assetsPublicPath
+      : config.dev.assetsPublicPath
+  },
+  resolve: {
+    extensions: ['.js', '.vue', '.json'],
+    alias: {
+      'vue$': 'vue/dist/vue.esm.js',
+      '@': resolve('src'),
+      'scss_vars': '@/styles/vars.scss'
+    }
+  },
+  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]')
+        }
+      }
+    ]
+  }
+}

+ 36 - 0
ys_vue/build/webpack.dev.conf.js

@@ -0,0 +1,36 @@
+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"'
+    }),
+    // 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
+    }),
+    new FriendlyErrorsPlugin()
+  ]
+})

+ 121 - 0
ys_vue/build/webpack.prod.conf.js

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

+ 6 - 0
ys_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"'
+})

+ 33 - 0
ys_vue/config/index.js

@@ -0,0 +1,33 @@
+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: '/vue-admin/',
+    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:8098',  // 接口域名 开发
+            secure: true,  // 如果是https接口,需要配置这个参数
+            changeOrigin: true,  //是否跨域
+            pathRewrite: { // 如果接口本身没有api的路径,那么这里将发送到后端的请求重写为没有api的路径
+                '^/api': '/' 
+            }
+        }
+    },
+    cssSourceMap: false
+  }
+}

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

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

+ 15 - 0
ys_vue/index.html

@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+  <meta charset="utf-8">
+  <title>云模</title>
+</head>
+
+<body>
+    <div id="app">
+    </div>
+    <!-- built files will be auto injected -->
+</body>
+
+</html>

File diff suppressed because it is too large
+ 9509 - 0
ys_vue/package-lock.json


+ 74 - 0
ys_vue/package.json

@@ -0,0 +1,74 @@
+{
+  "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.3.2",
+    "element-ui": "^1.2.8",
+    "font-awesome": "^4.7.0",
+    "nprogress": "^0.2.0",
+    "vue": "^2.2.2",
+    "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-preset-env": "^1.2.1",
+    "babel-polyfill": "^6.16.0",
+    "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",
+    "webpack-bundle-analyzer": "^2.2.1",
+    "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",
+    "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.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"
+  ]
+}

+ 65 - 0
ys_vue/src/App.vue

@@ -0,0 +1,65 @@
+<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;
+        /*background: url(assets/bg1.jpg) center !important;
+            background-size: cover;*/
+        // background: #1F2D3D;
+        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;
+        //border:1px solid #dfe6ec;
+        margin: 10px 0px;
+        .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
ys_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
ys_vue/src/api/index.js

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

BIN
ys_vue/src/assets/bg1.jpg


BIN
ys_vue/src/assets/logo.png


BIN
ys_vue/src/assets/logo4.png


File diff suppressed because it is too large
+ 1 - 0
ys_vue/src/assets/theme/theme-darkblue/alert.css


File diff suppressed because it is too large
+ 1 - 0
ys_vue/src/assets/theme/theme-darkblue/autocomplete.css


File diff suppressed because it is too large
+ 1 - 0
ys_vue/src/assets/theme/theme-darkblue/badge.css


File diff suppressed because it is too large
+ 1 - 0
ys_vue/src/assets/theme/theme-darkblue/base.css


+ 0 - 0
ys_vue/src/assets/theme/theme-darkblue/breadcrumb-item.css


File diff suppressed because it is too large
+ 1 - 0
ys_vue/src/assets/theme/theme-darkblue/breadcrumb.css


+ 0 - 0
ys_vue/src/assets/theme/theme-darkblue/button-group.css


File diff suppressed because it is too large
+ 1 - 0
ys_vue/src/assets/theme/theme-darkblue/button.css


+ 1 - 0
ys_vue/src/assets/theme/theme-darkblue/card.css

@@ -0,0 +1 @@
+@charset "UTF-8";.el-card{border:1px solid rgb(209, 219, 229);border-radius:4px;background-color:#fff;overflow:hidden;box-shadow:0 2px 4px 0 rgba(0,0,0,.12),0 0 6px 0 rgba(0,0,0,.04)}.el-card__header{padding:18px 20px;border-bottom:1px solid rgb(209, 219, 229);box-sizing:border-box}.el-card__body{padding:20px}

File diff suppressed because it is too large
+ 1 - 0
ys_vue/src/assets/theme/theme-darkblue/carousel-item.css


File diff suppressed because it is too large
+ 1 - 0
ys_vue/src/assets/theme/theme-darkblue/carousel.css


File diff suppressed because it is too large
+ 1 - 0
ys_vue/src/assets/theme/theme-darkblue/cascader.css


+ 0 - 0
ys_vue/src/assets/theme/theme-darkblue/checkbox-group.css


File diff suppressed because it is too large
+ 1 - 0
ys_vue/src/assets/theme/theme-darkblue/checkbox.css


File diff suppressed because it is too large
+ 1 - 0
ys_vue/src/assets/theme/theme-darkblue/col.css


+ 0 - 0
ys_vue/src/assets/theme/theme-darkblue/collapse-item.css


File diff suppressed because it is too large
+ 1 - 0
ys_vue/src/assets/theme/theme-darkblue/collapse.css


File diff suppressed because it is too large
+ 1 - 0
ys_vue/src/assets/theme/theme-darkblue/color-picker.css


File diff suppressed because it is too large
+ 1 - 0
ys_vue/src/assets/theme/theme-darkblue/date-picker.css


File diff suppressed because it is too large
+ 1 - 0
ys_vue/src/assets/theme/theme-darkblue/dialog.css


+ 0 - 0
ys_vue/src/assets/theme/theme-darkblue/dropdown-item.css


+ 0 - 0
ys_vue/src/assets/theme/theme-darkblue/dropdown-menu.css


File diff suppressed because it is too large
+ 1 - 0
ys_vue/src/assets/theme/theme-darkblue/dropdown.css


BIN
ys_vue/src/assets/theme/theme-darkblue/fonts/element-icons.ttf


BIN
ys_vue/src/assets/theme/theme-darkblue/fonts/element-icons.woff


+ 0 - 0
ys_vue/src/assets/theme/theme-darkblue/form-item.css


File diff suppressed because it is too large
+ 1 - 0
ys_vue/src/assets/theme/theme-darkblue/form.css


File diff suppressed because it is too large
+ 1 - 0
ys_vue/src/assets/theme/theme-darkblue/icon.css


File diff suppressed because it is too large
+ 1 - 0
ys_vue/src/assets/theme/theme-darkblue/index.css


File diff suppressed because it is too large
+ 1 - 0
ys_vue/src/assets/theme/theme-darkblue/input-number.css


File diff suppressed because it is too large
+ 1 - 0
ys_vue/src/assets/theme/theme-darkblue/input.css


File diff suppressed because it is too large
+ 1 - 0
ys_vue/src/assets/theme/theme-darkblue/loading.css


+ 0 - 0
ys_vue/src/assets/theme/theme-darkblue/menu-item-group.css


+ 0 - 0
ys_vue/src/assets/theme/theme-darkblue/menu-item.css


File diff suppressed because it is too large
+ 1 - 0
ys_vue/src/assets/theme/theme-darkblue/menu.css


File diff suppressed because it is too large
+ 1 - 0
ys_vue/src/assets/theme/theme-darkblue/message-box.css


File diff suppressed because it is too large
+ 1 - 0
ys_vue/src/assets/theme/theme-darkblue/message.css


File diff suppressed because it is too large
+ 1 - 0
ys_vue/src/assets/theme/theme-darkblue/notification.css


+ 1 - 0
ys_vue/src/assets/theme/theme-darkblue/option-group.css

@@ -0,0 +1 @@
+@charset "UTF-8";.el-select-group{margin:0;padding:0}.el-select-group .el-select-dropdown__item{padding-left:20px}.el-select-group__wrap{list-style:none;margin:0;padding:0}.el-select-group__title{padding-left:10px;font-size:12px;color:#999;height:30px;line-height:30px}

File diff suppressed because it is too large
+ 1 - 0
ys_vue/src/assets/theme/theme-darkblue/option.css


File diff suppressed because it is too large
+ 1 - 0
ys_vue/src/assets/theme/theme-darkblue/pagination.css


File diff suppressed because it is too large
+ 1 - 0
ys_vue/src/assets/theme/theme-darkblue/popover.css


File diff suppressed because it is too large
+ 1 - 0
ys_vue/src/assets/theme/theme-darkblue/progress.css


+ 0 - 0
ys_vue/src/assets/theme/theme-darkblue/radio-button.css


+ 0 - 0
ys_vue/src/assets/theme/theme-darkblue/radio-group.css


File diff suppressed because it is too large
+ 1 - 0
ys_vue/src/assets/theme/theme-darkblue/radio.css


File diff suppressed because it is too large
+ 1 - 0
ys_vue/src/assets/theme/theme-darkblue/rate.css


File diff suppressed because it is too large
+ 1 - 0
ys_vue/src/assets/theme/theme-darkblue/reset.css


File diff suppressed because it is too large
+ 1 - 0
ys_vue/src/assets/theme/theme-darkblue/row.css


File diff suppressed because it is too large
+ 1 - 0
ys_vue/src/assets/theme/theme-darkblue/scrollbar.css


File diff suppressed because it is too large
+ 1 - 0
ys_vue/src/assets/theme/theme-darkblue/select-dropdown.css


File diff suppressed because it is too large
+ 1 - 0
ys_vue/src/assets/theme/theme-darkblue/select.css


File diff suppressed because it is too large
+ 1 - 0
ys_vue/src/assets/theme/theme-darkblue/slider.css


File diff suppressed because it is too large
+ 1 - 0
ys_vue/src/assets/theme/theme-darkblue/spinner.css


File diff suppressed because it is too large
+ 1 - 0
ys_vue/src/assets/theme/theme-darkblue/step.css


+ 1 - 0
ys_vue/src/assets/theme/theme-darkblue/steps.css

@@ -0,0 +1 @@
+@charset "UTF-8";.el-steps{font-size:0}.el-steps>:last-child .el-step__line{display:none}.el-steps.is-horizontal{white-space:nowrap}.el-steps.is-horizontal.is-center{text-align:center}

+ 0 - 0
ys_vue/src/assets/theme/theme-darkblue/submenu.css


File diff suppressed because it is too large
+ 1 - 0
ys_vue/src/assets/theme/theme-darkblue/switch.css


+ 0 - 0
ys_vue/src/assets/theme/theme-darkblue/tab-pane.css


File diff suppressed because it is too large
+ 1 - 0
ys_vue/src/assets/theme/theme-darkblue/table-column.css


File diff suppressed because it is too large
+ 1 - 0
ys_vue/src/assets/theme/theme-darkblue/table.css


File diff suppressed because it is too large
+ 1 - 0
ys_vue/src/assets/theme/theme-darkblue/tabs.css


File diff suppressed because it is too large
+ 1 - 0
ys_vue/src/assets/theme/theme-darkblue/tag.css


File diff suppressed because it is too large
+ 1 - 0
ys_vue/src/assets/theme/theme-darkblue/time-picker.css


File diff suppressed because it is too large
+ 1 - 0
ys_vue/src/assets/theme/theme-darkblue/time-select.css


File diff suppressed because it is too large
+ 1 - 0
ys_vue/src/assets/theme/theme-darkblue/tooltip.css


File diff suppressed because it is too large
+ 1 - 0
ys_vue/src/assets/theme/theme-darkblue/tree.css


File diff suppressed because it is too large
+ 1 - 0
ys_vue/src/assets/theme/theme-darkblue/upload.css


File diff suppressed because it is too large
+ 1 - 0
ys_vue/src/assets/theme/theme-green/alert.css


File diff suppressed because it is too large
+ 1 - 0
ys_vue/src/assets/theme/theme-green/autocomplete.css


File diff suppressed because it is too large
+ 1 - 0
ys_vue/src/assets/theme/theme-green/badge.css


File diff suppressed because it is too large
+ 1 - 0
ys_vue/src/assets/theme/theme-green/base.css


+ 0 - 0
ys_vue/src/assets/theme/theme-green/breadcrumb-item.css


+ 0 - 0
ys_vue/src/assets/theme/theme-green/breadcrumb.css


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