Explorar el Código

交科官网后台

xiaomin hace 4 años
commit
09386519f3

+ 12 - 0
.babelrc

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

+ 9 - 0
.editorconfig

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

+ 4 - 0
.eslintignore

@@ -0,0 +1,4 @@
+/build/
+/config/
+/dist/
+/*.js

+ 31 - 0
.eslintrc.js

@@ -0,0 +1,31 @@
+// https://eslint.org/docs/user-guide/configuring
+
+module.exports = {
+  root: true,
+  parserOptions: {
+    parser: 'babel-eslint'
+  },
+  env: {
+    browser: true,
+  },
+  extends: [
+    // https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention
+    // consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules.
+    'plugin:vue/essential',
+    // https://github.com/standard/standard/blob/master/docs/RULES-en.md
+    'standard'
+  ],
+  // required to lint *.vue files
+  plugins: [
+    'vue'
+  ],
+  // add your custom rules here
+  rules: {
+    // allow async-await
+    'generator-star-spacing': 'off',
+    // allow debugger during development
+    'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
+    'semi': ['error', 'always'],
+    'space-before-function-paren': 'off'
+  }
+}

+ 14 - 0
.gitignore

@@ -0,0 +1,14 @@
+.DS_Store
+node_modules/
+/dist/
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+
+# Editor directories and files
+.idea
+.vscode
+*.suo
+*.ntvs*
+*.njsproj
+*.sln

+ 10 - 0
.postcssrc.js

@@ -0,0 +1,10 @@
+// https://github.com/michael-ciniawsky/postcss-load-config
+
+module.exports = {
+  "plugins": {
+    "postcss-import": {},
+    "postcss-url": {},
+    // to edit target browsers: use "browserslist" field in package.json
+    "autoprefixer": {}
+  }
+}

+ 28 - 0
.project

@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>houtaixiangmu</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>com.aptana.ide.core.unifiedBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>com.aptana.projects.webnature</nature>
+	</natures>
+	<filteredResources>
+		<filter>
+			<id>1539239485050</id>
+			<name></name>
+			<type>26</type>
+			<matcher>
+				<id>org.eclipse.ui.ide.multiFilter</id>
+				<arguments>1.0-name-matches-false-false-node_modules</arguments>
+			</matcher>
+		</filter>
+	</filteredResources>
+</projectDescription>

+ 21 - 0
README.md

@@ -0,0 +1,21 @@
+# 交科信用官网后台
+
+> A Vue.js project
+
+## Build Setup
+
+``` bash
+# install dependencies
+npm install
+
+# serve with hot reload at localhost:8080
+npm run dev
+
+# build for production with minification
+npm run build
+
+# build for production and view the bundle analyzer report
+npm run build --report
+```
+
+For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).

+ 41 - 0
build/build.js

@@ -0,0 +1,41 @@
+'use strict'
+require('./check-versions')()
+
+process.env.NODE_ENV = 'production'
+
+const ora = require('ora')
+const rm = require('rimraf')
+const path = require('path')
+const chalk = require('chalk')
+const webpack = require('webpack')
+const config = require('../config')
+const webpackConfig = require('./webpack.prod.conf')
+
+const spinner = ora('building for production...')
+spinner.start()
+
+rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => {
+  if (err) throw err
+  webpack(webpackConfig, (err, stats) => {
+    spinner.stop()
+    if (err) throw err
+    process.stdout.write(stats.toString({
+      colors: true,
+      modules: false,
+      children: false, // If you are using ts-loader, setting this to true will make TypeScript errors show up during build.
+      chunks: false,
+      chunkModules: false
+    }) + '\n\n')
+
+    if (stats.hasErrors()) {
+      console.log(chalk.red('  Build failed with errors.\n'))
+      process.exit(1)
+    }
+
+    console.log(chalk.cyan('  Build complete.\n'))
+    console.log(chalk.yellow(
+      '  Tip: built files are meant to be served over an HTTP server.\n' +
+      '  Opening index.html over file:// won\'t work.\n'
+    ))
+  })
+})

+ 54 - 0
build/check-versions.js

@@ -0,0 +1,54 @@
+'use strict'
+const chalk = require('chalk')
+const semver = require('semver')
+const packageConfig = require('../package.json')
+const shell = require('shelljs')
+
+function exec (cmd) {
+  return require('child_process').execSync(cmd).toString().trim()
+}
+
+const versionRequirements = [
+  {
+    name: 'node',
+    currentVersion: semver.clean(process.version),
+    versionRequirement: packageConfig.engines.node
+  }
+]
+
+if (shell.which('npm')) {
+  versionRequirements.push({
+    name: 'npm',
+    currentVersion: exec('npm --version'),
+    versionRequirement: packageConfig.engines.npm
+  })
+}
+
+module.exports = function () {
+  const warnings = []
+
+  for (let i = 0; i < versionRequirements.length; i++) {
+    const mod = versionRequirements[i]
+
+    if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) {
+      warnings.push(mod.name + ': ' +
+        chalk.red(mod.currentVersion) + ' should be ' +
+        chalk.green(mod.versionRequirement)
+      )
+    }
+  }
+
+  if (warnings.length) {
+    console.log('')
+    console.log(chalk.yellow('To use this template, you must update following to modules:'))
+    console.log()
+
+    for (let i = 0; i < warnings.length; i++) {
+      const warning = warnings[i]
+      console.log('  ' + warning)
+    }
+
+    console.log()
+    process.exit(1)
+  }
+}

BIN
build/logo.png


+ 101 - 0
build/utils.js

@@ -0,0 +1,101 @@
+'use strict'
+const path = require('path')
+const config = require('../config')
+const ExtractTextPlugin = require('extract-text-webpack-plugin')
+const packageConfig = require('../package.json')
+
+exports.assetsPath = function (_path) {
+  const assetsSubDirectory = process.env.NODE_ENV === 'production'
+    ? config.build.assetsSubDirectory
+    : config.dev.assetsSubDirectory
+
+  return path.posix.join(assetsSubDirectory, _path)
+}
+
+exports.cssLoaders = function (options) {
+  options = options || {}
+
+  const cssLoader = {
+    loader: 'css-loader',
+    options: {
+      sourceMap: options.sourceMap
+    }
+  }
+
+  const postcssLoader = {
+    loader: 'postcss-loader',
+    options: {
+      sourceMap: options.sourceMap
+    }
+  }
+
+  // generate loader string to be used with extract text plugin
+  function generateLoaders (loader, loaderOptions) {
+    const loaders = options.usePostCSS ? [cssLoader, postcssLoader] : [cssLoader]
+
+    if (loader) {
+      loaders.push({
+        loader: loader + '-loader',
+        options: Object.assign({}, loaderOptions, {
+          sourceMap: options.sourceMap
+        })
+      })
+    }
+
+    // Extract CSS when that option is specified
+    // (which is the case during production build)
+    if (options.extract) {
+      return ExtractTextPlugin.extract({
+        use: loaders,
+        fallback: 'vue-style-loader'
+      })
+    } else {
+      return ['vue-style-loader'].concat(loaders)
+    }
+  }
+
+  // https://vue-loader.vuejs.org/en/configurations/extract-css.html
+  return {
+    css: generateLoaders(),
+    postcss: generateLoaders(),
+    less: generateLoaders('less'),
+    sass: generateLoaders('sass', { indentedSyntax: true }),
+    scss: generateLoaders('sass'),
+    stylus: generateLoaders('stylus'),
+    styl: generateLoaders('stylus')
+  }
+}
+
+// Generate loaders for standalone style files (outside of .vue)
+exports.styleLoaders = function (options) {
+  const output = []
+  const loaders = exports.cssLoaders(options)
+
+  for (const extension in loaders) {
+    const loader = loaders[extension]
+    output.push({
+      test: new RegExp('\\.' + extension + '$'),
+      use: loader
+    })
+  }
+
+  return output
+}
+
+exports.createNotifierCallback = () => {
+  const notifier = require('node-notifier')
+
+  return (severity, errors) => {
+    if (severity !== 'error') return
+
+    const error = errors[0]
+    const filename = error.file && error.file.split('!').pop()
+
+    notifier.notify({
+      title: packageConfig.name,
+      message: severity + ': ' + error.name,
+      subtitle: filename || '',
+      icon: path.join(__dirname, 'logo.png')
+    })
+  }
+}

+ 22 - 0
build/vue-loader.conf.js

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

+ 99 - 0
build/webpack.base.conf.js

@@ -0,0 +1,99 @@
+'use strict'
+const path = require('path')
+const utils = require('./utils')
+const config = require('../config')
+const vueLoaderConfig = require('./vue-loader.conf')
+const webpack = require('webpack')
+
+function resolve (dir) {
+  return path.join(__dirname, '..', dir)
+}
+
+const createLintingRule = () => ({
+  test: /\.(js|vue)$/,
+  loader: 'eslint-loader',
+  enforce: 'pre',
+  include: [resolve('src'), resolve('test')],
+  options: {
+    formatter: require('eslint-friendly-formatter'),
+    emitWarning: !config.dev.showEslintErrorsInOverlay
+  }
+})
+
+module.exports = {
+  context: path.resolve(__dirname, '../'),
+  entry: {
+    app: './src/main.js'
+  },
+  output: {
+    path: config.build.assetsRoot,
+    filename: '[name].js',
+    publicPath: process.env.NODE_ENV === 'production'
+      ? config.build.assetsPublicPath
+      : config.dev.assetsPublicPath
+  },
+  resolve: {
+    extensions: ['.js', '.vue', '.json'],
+    alias: {
+      'vue$': 'vue/dist/vue.esm.js',
+      '@': resolve('src'),
+    }
+  },
+  plugins: [
+    new webpack.ProvidePlugin({
+        $: "jquery",
+        jQuery: "jquery"
+    })
+  ],
+  module: {
+    rules: [
+      ...(config.dev.useEslint ? [createLintingRule()] : []),
+      {
+        test: /\.vue$/,
+        loader: 'vue-loader',
+        options: vueLoaderConfig
+      },
+      {
+        test: /\.js$/,
+        loader: 'babel-loader',
+        include: [resolve('src'), resolve('test'), resolve('node_modules/webpack-dev-server/client')]
+      },
+      {
+        test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
+        loader: 'url-loader',
+        options: {
+          limit: 10000,
+          name: utils.assetsPath('img/[name].[hash:7].[ext]')
+        }
+      },
+      {
+        test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/,
+        loader: 'url-loader',
+        options: {
+          limit: 10000,
+          name: utils.assetsPath('media/[name].[hash:7].[ext]')
+        }
+      },
+      {
+        test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
+        loader: 'url-loader',
+        options: {
+          limit: 10000,
+          name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
+        }
+      }
+    ]
+  },
+  node: {
+    // prevent webpack from injecting useless setImmediate polyfill because Vue
+    // source contains it (although only uses it if it's native).
+    setImmediate: false,
+    // prevent webpack from injecting mocks to Node native modules
+    // that does not make sense for the client
+    dgram: 'empty',
+    fs: 'empty',
+    net: 'empty',
+    tls: 'empty',
+    child_process: 'empty'
+  }
+}

+ 95 - 0
build/webpack.dev.conf.js

@@ -0,0 +1,95 @@
+'use strict'
+const utils = require('./utils')
+const webpack = require('webpack')
+const config = require('../config')
+const merge = require('webpack-merge')
+const path = require('path')
+const baseWebpackConfig = require('./webpack.base.conf')
+const CopyWebpackPlugin = require('copy-webpack-plugin')
+const HtmlWebpackPlugin = require('html-webpack-plugin')
+const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin')
+const portfinder = require('portfinder')
+
+const HOST = process.env.HOST
+const PORT = process.env.PORT && Number(process.env.PORT)
+
+const devWebpackConfig = merge(baseWebpackConfig, {
+  module: {
+    rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap, usePostCSS: true })
+  },
+  // cheap-module-eval-source-map is faster for development
+  devtool: config.dev.devtool,
+
+  // these devServer options should be customized in /config/index.js
+  devServer: {
+    clientLogLevel: 'warning',
+    historyApiFallback: {
+      rewrites: [
+        { from: /.*/, to: path.posix.join(config.dev.assetsPublicPath, 'index.html') },
+      ],
+    },
+    hot: true,
+    contentBase: false, // since we use CopyWebpackPlugin.
+    compress: true,
+    host: HOST || config.dev.host,
+    port: PORT || config.dev.port,
+    open: config.dev.autoOpenBrowser,
+    overlay: config.dev.errorOverlay
+      ? { warnings: false, errors: true }
+      : false,
+    publicPath: config.dev.assetsPublicPath,
+    proxy: config.dev.proxyTable,
+    quiet: true, // necessary for FriendlyErrorsPlugin
+    watchOptions: {
+      poll: config.dev.poll,
+    }
+  },
+  plugins: [
+    new webpack.DefinePlugin({
+      'process.env': require('../config/dev.env')
+    }),
+    new webpack.HotModuleReplacementPlugin(),
+    new webpack.NamedModulesPlugin(), // HMR shows correct file names in console on update.
+    new webpack.NoEmitOnErrorsPlugin(),
+    // https://github.com/ampedandwired/html-webpack-plugin
+    new HtmlWebpackPlugin({
+      filename: 'index.html',
+      template: 'index.html',
+      inject: true
+    }),
+    // copy custom static assets
+    new CopyWebpackPlugin([
+      {
+        from: path.resolve(__dirname, '../static'),
+        to: config.dev.assetsSubDirectory,
+        ignore: ['.*']
+      }
+    ])
+  ]
+})
+
+module.exports = new Promise((resolve, reject) => {
+  portfinder.basePort = process.env.PORT || config.dev.port
+  portfinder.getPort((err, port) => {
+    if (err) {
+      reject(err)
+    } else {
+      // publish the new Port, necessary for e2e tests
+      process.env.PORT = port
+      // add port to devServer config
+      devWebpackConfig.devServer.port = port
+
+      // Add FriendlyErrorsPlugin
+      devWebpackConfig.plugins.push(new FriendlyErrorsPlugin({
+        compilationSuccessInfo: {
+          messages: [`Your application is running here: http://${devWebpackConfig.devServer.host}:${port}`],
+        },
+        onErrors: config.dev.notifyOnErrors
+        ? utils.createNotifierCallback()
+        : undefined
+      }))
+
+      resolve(devWebpackConfig)
+    }
+  })
+})

+ 145 - 0
build/webpack.prod.conf.js

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

+ 7 - 0
config/dev.env.js

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

+ 84 - 0
config/index.js

@@ -0,0 +1,84 @@
+'use strict'
+// Template version: 1.3.1
+// see http://vuejs-templates.github.io/webpack for documentation.
+
+const path = require('path')
+
+module.exports = {
+	dev: {
+
+		// Paths
+		assetsSubDirectory: 'static',
+		assetsPublicPath: '/',
+		proxyTable: {
+			'/api': {
+				target: "http://172.31.1.10:8080/",
+				changeOrigin: true,
+				pathRewrite: {
+					'^/api': ''
+				}
+			}
+		},
+
+		// Various Dev Server settings
+		//host: 'localhost', // can be overwritten by process.env.HOST
+		port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
+		autoOpenBrowser: false,
+		errorOverlay: true,
+		notifyOnErrors: true,
+		poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
+
+		// Use Eslint Loader?
+		// If true, your code will be linted during bundling and
+		// linting errors and warnings will be shown in the console.
+		useEslint: true,
+		// If true, eslint errors and warnings will also be shown in the error overlay
+		// in the browser.
+		showEslintErrorsInOverlay: false,
+
+		/**
+		 * Source Maps
+		 */
+
+		// https://webpack.js.org/configuration/devtool/#development
+		devtool: 'cheap-module-eval-source-map',
+
+		// If you have problems debugging vue-files in devtools,
+		// set this to false - it *may* help
+		// https://vue-loader.vuejs.org/en/options.html#cachebusting
+		cacheBusting: true,
+
+		cssSourceMap: true
+	},
+
+	build: {
+		// Template for index.html
+		index: path.resolve(__dirname, '../dist/index.html'),
+
+		// Paths
+		assetsRoot: path.resolve(__dirname, '../dist'),
+		assetsSubDirectory: 'static',
+		assetsPublicPath: '/',
+
+		/**
+		 * Source Maps
+		 */
+
+		productionSourceMap: true,
+		// https://webpack.js.org/configuration/devtool/#production
+		devtool: '#source-map',
+
+		// Gzip off by default as many popular static hosts such as
+		// Surge or Netlify already gzip all static assets for you.
+		// Before setting to `true`, make sure to:
+		// npm install --save-dev compression-webpack-plugin
+		productionGzip: false,
+		productionGzipExtensions: ['js', 'css'],
+
+		// Run the build command with an extra argument to
+		// View the bundle analyzer report after build finishes:
+		// `npm run build --report`
+		// Set to `true` or `false` to always turn it on or off
+		bundleAnalyzerReport: process.env.npm_config_report
+	}
+}

+ 4 - 0
config/prod.env.js

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

+ 12 - 0
index.html

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

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 11836 - 0
package-lock.json


+ 77 - 0
package.json

@@ -0,0 +1,77 @@
+{
+  "name": "guanwanghoutai",
+  "version": "1.0.0",
+  "description": "A Vue.js project",
+  "author": "xiaomin <xiaomin@163.com>",
+  "private": true,
+  "scripts": {
+    "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js --open",
+    "start": "npm run dev",
+    "lint": "eslint --ext .js,.vue src",
+    "lintfix": "eslint --ext .js,.vue src --fix",
+    "build": "node build/build.js"
+  },
+  "dependencies": {
+    "axios": "^0.18.0",
+    "element-ui": "^2.4.5",
+    "moment": "^2.22.2",
+    "vue": "^2.5.2",
+    "vue-router": "^3.0.1"
+  },
+  "devDependencies": {
+    "autoprefixer": "^7.1.2",
+    "babel-core": "^6.22.1",
+    "babel-eslint": "^8.2.1",
+    "babel-helper-vue-jsx-merge-props": "^2.0.3",
+    "babel-loader": "^7.1.1",
+    "babel-plugin-syntax-jsx": "^6.18.0",
+    "babel-plugin-transform-runtime": "^6.22.0",
+    "babel-plugin-transform-vue-jsx": "^3.5.0",
+    "babel-preset-env": "^1.3.2",
+    "babel-preset-stage-2": "^6.22.0",
+    "chalk": "^2.0.1",
+    "copy-webpack-plugin": "^4.0.1",
+    "css-loader": "^0.28.0",
+    "eslint": "^4.15.0",
+    "eslint-config-standard": "^10.2.1",
+    "eslint-friendly-formatter": "^3.0.0",
+    "eslint-loader": "^1.7.1",
+    "eslint-plugin-import": "^2.7.0",
+    "eslint-plugin-node": "^5.2.0",
+    "eslint-plugin-promise": "^3.4.0",
+    "eslint-plugin-standard": "^3.0.1",
+    "eslint-plugin-vue": "^4.0.0",
+    "extract-text-webpack-plugin": "^3.0.0",
+    "file-loader": "^1.1.4",
+    "friendly-errors-webpack-plugin": "^1.6.1",
+    "html-webpack-plugin": "^2.30.1",
+    "node-notifier": "^5.1.2",
+    "optimize-css-assets-webpack-plugin": "^3.2.0",
+    "ora": "^1.2.0",
+    "portfinder": "^1.0.13",
+    "postcss-import": "^11.0.0",
+    "postcss-loader": "^2.0.8",
+    "postcss-url": "^7.2.1",
+    "rimraf": "^2.6.0",
+    "semver": "^5.3.0",
+    "shelljs": "^0.7.6",
+    "uglifyjs-webpack-plugin": "^1.1.1",
+    "url-loader": "^0.5.8",
+    "vue-loader": "^13.3.0",
+    "vue-style-loader": "^3.0.1",
+    "vue-template-compiler": "^2.5.2",
+    "webpack": "^3.6.0",
+    "webpack-bundle-analyzer": "^2.9.0",
+    "webpack-dev-server": "^2.9.1",
+    "webpack-merge": "^4.1.0"
+  },
+  "engines": {
+    "node": ">= 6.0.0",
+    "npm": ">= 3.0.0"
+  },
+  "browserslist": [
+    "> 1%",
+    "last 2 versions",
+    "not ie <= 8"
+  ]
+}

+ 17 - 0
src/App.vue

@@ -0,0 +1,17 @@
+<template>
+  <div id="app">
+    <router-view/>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'App'
+};
+</script>
+
+<style>
+  #app{
+    height: 100%;
+  }
+</style>

+ 12 - 0
src/assets/css/index.css

@@ -0,0 +1,12 @@
+body,html {
+  margin: 0;
+  padding: 0;
+  height: 100%;
+  width: 100%;
+}
+.card {
+  height: 100%;
+  margin-top: 10px;
+  margin-bottom: 10px;
+  overflow: auto;
+}

BIN
src/assets/logo.png


+ 19 - 0
src/components/MyBreadcrumb.vue

@@ -0,0 +1,19 @@
+<template>
+  <el-breadcrumb separator-class="el-icon-arrow-right">
+    <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
+    <el-breadcrumb-item> {{level1}} </el-breadcrumb-item>
+    <el-breadcrumb-item> {{level2}} </el-breadcrumb-item>
+    </el-breadcrumb>
+</template>
+
+<script type="text/javascript">
+export default{
+  name: 'MyBreadcrumb',
+  props: ['level1', 'level2']
+}
+</script>
+
+<style type="text/css">
+
+</style>
+

+ 32 - 0
src/main.js

@@ -0,0 +1,32 @@
+// The Vue build version to load with the `import` command
+// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
+import Vue from 'vue';
+import App from './App';
+import router from './router';
+import ElementUI from 'element-ui';
+import 'element-ui/lib/theme-chalk/index.css';
+import '@/assets/css/index.css';
+import moment from 'moment';
+// import axios from 'axios';
+import myaxios from '@/plugins/MyAxios';
+import MyBreadcrumb from '@/components/MyBreadcrumb';
+
+Vue.use(ElementUI);
+Vue.use(myaxios);
+Vue.component(MyBreadcrumb.name, MyBreadcrumb);
+
+Vue.filter('fmtDate', (value, fmtString) => {
+  return moment(value).format(fmtString);
+});
+// axios.defaults.baseURL = 'http://localhost:8888/api/private/v1/';
+// Vue.prototype.$http = axios;
+Vue.config.productionTip = false;
+
+/* eslint-disable no-new */
+new Vue({
+  el: '#app',
+  router,
+  components: { App },
+  template: '<App/>'
+});
+

+ 30 - 0
src/plugins/MyAxios.js

@@ -0,0 +1,30 @@
+import axios from 'axios';
+const MyAxios = {};
+MyAxios.install = function(Vue) {
+  axios.defaults.baseURL = '/api';
+  axios.interceptors.request.use(function (config) {
+    // Do something before request is sent
+    if(config.url.toLocaleLowerCase() !== 'login') {
+      const token = sessionStorage.getItem('token');
+      config.headers.Authorization = token;
+    }
+    return config;
+  }, function (error) {
+    // Do something with request error
+    return Promise.reject(error);
+  });
+
+  // Add a response interceptor
+  axios.interceptors.response.use(function (response) {
+    // Do something with response data
+    return response;
+  }, function (error) {
+    // Do something with response error
+    return Promise.reject(error);
+  });
+
+  Vue.prototype.$http = axios;
+}
+
+export default MyAxios;
+

+ 62 - 0
src/router/index.js

@@ -0,0 +1,62 @@
+import Vue from 'vue';
+import Router from 'vue-router';
+import Login from '@/views/Login';
+import Home from '@/views/Home';
+import Navigation from '@/views/Module/navigation';
+import Banner from '@/views/Module/banner';
+import Imgtext from '@/views/Module/imgtext';
+import News from '@/views/Module/news';
+import Journal from '@/views/Module/journal';
+import Staylanguage from '@/views/Module/staylanguage';
+import Users from '@/views/Users/users';
+import Password from '@/views/Password/password';
+// import Backups from '@/views/data/backups';
+// import Reduction from '@/views/data/reduction';
+
+import { Message } from 'element-ui';
+
+Vue.use(Router);
+
+const router = new Router({
+  routes: [
+    {name: 'Login', path: '/login', component: Login},
+    {name: 'Home',
+      path: '/',
+      component: Home,
+      children:[
+        {name: 'Navigation', path: '/navigation', component: Navigation},
+        {name: 'Banner', path: '/banner', component: Banner},
+        {name: 'Imgtext', path: '/imgtext', component: Imgtext},
+        {name: 'News', path: '/news', component: News},
+        {name: 'Users', path: '/users', component: Users},
+        {name: 'Password', path: '/password', component: Password},
+        {name: 'Journal', path: '/journal', component: Journal},
+        {name: 'Staylanguage', path: '/staylanguage', component: Staylanguage}
+      ]
+    }
+  ]
+});
+
+router.beforeEach((to, from, next) => {
+  // console.log(to);
+  // console.log(from);
+  // next();
+  // 如果是登录的时候不判断token ,不是登录才判断token
+  // console.log(to);
+  if (to.name && to.name.toLocaleLowerCase() !== 'login') {
+    // 判断token
+    const token = sessionStorage.getItem('token');
+    if (!token) {
+      // 没有token,跳转到登录页面
+      // this.$router.push('/login')
+      router.push('/login');
+      // 提示
+      // this.$message.warning('请先登录');
+      Message.warning('请先登录');
+      return;
+    }
+  }
+  next();
+});
+
+export default router;

+ 190 - 0
src/views/Home.vue

@@ -0,0 +1,190 @@
+
+ <template>
+  <el-container class="container">
+    <!-- 头部 -->
+    <el-header class="header">
+      <!-- 栅格 -->
+      <el-row>
+        <el-col :span="4">
+          <img src="@/assets/logo.png" alt="交科信用管理有限公司" class="logoimg">
+        </el-col>
+        <el-col :span="19">
+          <div class="title">后台管理系统</div>
+        </el-col>
+        <el-col :span="1">
+          <div class="logout">
+            <a href="#" @click.prevent="handleLogout">退出</a>
+          </div>
+        </el-col>
+      </el-row>
+    </el-header>
+    <el-container>
+      <!-- 侧边栏 -->
+      <el-aside class="aside" width="200px">
+        <!-- default-active 可以让某一个menu-item选中,值是menu-item的index的值
+          unique-opened 默认只有一项展开
+          开启路由模式, menu-item的index作为路由地址
+         -->
+        <el-menu
+          unique-opened
+          router
+          style="height: 100%">
+          <el-submenu
+            v-for="item in menus"
+            :key="item.id"
+            :index="item.id + ''">
+            <template slot="title">
+              <i class="el-icon-location"></i>
+              <span>{{ item.authName }}</span>
+            </template>
+            <el-menu-item
+              v-for="item1 in item.children"
+              :key="item1.id"
+              :index="'/' + item1.path">
+              <i class="el-icon-menu"></i>
+              {{ item1.authName }}
+            </el-menu-item>
+          </el-submenu>
+        </el-menu>
+      </el-aside>
+      <el-main class="main">
+        <router-view></router-view>
+      </el-main>
+    </el-container>
+  </el-container>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      menus: [
+        {
+          id:1,
+          authName:"模块管理",
+          children:[
+            {
+              id:1,
+              path:"navigation",
+              authName:"导航分类"
+            },
+            {
+              id:2,
+              path:"banner",
+              authName:"banner列表"
+            },
+            {
+              id:3,
+              path:"imgtext",
+              authName:"图文列表"
+            },
+            {
+              id:4,
+              path:"news",
+              authName:"新闻列表"
+            },
+            {
+              id:5,
+              path:"journal",
+              authName:"日志列表"
+            },
+            {
+              id:6,
+              path:"staylanguage",
+              authName:"留言板列表"
+            },
+          ]
+        },
+        {
+          id:2,
+          authName:"用户管理",
+          children:[
+            {
+              id:1,
+              path:"users",
+              authName:"用户列表"
+            }
+          ]
+        },
+        {
+          id:3,
+          authName:"密码修改",
+          children:[
+            {
+              id:1,
+              path:"password",
+              authName:"密码列表"
+            }
+          ]
+        },
+      ]
+    };
+  },
+  beforeCreate() {
+    // 判断是否登录,token
+    var token = sessionStorage.getItem('token');
+    if (!token) {
+      // 提示
+      this.$message.warning('请先登录');
+      // 没有token,跳转到登录页面
+      this.$router.push('/login');
+    }
+  },
+  created() {
+    // 加载菜单数据
+    // this.loadMenus();
+
+  },
+  methods: {
+    // 退出
+    handleLogout() {
+      // 提示退出成功
+      this.$message.success('退出成功');
+      // 1 清除token
+      sessionStorage.clear();
+      // 2 跳转到登录页面
+      this.$router.push('/login');
+    },
+    // 加载菜单数据
+    // async loadMenus() {
+    //   const response = await this.$http.get('menus');
+    //   this.menus = response.data.data;
+    //   console.log(response)
+    // }
+  }
+};
+</script>
+
+<style>
+.container {
+  height: 100%;
+}
+.header {
+  background-color: #b3c0d1;
+  padding: 0;
+}
+.header .title {
+  text-align: center;
+  color: white;
+  font-size: 24px;
+  line-height: 60px;
+}
+.header .logout {
+  line-height: 60px;
+}
+.header .logout a {
+  font-weight: 700;
+  color: black;
+  text-decoration: none;
+}
+.aside {
+  background-color: #d3dce6;
+}
+.main {
+  background-color: #e9eef3;
+}
+.logoimg {
+  margin-top: 15px;
+  margin-left: 20px;
+}
+</style>

+ 70 - 0
src/views/Login.vue

@@ -0,0 +1,70 @@
+<template>
+  <div class="login-wrap">
+    <el-form
+    class="login-from"
+    label-position="top"
+    label-width="80px"
+    :model="fromData">
+      <h2>用户登录</h2>
+      <el-form-item label="用户名">
+        <el-input v-model="fromData.UserName"></el-input>
+      </el-form-item>
+      <el-form-item label="密码">
+        <el-input @keyup.enter.native="handleLogin" type="password" v-model="fromData.Password"></el-input>
+      </el-form-item>
+      <el-form-item>
+        <el-button @click="handleLogin" class="btn" type="primary">登录</el-button>
+      </el-form-item>
+    </el-form>
+  </div>
+</template>
+
+<script type="text/javascript">
+export default {
+  data() {
+    return {
+      fromData: {
+        UserName: '',
+        Password: ''
+      }
+    };
+  },
+  methods: {
+    async handleLogin () {
+      const response = await this.$http.post(`keeper?action=login`, this.fromData);
+      const { status, data:{ Message}} = response;
+      // console.log(response)
+      if (response.data.Code === 200) {
+        this.$message.success('登录成功');
+        // 将tocken取到
+        const token = document.cookie;
+        // console.log(token)
+        // 将tocken保存到sessionStorage中
+        sessionStorage.setItem('token', token);
+        this.$router.push('/');
+      } else {
+        this.$message.error('登录失败');
+      }
+    },
+  }
+};
+</script>
+
+<style scoped>
+  .login-wrap{
+    background-color: #324152;
+    height: 100%;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+  }
+  .login-wrap .login-from{
+    background-color: #fff;
+    width: 400px;
+    border-radius: 5px;
+    padding: 30px;
+  }
+  .login-wrap .login-from .btn{
+    width: 100%;
+  }
+</style>

+ 299 - 0
src/views/Module/banner.vue

@@ -0,0 +1,299 @@
+<template>
+  <el-card>
+    <my-breadcrumb level1="模块管理" level2="banner列表"></my-breadcrumb>
+    <el-button type='success' @click="addBannerList = true" plain class="common">创建banner列表</el-button>
+    <el-table
+      class="tabel"
+      :data="data"
+      stripe
+      border
+      style="width: 100%">
+      <el-table-column
+          label="#"
+          type="index"
+          width="50">
+      </el-table-column>
+      <el-table-column
+        prop="Photo"
+        label="图片路径"
+        width="400">
+      </el-table-column>
+      <el-table-column
+        prop="Describe"
+        label="描述内容"
+        width="400">
+      </el-table-column>
+      <el-table-column
+        label="操作">
+        <template slot-scope="scope">
+          <el-button type="primary" icon="el-icon-edit" size="mini" plain @click="openEdit(scope.row)">
+          </el-button>
+          <el-button type="danger" icon="el-icon-delete" size="mini" plain @click="handleDelete(scope.row.Id)">
+          </el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    <!-- 分页 -->
+    <el-pagination
+      @size-change="handleSizeChange"
+      @current-change="handleCurrentChange"
+      :current-page="pagenum"
+      :page-sizes="[6, 8, 10]"
+      :page-size="pagesize"
+      layout="total, sizes, prev, pager, next, jumper"
+      :total="total">
+    </el-pagination>
+     <!-- 添加对话框 -->
+    <el-dialog
+      @close="handleEditDialogClose"
+      title="创建banner列表"
+      :visible.sync="addBannerList">
+      <el-form
+        label-position="right"
+        label-width="80px"
+        :model="formAddBannerList">
+          <!-- action  上传的地址,此处必须写上全部路径 -->
+        <el-upload
+          class="anniu"
+          ref="upload"
+          action="http://222.35.31.66:28080/banner"
+          :on-preview="handlePreview"
+          :on-remove="handleRemove"
+          :on-change="handleSuccess"
+          :file-list="fileList"
+          :auto-upload="false">
+          <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
+        </el-upload>
+        <el-form-item label="描述内容">
+          <el-input v-model="formAddBannerList.Describe" auto-complete="off"></el-input>
+        </el-form-item>
+        <el-form-item label="序号">
+          <el-input v-model.number="formAddBannerList.Index" auto-complete="off"></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="addBannerList = false">取 消</el-button>
+        <el-button type="primary" @click="handleAdd">确 定</el-button>
+      </div>
+    </el-dialog>
+    <!-- 修改对话框 -->
+    <el-dialog
+      @close="handleEditDialogClose"
+      title="修改banner列表"
+      :visible.sync="openEidtBanner">
+      <el-form
+        :model="formAddBannerList"
+        label-width="100px">
+        <el-upload
+          class="anniu"
+          ref="upload"
+          :show-file-list="true"
+          action="http://222.35.31.66:28080/banner"
+          :on-preview="handlePreview"
+          :on-remove="handleRemove"
+          :on-change="handleSuccess"
+          :file-list="fileList"
+          :auto-upload="false">
+          <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
+        </el-upload>
+        <img :src="formAddBannerList.Photo" class="pic">
+        <el-form-item label="描述内容">
+          <el-input v-model="formAddBannerList.Describe" auto-complete="off"></el-input>
+        </el-form-item>
+        <el-form-item label="序号">
+          <el-input v-model.number="formAddBannerList.Index" auto-complete="off"></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="openEidtBanner = false">取 消</el-button>
+        <el-button type="primary" @click="handleEdit">确 定</el-button>
+      </div>
+    </el-dialog>
+  </el-card>
+</template>
+
+<script type="text/javascript">
+export default{
+  data() {
+    return {
+      data:[],
+      // 分页数据
+      pagenum: 1,
+      pagesize: 6,
+      // 总共有多少条数据
+      total: 0,
+      loading: true,
+      addBannerList: false,
+      openEidtBanner: false,
+      openQueryBanner: false,
+      fileList: [],
+      file: null,
+      banID: -1,
+      formAddBannerList: {
+        "Photo":"",
+        "Describe": "",
+        "Index": ""
+      },
+      headers: {
+        'Authorization': sessionStorage.getItem('token')
+      }
+    }
+  },
+  created() {
+    this.loadData();
+  },
+  methods: {
+    // 加载数据
+    async loadData() {
+        this.loading = true;
+        const response = await this.$http.get(`banner?Page=${this.pagenum}&Pagesize=${this.pagesize}`);
+        if(response.data.Code === 200) {
+          this.loading = false;
+          this.data = response.data.Message.TotalList;
+          this.total = response.data.Message.Total;
+        } else {
+          this.$message.error(msg);
+      }
+    },
+    // 分页方法
+    handleSizeChange(val) {
+      this.pagesize = val;
+      this.loadData();
+      console.log(`每页 ${val} 条`);
+    },
+    handleCurrentChange(val) {
+      this.pagenum = val;
+      this.loadData();
+      console.log(`当前页: ${val}`);
+    },
+    // 图片方法
+    handleRemove(file, fileList) {
+      console.log(file, fileList);
+    },
+    handlePreview(file) {
+        console.log(file);
+    },
+    handleSuccess (a) {
+      // this.formAddBannerList.Photo = a.raw;
+      this.file = a.raw;
+      // console.log(a.raw)
+    },
+    // 添加banner列表
+    async handleAdd () {
+      // 将数据转换为formData形式
+      const formData = new FormData();
+      formData.append('Photo', this.file);
+      formData.append('Index', this.formAddBannerList.Index);
+      formData.append('Describe', this.formAddBannerList.Describe);
+      const response = await this.$http.post('banner', formData);
+      // console.log(response)
+      if(response.data.Code === 200){
+        this.$message.success('添加成功');
+        this.loadData();
+        for (var key in this.formAddBannerList) {
+          this.formAddBannerList[key] = '';
+        }
+        this.addBannerList = false;
+      } else {
+        this.$message.error('添加失败');
+      }
+    },
+    // 打开编辑窗口
+     async openEdit(response) {
+      // 将数据显示到编辑框中
+      this.openEidtBanner = true;
+      this.banID = response.Id;
+      this.formAddBannerList.Photo ='http://172.31.1.10:8080/' + response.Photo;
+      // console.log(this.formAddBannerList.Photo);
+      this.formAddBannerList.Describe = response.Describe;
+      this.formAddBannerList.Index = response.Index;
+    },
+    // 修改banner列表
+    async handleEdit() {
+      // 将数据转换为formData形式
+      const formData = new FormData();
+      formData.append('Photo', this.file);
+      formData.append('Index', this.formAddBannerList.Index);
+      formData.append('Describe', this.formAddBannerList.Describe);
+      const response = await this.$http.post(`banner/${this.banID}`, formData);
+      if(response.data.Code === 200) {
+        this.openEidtBanner = false;
+        this.loadData();
+        for (var key in this.formAddBannerList) {
+          this.formAddBannerList[key] = '';
+        }
+        this.$message({
+          type:'success',
+          message: '编辑成功'
+        });
+      } else {
+        this.$message({
+          type:'error',
+          message: '编辑失败'
+        })
+      }
+    },
+    // 关闭编辑对话框的时候执行
+    handleEditDialogClose() {
+      // 清空表单数据
+      for (var key in this.formAddBannerList) {
+        this.formAddBannerList[key] = '';
+      }
+    },
+    // 删除banner列表
+    handleDelete(BId) {
+      // 删除提示
+      this.$confirm('是否要删除该分类?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(async () => {
+        // 点击确定按钮
+        const response = await this.$http.delete(`banner/${BId}`);
+        // console.log(response)
+        // 判断是否删除成功
+        if (response.data.Code === 200) {
+          this.loadData();
+          this.$message({
+          type: 'success',
+          message: '删除成功!'
+          });
+        } else {
+          this.$message({
+            type: 'error',
+            message: '删除失败!'
+          });
+        }
+      }).catch(() => {
+        // 点击取消按钮
+        this.$message({
+          type: 'info',
+          message: '已取消删除'
+        });
+      });
+    },
+  }
+};
+</script>
+
+<style type="text/css">
+.searchInput{
+  width: 300px;
+  margin-top: 10px;
+  margin-bottom: 10px;
+}
+.el-table .cell {
+  white-space: nowrap;
+}
+.common {
+  margin: 10px 0;
+}
+.anniu {
+  margin-bottom: 15px;
+}
+.pic {
+  width: 200px;
+  height: 100px;
+}
+</style>
+

+ 310 - 0
src/views/Module/imgtext.vue

@@ -0,0 +1,310 @@
+<template>
+  <el-card>
+    <my-breadcrumb level1="模块管理" level2="图文列表"></my-breadcrumb>
+    <el-button type='success' @click="addimgtextList = true" plain class="common">创建图文列表</el-button>
+    <el-table
+      class="tabel"
+      :data="data"
+      stripe
+      border
+      style="width: 100%">
+      <el-table-column
+          label="#"
+          type="index"
+          width="50">
+      </el-table-column>
+      <el-table-column
+        prop="Photo"
+        label="图片路径"
+        width="300">
+      </el-table-column>
+      <el-table-column
+        prop="Describe"
+        label="描述内容"
+        width="300">
+      </el-table-column>
+      <el-table-column
+        prop="Name"
+        label="标题"
+        width="200">
+      </el-table-column>
+      <el-table-column
+        label="操作">
+        <template slot-scope="scope">
+          <el-button type="primary" icon="el-icon-edit" size="mini" plain @click="openEdit(scope.row)">
+          </el-button>
+          <el-button type="danger" icon="el-icon-delete" size="mini" plain @click="handleDelete(scope.row.Id)">
+          </el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    <!-- 分页 -->
+  <el-pagination
+      @size-change="handleSizeChange"
+      @current-change="handleCurrentChange"
+      :current-page="pagenum"
+      :page-sizes="[6, 20, 30, 40]"
+      :page-size="pagesize"
+      layout="total, sizes, prev, pager, next, jumper"
+      :total="total">
+  </el-pagination>
+     <!-- 添加对话框 -->
+  <el-dialog
+  @close="handleEditDialogClose"
+  title="创建图文列表"
+  :visible.sync="addimgtextList">
+      <el-form label-position="right" label-width="80px" :model="formaddimgtextList">
+        <el-upload
+          class="anniu"
+          ref="upload"
+          action="http://222.35.31.66:28080/imagedescribe"
+          :on-preview="handlePreview"
+          :on-remove="handleRemove"
+          :on-change="handleSuccess"
+          :auto-upload="false">
+          <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
+        </el-upload>
+        <el-form-item label="描述内容">
+          <el-input v-model="formaddimgtextList.Describe" auto-complete="off"></el-input>
+        </el-form-item>
+        <el-form-item label="标题">
+          <el-input v-model="formaddimgtextList.Name" auto-complete="off"></el-input>
+        </el-form-item>
+        <el-form-item label="序号">
+          <el-input v-model.numbe="formaddimgtextList.Index" auto-complete="off"></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="addimgtextList = false">取 消</el-button>
+        <el-button type="primary" @click="handleAdd">确 定</el-button>
+      </div>
+  </el-dialog>
+   <!-- 修改对话框 -->
+  <el-dialog
+      @close="handleEditDialogClose"
+      title="修改图文列表"
+      :visible.sync="openEidtImgtext">
+      <el-form
+        :model="formaddimgtextList"
+        label-width="100px">
+        <el-upload
+          class="anniu"
+          ref="upload"
+          action="http://222.35.31.66:28080/imagedescribe"
+          :on-preview="handlePreview"
+          :on-remove="handleRemove"
+          :on-change="handleSuccess"
+          :auto-upload="false">
+          <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
+        </el-upload>
+        <img :src="formaddimgtextList.Photo" class="pic">
+        <el-form-item label="描述内容">
+          <el-input v-model="formaddimgtextList.Describe" auto-complete="off"></el-input>
+        </el-form-item>
+        <el-form-item label="标题">
+          <el-input v-model="formaddimgtextList.Name" auto-complete="off"></el-input>
+        </el-form-item>
+        <el-form-item label="序号">
+          <el-input v-model.numbe="formaddimgtextList.Index" auto-complete="off"></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="openEidtImgtext = false">取 消</el-button>
+        <el-button type="primary" @click="handleEdit">确 定</el-button>
+      </div>
+    </el-dialog>
+  </el-card>
+</template>
+
+<script type="text/javascript">
+export default{
+  data() {
+    return {
+      data:[],
+      pagenum: 1,
+      pagesize: 6,
+      searchValue: '',
+      total: 0,
+      file: null,
+      loading: true,
+      ItextId: -1,
+      addimgtextList: false,
+      openEidtImgtext: false,
+      formaddimgtextList:{
+        "Photo": '',
+        "Describe": '',
+        "Index": '',
+        "Name":''
+      }
+    }
+  },
+  created() {
+    this.loadData();
+  },
+  methods: {
+    // 加载数据
+    async loadData() {
+      this.loading = true;
+      const response = await this.$http.get(`imagedescribe?Page=${this.pagenum}&Pagesize=${this.pagesize}`)
+        // console.log(response)
+        if(response.data.Code === 200) {
+          this.loading = false;
+          this.data = response.data.Message.TotalList;
+          this.total = response.data.Message.Total;
+        } else {
+          this.$message.error(msg);
+      }
+    },
+    // 分页功能
+    handleSizeChange(val) {
+      this.pagesize = val;
+      this.loadData();
+      console.log(`每页 ${val} 条`);
+    },
+    handleCurrentChange(val) {
+      this.pagenum = val;
+      this.loadData();
+      console.log(`当前页: ${val}`);
+    },
+    // 上传图片功能
+    handleRemove(file, fileList) {
+      console.log(file, fileList);
+    },
+
+    handlePreview(file) {
+      console.log(file);
+    },
+    handleSuccess (a) {
+      this.file = a.raw;
+    },
+    // 添加图文列表
+    async handleAdd () {
+      // 将数据转换成formData格式
+      const formData = new FormData();
+      formData.append('Photo', this.file);
+      formData.append('Index', this.formaddimgtextList.Index);
+      formData.append('Describe', this.formaddimgtextList.Describe);
+      formData.append('Name', this.formaddimgtextList.Name);
+      // 发送请求
+      const response = await this.$http.post('imagedescribe', formData);
+      // console.log(response)
+      if(response.data.Code === 200){
+        this.$message.success('添加成功');
+        this.loadData();
+        for (var key in this.formaddimgtextList) {
+          this.formaddimgtextList[key] = '';
+        }
+        this.addimgtextList = false;
+      } else {
+        this.$message.error('添加失败');
+      }
+    },
+    // 删除图文列表
+    handleDelete(ImgId) {
+      // 删除提示
+      this.$confirm('是否要删除该分类?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(async () => {
+        // 点击确定按钮
+        const response = await this.$http.delete(`imagedescribe/${ImgId}`);
+        // console.log(response)
+        // 判断是否删除成功
+        if (response.data.Code === 200) {
+          this.loadData();
+          this.$message({
+          type: 'success',
+          message: '删除成功!'
+        });
+        } else {
+          this.$message({
+            type: 'error',
+            message: '删除失败!'
+          });
+        }
+      }).catch(() => {
+        // 点击取消按钮
+        this.$message({
+          type: 'info',
+          message: '已取消删除'
+        });
+      });
+    },
+      // 打开编辑窗口
+    async openEdit(response) {
+      // console.log(response)
+      this.openEidtImgtext = true;
+      this.ItextId = response.Id;
+      this.formaddimgtextList.Photo ='http://172.31.1.10:8080/' + response.Photo;
+      // console.log(this.formaddimgtextList.Photo);
+      this.formaddimgtextList.Describe = response.Describe;
+      this.formaddimgtextList.Index = response.Index;
+      this.formaddimgtextList.Name = response.Name;
+    },
+    // 修改图文列表
+    async handleEdit() {
+      const formData = new FormData();
+      formData.append('Photo', this.file);
+      formData.append('Index', this.formaddimgtextList.Index);
+      formData.append('Describe', this.formaddimgtextList.Describe);
+      formData.append('Name', this.formaddimgtextList.Name);
+      const response = await this.$http.post(`imagedescribe/${this.ItextId}`, formData);
+      if(response.data.Code === 200) {
+        this.openEidtImgtext = false;
+        this.loadData();
+        for (var key in this.formaddimgtextList) {
+          this.formaddimgtextList[key] = '';
+        }
+        this.$message({
+          type:'success',
+          message: '编辑成功'
+        });
+      } else {
+        this.$message({
+          type:'error',
+          message: '编辑失败'
+        })
+      }
+    },
+     // 关闭编辑对话框的时候执行
+    handleEditDialogClose() {
+      // 清空表单数据
+      for (var key in this.formaddimgtextList) {
+        this.formaddimgtextList[key] = '';
+      }
+    },
+  }
+};
+</script>
+
+<style type="text/css">
+.searchInput{
+  width: 300px;
+  margin-top: 10px;
+  margin-bottom: 10px;
+}
+.el-table .cell {
+  white-space: nowrap;
+}
+.common {
+  margin: 10px 0;
+}
+.pic {
+  margin-bottom: 20px;
+}
+.pictext {
+  margin-left: 30px;
+}
+.anniu {
+  margin-bottom: 15px;
+}
+.pic {
+  width: 200px;
+  height: 100px;
+}
+</style>
+
+
+
+

+ 112 - 0
src/views/Module/journal.vue

@@ -0,0 +1,112 @@
+<template>
+  <el-card>
+    <my-breadcrumb level1="模块管理" level2="日志列表"></my-breadcrumb>
+    <el-table
+      class="tabel common"
+      :data="data"
+      stripe
+      border
+      style="width: 100%">
+      <el-table-column
+          label="#"
+          type="index"
+          width="50">
+      </el-table-column>
+      <el-table-column
+        prop="KeeperId"
+        label="操作人员"
+        width="200">
+      </el-table-column>
+      <el-table-column
+        prop="ActionType"
+        label="操作内容"
+        width="200">
+      </el-table-column>
+      <el-table-column
+        prop="Content"
+        label="内容"
+        width="350">
+      </el-table-column>
+      <el-table-column
+        prop="Date"
+        label="时间"
+        width="265">
+      </el-table-column>
+    </el-table>
+    <!-- 分页 -->
+   <el-pagination
+      @size-change="handleSizeChange"
+      @current-change="handleCurrentChange"
+      :current-page="pagenum"
+      :page-sizes="[6, 8, 10]"
+      :page-size="pagesize"
+      layout="total, sizes, prev, pager, next, jumper"
+      :total="total">
+    </el-pagination>
+
+  </el-card>
+</template>
+<script type="text/javascript">
+export default{
+  data() {
+    return {
+      data:[],
+      // 分页数据
+      pagenum: 1,
+      pagesize: 10,
+      // 总共有多少条数据
+      total: 0,
+      loading: true,
+    }
+  },
+  created() {
+    this.loadData();
+  },
+  methods: {
+    // 加载数据
+    async loadData() {
+      this.loading = true;
+      const response = await this.$http.get(`log?Page=${this.pagenum}&Pagesize=${this.pagesize}`)
+      // console.log(response.data.Message.TotalList)
+      // console.log(this.data)
+      if(response.data.Code === 200) {
+        this.loading = false;
+        this.data = response.data.Message.TotalList;
+        this.total = response.data.Message.Total;
+      } else {
+        this.$message.error(msg);
+      }
+    },
+    // 分页方法
+    handleSizeChange(val) {
+      this.pagesize = val;
+      this.loadData();
+      console.log(`每页 ${val} 条`);
+    },
+    handleCurrentChange(val) {
+      this.pagenum = val;
+      this.loadData();
+      console.log(`当前页: ${val}`);
+    },
+
+  }
+};
+</script>
+
+<style type="text/css">
+.searchInput{
+  width: 300px;
+  margin-top: 10px;
+  margin-bottom: 10px;
+}
+.el-table .cell {
+  white-space: nowrap;
+}
+.common {
+  margin: 10px 0;
+}
+.anniu {
+  margin-bottom: 15px;
+}
+</style>
+

+ 357 - 0
src/views/Module/navigation.vue

@@ -0,0 +1,357 @@
+<template>
+  <div>
+    <my-breadcrumb level1='模块管理' level2='导航分类'></my-breadcrumb>
+    <el-button type='success' @click="addNavigation = true" plain class="common">创建一级导航列表</el-button>
+
+    <el-table :data="tableData" style="width: 100%">
+        <el-table-column type="expand">
+            <template slot-scope="props">
+                <el-table :data="props.row.TwoNavigation" style="width: 100%" :show-header="false">
+                    <el-table-column prop="NavigationName" label=""></el-table-column>
+                    <el-table-column prop="Url" label=""></el-table-column>
+                    <el-table-column label="操作">
+                        <template slot-scope="scope">
+                            <el-button size="mini" @click="openEdittwo(scope.row)">编辑</el-button>
+                            <el-button size="mini" type="danger" @click="handleDeleteTwo(scope.row.Id)">删除</el-button>
+                        </template>
+                    </el-table-column>
+                </el-table>
+            </template>
+        </el-table-column>
+        <el-table-column label="导航名称" prop="NavigationName"></el-table-column>
+        <el-table-column label="导航路径" prop="Url"></el-table-column>
+        <el-table-column label="操作">
+            <template slot-scope="scope">
+                <el-button size="mini" type='success' @click="openAddTwo(scope.row)">添加二级导航</el-button>
+                <el-button size="mini" @click="openEdit(scope.row)">编辑</el-button>
+                <el-button size="mini" type="danger" @click="handleDelete(scope.row.Id)">删除</el-button>
+            </template>
+        </el-table-column>
+    </el-table>
+    <!-- 编辑对话框 -->
+    <el-dialog
+    @close="handleEditDialogClose"
+    title="编辑导航分类"
+    :visible.sync="editNavigation">
+      <el-form label-position="right" label-width="80px" :model="formData">
+        <el-form-item label="导航名称">
+          <el-input v-model="formData.NavigationName" auto-complete="off"></el-input>
+        </el-form-item>
+        <el-form-item label="导航路径">
+          <el-input v-model="formData.Url" auto-complete="off"></el-input>
+        </el-form-item>
+        <el-form-item label="导航索引">
+          <el-input v-model.number="formData.Index" auto-complete="off" type="number"></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="editNavigation = false">取 消</el-button>
+        <el-button type="primary" @click="handleEdit">确 定</el-button>
+      </div>
+    </el-dialog>
+    <!-- 添加对话框 -->
+    <el-dialog
+    @close="handleEditDialogClose"
+    title="添加导航分类"
+    :visible.sync="addNavigation">
+      <el-form label-position="right" label-width="80px" :model="formData">
+        <el-form-item label="导航名称">
+          <el-input v-model="formData.NavigationName" auto-complete="off"></el-input>
+        </el-form-item>
+        <el-form-item label="导航路径">
+          <el-input v-model="formData.Url" auto-complete="off"></el-input>
+        </el-form-item>
+        <el-form-item label="导航索引">
+          <el-input v-model.number="formData.Index" auto-complete="off" type="number"></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="addNavigation = false">取 消</el-button>
+        <el-button type="primary" @click="handleAdd">确 定</el-button>
+      </div>
+    </el-dialog>
+    <!-- 添加二级导航对话框 -->
+    <el-dialog
+    @close="handleEditDialogCloseTwo"
+    title="添加二级导航分类"
+    :visible.sync="addNavigationtwo">
+      <el-form label-position="right" label-width="80px" :model="formDataTwo">
+        <el-form-item label="主导航ID">
+          <el-input v-model.number="formDataTwo.PId" auto-complete="off"></el-input>
+        </el-form-item>
+        <el-form-item label="导航名称">
+          <el-input v-model="formDataTwo.NavigationName" auto-complete="off"></el-input>
+        </el-form-item>
+        <el-form-item label="导航路径">
+          <el-input v-model="formDataTwo.Url" auto-complete="off"></el-input>
+        </el-form-item>
+        <el-form-item label="导航索引">
+          <el-input v-model.number="formDataTwo.Index" auto-complete="off" type="number"></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="addNavigationtwo = false">取 消</el-button>
+        <el-button type="primary" @click="handleAddTwo">确 定</el-button>
+      </div>
+    </el-dialog>
+    <!-- 编辑二级导航对话框 -->
+    <el-dialog
+    @close="handleEditDialogCloseTwo"
+    title="编辑导航分类"
+    :visible.sync="editNavigationTwo">
+      <el-form label-position="right" label-width="80px" :model="formDataTwo">
+        <el-form-item label="主导航ID">
+          <el-input v-model.number="formDataTwo.PId" auto-complete="off"></el-input>
+        </el-form-item>
+        <el-form-item label="导航名称">
+          <el-input v-model="formDataTwo.NavigationName" auto-complete="off"></el-input>
+        </el-form-item>
+        <el-form-item label="导航路径">
+          <el-input v-model="formDataTwo.Url" auto-complete="off"></el-input>
+        </el-form-item>
+        <el-form-item label="导航索引">
+          <el-input v-model.number="formDataTwo.Index" auto-complete="off" type="number"></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="editNavigation = false">取 消</el-button>
+        <el-button type="primary" @click="handleEditTwo">确 定</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+<script>
+
+export default {
+  data() {
+    return {
+      tableData: [],
+      loading: false,
+      editNavigation: false,
+      addNavigation: false,
+      addNavigationtwo: false,
+      editNavigationTwo: false,
+      loading: true,
+      navID: -1,
+      navTwoId:-1,
+      formData: {
+        "NavigationName": "",
+        "Url":"",
+        "Index": ""
+      },
+      formDataTwo: {
+        "PId":"",//主导航ID
+        "NavigationName":"",//二级导航名
+        "Url":"",//路径
+        "Index": ""
+      }
+      // 分页数据
+    };
+  },
+  mounted() {
+    this.loadData();
+  },
+  methods: {
+    // 加载导航数据列表
+    async loadData() {
+      this.loading = true;
+      const res = await this.$http.get('navigation');
+      // console.log(res)
+      if (res.data.Code === 200) {
+        this.loading = false;
+        this.tableData = res.data.Message;
+      } else {
+        this.loading = false;
+        this.$message({
+          type: 'error',
+          message: '获取数据失败'
+        });
+      }
+    },
+    // 删除一级导航
+    handleDelete(navId) {
+      // 删除提示
+      this.$confirm('是否要删除该分类?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(async () => {
+        // 点击确定按钮
+        const res = await this.$http.delete(`navigation/${navId}`);
+        // 判断是否删除成功
+        if (res.data.Code === 200) {
+          this.loadData();
+          this.$message({
+          type: 'success',
+          message: '删除一级导航成功!'
+        });
+        } else {
+          this.$message({
+            type: 'error',
+            message: '删除一级导航失败!'
+          });
+        }
+      }).catch(() => {
+        // 点击取消按钮
+        this.$message({
+          type: 'info',
+          message: '已取消删除'
+        });
+      });
+    },
+    // 打开编辑一级导航分类窗口
+    async openEdit(response) {
+      this.editNavigation = true;
+      this.navID = response.Id;
+      this.formData.NavigationName = response.NavigationName;
+      this.formData.Url = response.Url;
+      this.formData.Index = response.Index;
+
+    },
+    // 修改一级导航
+    async handleEdit() {
+      const res = await this.$http.post(`navigation/${this.navID}`, this.formData);
+      if (res.data.Code === 200) {
+        this.editNavigation = false;
+        this.loadData();
+        for (var key in this.formData) {
+          this.formData[key] = '';
+        }
+        this.$message({
+          type: 'success',
+          message: '编辑一级导航成功'
+        });
+      } else {
+        this.$message({
+          type: 'error',
+          message: '编辑一级导航失败'
+        });
+      }
+    },
+    // 添加一级导航
+    async handleAdd() {
+      const res = await this.$http.post('navigation?action=one', this.formData);
+      if (res.data.Code === 200) {
+        this.loadData();
+        for (var key in this.formData) {
+          this.formData[key] = '';
+        }
+        this.addNavigation = false;
+        this.$message({
+          type: 'success',
+          message: '添加一级导航成功'
+        });
+      } else {
+        this.$message({
+          type: 'error',
+          message: '添加一级导航失败'
+        });
+      }
+    },
+     // 关闭编辑对话框的时候执行
+    handleEditDialogClose() {
+      // 清空表单数据
+      for (var key in this.formData) {
+        this.formData[key] = '';
+      }
+    },
+    // 打开添加二级导航对话框
+    async openAddTwo (response) {
+      this.formDataTwo.PId = response.Id;
+      this.addNavigationtwo = true;
+    },
+    // 添加二级导航分类
+    async handleAddTwo() {
+      const res = await this.$http.post('navigation?action=two', this.formDataTwo);
+      if (res.data.Code === 200) {
+        this.loadData();
+        for (var key in this.formDataTwo) {
+          this.formDataTwo[key] = '';
+        }
+        this.addNavigationtwo = false;
+        this.$message({
+          type: 'success',
+          message: '添加二级导航成功'
+        });
+      } else {
+        this.$message({
+          type: 'error',
+          message: '添加二级导航失败'
+        });
+      }
+    },
+    // 打开编辑二级导航分类窗口
+    async openEdittwo(response) {
+      this.editNavigationTwo = true;
+      this.navTwoId = response.Id;
+      this.formDataTwo.PId = response.PId;
+      this.formDataTwo.NavigationName = response.NavigationName;
+      this.formDataTwo.Url = response.Url;
+      this.formDataTwo.Index = response.Index;
+    },
+    // 编辑二级导航
+    async handleEditTwo() {
+      const res = await this.$http.post(`twonavigation/${this.navTwoId}`, this.formDataTwo);
+      if (res.data.Code === 200) {
+        this.editNavigationTwo = false;
+        this.loadData();
+        for (var key in this.formDataTwo) {
+        this.formDataTwo[key] = '';
+        }
+        this.$message({
+          type: 'success',
+          message: '编辑一级导航成功'
+        });
+      } else {
+        this.$message({
+          type: 'error',
+          message: '编辑一级导航失败'
+        });
+      }
+    },
+     // 关闭编辑对话框的时候执行
+    handleEditDialogCloseTwo() {
+      // 清空表单数据
+      for (var key in this.formDataTwo) {
+        this.formDataTwo[key] = '';
+      }
+    },
+    // 删除二级导航
+    handleDeleteTwo(navIdTwo) {
+      // 删除提示
+      this.$confirm('是否要删除该分类?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(async () => {
+        // 点击确定按钮
+        const res = await this.$http.delete(`twonavigation/${navIdTwo}`);
+        // 判断是否删除成功
+        if (res.data.Code === 200) {
+          this.loadData();
+          this.$message({
+          type: 'success',
+          message: '删除二级导航成功!'
+        });
+        } else {
+          this.$message({
+            type: 'error',
+            message: '删除二级导航失败!'
+          });
+        }
+      }).catch(() => {
+        // 点击取消按钮
+        this.$message({
+          type: 'info',
+          message: '已取消删除'
+        });
+      });
+    },
+  }
+};
+</script>
+<style scoped>
+.common {
+  margin: 10px 0;
+}
+</style>

+ 309 - 0
src/views/Module/news.vue

@@ -0,0 +1,309 @@
+<template>
+  <el-card>
+    <my-breadcrumb level1="模块管理" level2="新闻列表"></my-breadcrumb>
+    <el-button type='success' @click="addnews = true" plain class="common">创建新闻列表</el-button>
+    <el-table :data="data" style="width: 100%" stripe border>
+        <el-table-column type="expand">
+            <template slot-scope="props">
+                <el-table :data="props.row.NewLists" style="width: 100%" :show-header="false">
+                    <el-table-column prop="Photo" label="图片路径" width="200"></el-table-column>
+                    <el-table-column prop="Describe" label="新闻描述" width="200"></el-table-column>
+                    <el-table-column prop="NewName" label="新闻标题" width="200"></el-table-column>
+                    <el-table-column prop="Date" label="时间" width="150"></el-table-column>
+                    <el-table-column label="操作">
+                        <template slot-scope="scope">
+                            <el-button size="mini" @click="openEdit(scope.row)">编辑</el-button>
+                            <el-button size="mini" type="danger" @click="handleDelete(scope.row.Id)">删除</el-button>
+                        </template>
+                    </el-table-column>
+                </el-table>
+            </template>
+        </el-table-column>
+        <el-table-column label="#" type="index" width="50"></el-table-column>
+      <el-table-column prop="Photo" label="图片路径" width="200"></el-table-column>
+      <el-table-column prop="Describe" label="新闻描述" width="200"></el-table-column>
+      <el-table-column prop="NewName" label="新闻标题" width="200"></el-table-column>
+      <el-table-column prop="Date" label="时间" width="150"></el-table-column>
+
+      <el-table-column label="操作">
+            <template slot-scope="scope">
+                <el-button size="mini" @click="openEdit(scope.row)">编辑</el-button>
+                <el-button size="mini" type="danger" @click="handleDelete(scope.row.Id)">删除</el-button>
+            </template>
+        </el-table-column>
+    </el-table>
+    <!-- 分页 -->
+  <el-pagination
+      @size-change="handleSizeChange"
+      @current-change="handleCurrentChange"
+      :current-page="pagenum"
+      :page-sizes="[6, 20, 30, 40]"
+      :page-size="pagesize"
+      layout="total, sizes, prev, pager, next, jumper"
+      :total="total">
+  </el-pagination>
+     <!-- 添加对话框 -->
+  <el-dialog
+  @close="handleEditDialogClose"
+  title="创建新闻列表"
+  :visible.sync="addnews">
+    <el-form label-position="right" label-width="80px" :model="formaddnewList">
+        <el-upload
+          class="anniu"
+          ref="upload"
+          action="http://222.35.31.66:28080/newinfo"
+          :on-preview="handlePreview"
+          :on-remove="handleRemove"
+          :on-change="handleSuccess"
+          :auto-upload="false">
+          <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
+        </el-upload>
+        <el-form-item label="描述内容">
+          <el-input v-model="formaddnewList.Describe" auto-complete="off"></el-input>
+        </el-form-item>
+        <el-form-item label="新闻标题">
+          <el-input v-model="formaddnewList.NewName" auto-complete="off"></el-input>
+        </el-form-item>
+        <el-form-item label="新闻类型">
+          <el-input v-model="formaddnewList.Type" auto-complete="off"></el-input>
+        </el-form-item>
+        <el-form-item label="序号">
+          <el-input v-model.number="formaddnewList.Index" auto-complete="off"></el-input>
+        </el-form-item>
+    </el-form>
+    <div slot="footer" class="dialog-footer">
+        <el-button @click="addnews = false">取 消</el-button>
+        <el-button type="primary" @click="handleAdd">确 定</el-button>
+    </div>
+  </el-dialog>
+  <!-- 修改对话框 -->
+  <el-dialog
+      @close="handleEditDialogClose"
+      title="修改新闻列表"
+      :visible.sync="openEidtNews">
+      <el-form
+        :model="formaddnewList"
+        label-width="100px">
+        <el-upload
+          class="anniu"
+          ref="upload"
+          action="http://222.35.31.66:28080/newinfo"
+          :on-preview="handlePreview"
+          :on-remove="handleRemove"
+          :on-change="handleSuccess"
+          :auto-upload="false">
+          <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
+        </el-upload>
+        <img :src="formaddnewList.Photo" class="pic">
+        <el-form-item label="描述内容">
+          <el-input v-model="formaddnewList.Describe" auto-complete="off"></el-input>
+        </el-form-item>
+        <el-form-item label="新闻标题">
+          <el-input v-model="formaddnewList.NewName" auto-complete="off"></el-input>
+        </el-form-item>
+        <el-form-item label="新闻类型">
+          <el-input v-model="formaddnewList.Type" auto-complete="off"></el-input>
+        </el-form-item>
+        <el-form-item label="序号">
+          <el-input v-model.number="formaddnewList.Index" auto-complete="off"></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="openEidtNews = false">取 消</el-button>
+        <el-button type="primary" @click="handleEdit">确 定</el-button>
+      </div>
+    </el-dialog>
+  </el-card>
+</template>
+
+<script type="text/javascript">
+export default{
+  data() {
+    return {
+      data:[],
+      pagenum: 1,
+      pagesize: 6,
+      searchValue: '',
+      total: 0,
+      addnews: false,
+      openEidtNews: false,
+      openQueryNews: false,
+      loading: true,
+      NewsId: -1,
+      formaddnewList:{
+        "Photo": '',
+        "Describe": '',
+        "Index": '',
+        "NewName":'',
+        "Type": ''
+      }
+    }
+  },
+  created() {
+    this.loadData();
+  },
+  methods: {
+    // 加载数据
+    async loadData() {
+      this.loading = true;
+      const response = await this.$http.get(`newinfo`);
+      // console.log(response.data.Message.length)
+      // console.log(response.data.Message)
+      if(response.data.Code === 200) {
+        this.loading = false;
+        this.data = response.data.Message;
+        this.total = response.data.Message.length;
+      } else {
+        this.$message.error(msg);
+      }
+    },
+    // 分页功能
+    handleSizeChange(val) {
+      this.pagesize = val;
+      this.loadData();
+      console.log(`每页 ${val} 条`);
+    },
+    handleCurrentChange(val) {
+      this.pagenum = val;
+      this.loadData();
+      console.log(`当前页: ${val}`);
+    },
+    // 上传图片功能
+    handleRemove(file, fileList) {
+      console.log(file, fileList);
+    },
+
+    handlePreview(file) {
+        console.log(file);
+    },
+    handleSuccess (a) {
+      // this.formaddnewList.Photo = a.raw;
+      this.file = a.raw;
+    },
+    // 添加新闻列表
+    async handleAdd () {
+      const formData = new FormData();
+      formData.append('Photo', this.file);
+      formData.append('Index', this.formaddnewList.Index);
+      formData.append('Describe', this.formaddnewList.Describe);
+      formData.append('NewName', this.formaddnewList.NewName);
+      formData.append('Type', this.formaddnewList.Type);
+      const response = await this.$http.post('newinfo', formData);
+      // console.log(response)
+      if(response.data.Code === 200){
+        this.$message.success('添加成功');
+        this.loadData();
+        for (var key in this.formaddnewList) {
+          this.formaddnewList[key] = '';
+        }
+        this.addnews = false;
+      } else {
+        this.$message.error('添加失败');
+      }
+    },
+    // 删除新闻列表
+    handleDelete(NewId) {
+      // 删除提示
+      this.$confirm('是否要删除该分类?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(async () => {
+        // 点击确定按钮
+        const response = await this.$http.delete(`newinfo/${NewId}`);
+        // console.log(response)
+        // 判断是否删除成功
+        if (response.data.Code === 200) {
+          this.loadData();
+          this.$message({
+          type: 'success',
+          message: '删除成功!'
+        });
+        } else {
+          this.$message({
+            type: 'error',
+            message: '删除失败!'
+          });
+        }
+      }).catch(() => {
+        // 点击取消按钮
+        this.$message({
+          type: 'info',
+          message: '已取消删除'
+        });
+      });
+    },
+      // 打开编辑窗口
+    async openEdit(response) {
+      // console.log(response)
+      this.openEidtNews = true;
+      this.NewsId = response.Id;
+      this.formaddnewList.Photo ='http://172.31.1.10:8080/' + response.Photo;
+      // console.log(this.formaddnewList.Photo);
+      this.formaddnewList.Describe = response.Describe;
+      this.formaddnewList.Index = response.Index;
+      this.formaddnewList.NewName = response.NewName;
+      this.formaddnewList.Type = response.Type;
+    },
+    // 修改新闻列表
+    async handleEdit() {
+      const formData = new FormData();
+      formData.append('Photo', this.file);
+      formData.append('Index', this.formaddnewList.Index);
+      formData.append('Describe', this.formaddnewList.Describe);
+      formData.append('NewName', this.formaddnewList.NewName);
+      formData.append('Type', this.formaddnewList.Type);
+      const response = await this.$http.post(`newinfo/${this.NewsId}`, formData);
+      if(response.data.Code === 200) {
+        this.openEidtNews = false;
+        this.loadData();
+        for (var key in this.formaddnewList) {
+          this.formaddnewList[key] = '';
+        }
+        this.$message({
+          type:'success',
+          message: '编辑成功'
+        });
+      } else {
+        this.$message({
+          type:'error',
+          message: '编辑失败'
+        })
+      }
+    },
+       // 关闭编辑对话框的时候执行
+    handleEditDialogClose() {
+      // 清空表单数据
+      for (var key in this.formaddnewList) {
+        this.formaddnewList[key] = '';
+      }
+    },
+  }
+};
+</script>
+
+<style type="text/css">
+.searchInput{
+  width: 300px;
+  margin-top: 10px;
+  margin-bottom: 10px;
+}
+.el-table .cell {
+  white-space: nowrap;
+}
+.common {
+  margin: 10px 0;
+}
+.anniu {
+  margin-bottom: 15px;
+}
+.pic {
+  width: 200px;
+  height: 100px;
+  margin-bottom: 20px;
+}
+</style>
+
+
+
+

+ 288 - 0
src/views/Module/staylanguage.vue

@@ -0,0 +1,288 @@
+<template>
+  <el-card>
+    <my-breadcrumb level1="模块管理" level2="留言板列表"></my-breadcrumb>
+    <el-table
+      class="common"
+      :data="data"
+      border
+      style="width: 100%">
+      <el-table-column
+          label="#"
+          type="index"
+          width="50">
+      </el-table-column>
+      <el-table-column type="expand" label="回复留言内容" width="150">
+            <template slot-scope="props">
+                <el-table :data="props.row.ResultData" style="width: 100%" :show-header="false">
+                    <el-table-column
+                    prop="Content"
+                    label="留言内容"
+                    width="400">
+                    </el-table-column>
+                    <el-table-column
+                    prop="Date"
+                    label="时间"
+                    width="400">
+                    </el-table-column>
+                    <el-table-column label="操作">
+                        <template slot-scope="scope">
+                            <el-button size="mini" type="danger" @click="handleDeleteMessage(scope.row.Id)">删除</el-button>
+                        </template>
+                    </el-table-column>
+                </el-table>
+            </template>
+        </el-table-column>
+       <el-table-column
+        prop="Content"
+        label="留言内容"
+        width="250">
+      </el-table-column>
+      <el-table-column
+        prop="Date"
+        label="时间"
+        width="200">
+      </el-table-column>
+       <el-table-column
+        prop="Name"
+        label="留言人员"
+        width="200">
+      </el-table-column>
+      <el-table-column label="操作">
+        <template slot-scope="scope">
+            <el-button size="mini" type='success' @click="addStayLanguage = true">添加</el-button>
+            <el-button size="mini" type="primary" @click="openEdit(scope.row)">回复</el-button>
+            <el-button size="mini" type="danger" @click="handleDelete(scope.row.Id)">删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    <!-- 分页 -->
+   <el-pagination
+      @size-change="handleSizeChange"
+      @current-change="handleCurrentChange"
+      :current-page="pagenum"
+      :page-sizes="[6, 8, 10]"
+      :page-size="pagesize"
+      layout="total, sizes, prev, pager, next, jumper"
+      :total="total">
+    </el-pagination>
+     <!-- 添加对话框 -->
+    <el-dialog title="添加留言" :visible.sync="addStayLanguage">
+      <el-form label-position="right" label-width="80px" :model="formData">
+        <el-form-item label="姓名">
+          <el-input v-model="formData.Name" auto-complete="off"></el-input>
+        </el-form-item>
+        <el-form-item label="公司名称">
+          <el-input v-model="formData.CompanyName" auto-complete="off"></el-input>
+        </el-form-item>
+        <el-form-item label="电子邮件">
+          <el-input v-model="formData.Email" auto-complete="off"></el-input>
+        </el-form-item>
+        <el-form-item label="手机号">
+          <el-input v-model="formData.Tel" auto-complete="off"></el-input>
+        </el-form-item>
+        <el-form-item label="QQ号">
+          <el-input v-model="formData.Qq" auto-complete="off"></el-input>
+        </el-form-item>
+        <el-form-item label="留言内容">
+          <el-input v-model="formData.Content" auto-complete="off"></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="addStayLanguage = false">取 消</el-button>
+        <el-button type="primary" @click="handleAdd">确 定</el-button>
+      </div>
+    </el-dialog>
+    <!-- 回复留言对话框 -->
+    <el-dialog title="添加留言" :visible.sync="replyToMessage">
+      <el-form label-position="right" label-width="80px" :model="form">
+        <el-form-item label="留言ID">
+          <el-input v-model.number="form.GuestBookId" auto-complete="off"></el-input>
+        </el-form-item>
+        <el-form-item label="留言内容">
+          <el-input v-model="form.Content" auto-complete="off"></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="replyToMessage = false">取 消</el-button>
+        <el-button type="primary" @click="handleAddMessage">确 定</el-button>
+      </div>
+    </el-dialog>
+  </el-card>
+</template>
+<script type="text/javascript">
+export default{
+  data() {
+    return {
+      data:[],
+      // 分页数据
+      pagenum: 1,
+      pagesize: 10,
+      // 总共有多少条数据
+      total: 0,
+      LId:-1,
+      addStayLanguage: false,
+      replyToMessage: false,
+      loading: true,
+      formData: {
+        "Name":"", //姓名
+        "CompanyName": "", //公司名
+        "Email": "", //电子邮件
+        "Tel": "", //手机号
+        "Qq": "", //QQ号
+        "Content": ""
+      },
+      form: {
+        "GuestBookId": "",
+        "Content": ""
+      }
+    }
+  },
+  created() {
+    this.loadData();
+  },
+  methods: {
+      // 加载数据
+      async loadData() {
+        this.loading = true;
+        // 传的参数是用来分页的
+        const response = await this.$http.get(`guestbook?Page=${this.pagenum}&Pagesize=${this.pagesize}`)
+        if(response.data.Code === 200) {
+          this.loading = false;
+          this.data = response.data.Message.TotalList;
+          this.total = response.data.Message.Total;
+        } else {
+          this.$message.error(msg);
+      }
+    },
+    // 打开回复留言板
+     async openEdit(response) {
+      this.replyToMessage = true;
+      this.form.GuestBookId = response.Id;
+    },
+    // 添加留言
+    async handleAdd() {
+      const response = await this.$http.post('guestbook', this.formData);
+      if (response.data.Code === 200) {
+        this.loadData();
+        this.addStayLanguage = false;
+        this.$message({
+          type: 'success',
+          message: '留言成功'
+        });
+      } else {
+        this.$message({
+          type: 'error',
+          message: '留言失败'
+        });
+      }
+    },
+    // 删除留言
+    handleDelete(StayId) {
+      // 删除提示
+      this.$confirm('是否要删除该留言?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(async () => {
+        // 点击确定按钮
+        const response = await this.$http.delete(`guestbook/${StayId}`);
+        // 判断是否删除成功
+        if (response.data.Code === 200) {
+          this.loadData();
+          this.$message({
+          type: 'success',
+          message: '删除留言成功!'
+        });
+        } else {
+          this.$message({
+            type: 'error',
+            message: '删除留言失败!'
+          });
+        }
+      }).catch(() => {
+        // 点击取消按钮
+        this.$message({
+          type: 'info',
+          message: '已取消删除'
+        });
+      });
+    },
+    // 回复留言板内容
+    async handleAddMessage () {
+      const response = await this.$http.post('guestbookresult', this.form);
+      if(response.data.Code === 200) {
+        this.loadData();
+        this.replyToMessage = false;
+        this.$message({
+          type: 'success',
+          message: '回复留言成功!'
+        });
+      } else {
+        this.$message({
+          type: 'error',
+          message: '回复留言失败!'
+        });
+      }
+    },
+    // 删除留言板内容
+     handleDeleteMessage(MId) {
+      // 删除提示
+      this.$confirm('是否要删除该留言?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(async () => {
+        // 点击确定按钮
+        const response = await this.$http.delete(`guestbookresult/${MId}`);
+        // 判断是否删除成功
+        if (response.data.Code === 200) {
+          this.loadData();
+          this.$message({
+          type: 'success',
+          message: '删除回复留言成功!'
+        });
+        } else {
+          this.$message({
+            type: 'error',
+            message: '删除回复留言失败!'
+          });
+        }
+      }).catch(() => {
+        // 点击取消按钮
+        this.$message({
+          type: 'info',
+          message: '已取消删除'
+        });
+      });
+    },
+    // 分页方法
+    handleSizeChange(val) {
+      this.pagesize = val;
+      this.loadData();
+      console.log(`每页 ${val} 条`);
+    },
+    handleCurrentChange(val) {
+      this.pagenum = val;
+      this.loadData();
+      console.log(`当前页: ${val}`);
+    },
+  }
+};
+</script>
+<style type="text/css">
+.searchInput{
+  width: 300px;
+  margin-top: 10px;
+  margin-bottom: 10px;
+}
+.el-table .cell {
+  white-space: nowrap;
+}
+.common {
+  margin: 15px 0;
+}
+.anniu {
+  margin-bottom: 15px;
+}
+</style>
+

+ 132 - 0
src/views/Password/password.vue

@@ -0,0 +1,132 @@
+<template>
+  <el-card>
+    <my-breadcrumb level1="密码修改" level2="密码列表"></my-breadcrumb>
+    <el-form :model="ruleForm2" status-icon :rules="rules2" ref="ruleForm2" label-width="100px" class="common">
+  <el-form-item label="密码" prop="pass">
+    <el-input type="password" v-model="ruleForm2.pass" autocomplete="off"></el-input>
+  </el-form-item>
+  <el-form-item label="确认密码" prop="checkPass">
+    <el-input type="password" v-model="ruleForm2.checkPass" autocomplete="off"></el-input>
+  </el-form-item>
+  <el-form-item>
+    <el-button type="primary" @click="submitForm('ruleForm2')">提交</el-button>
+    <el-button @click="resetForm('ruleForm2')">重置</el-button>
+  </el-form-item>
+</el-form>
+
+  </el-card>
+</template>
+
+<script type="text/javascript">
+export default{
+   data() {
+    var checkAge = (rule, value, callback) => {
+      if (!value) {
+        return callback(new Error('年龄不能为空'));
+      }
+      setTimeout(() => {
+        if (!Number.isInteger(value)) {
+          callback(new Error('请输入数字值'));
+        } else {
+          if (value < 18) {
+            callback(new Error('必须年满18岁'));
+          } else {
+            callback();
+          }
+        }
+      }, 1000);
+    };
+    var validatePass = (rule, value, callback) => {
+      if (value === '') {
+        callback(new Error('请输入密码'));
+      } else {
+        if (this.ruleForm2.checkPass !== '') {
+          this.$refs.ruleForm2.validateField('checkPass');
+        }
+        callback();
+      }
+    };
+    var validatePass2 = (rule, value, callback) => {
+      if (value === '') {
+        callback(new Error('请再次输入密码'));
+      } else if (value !== this.ruleForm2.pass) {
+        callback(new Error('两次输入密码不一致!'));
+      } else {
+        callback();
+      }
+    };
+    return {
+      ruleForm2: {
+        pass: '',
+        checkPass: '',
+        age: ''
+      },
+      rules2: {
+        pass: [
+          { validator: validatePass, trigger: 'blur' }
+        ],
+        checkPass: [
+          { validator: validatePass2, trigger: 'blur' }
+        ],
+        age: [
+          { validator: checkAge, trigger: 'blur' }
+        ]
+      }
+    };
+  },
+  created() {
+    // this.loadData();
+  },
+  methods: {
+    // async loadData () {
+    //   const response = await this.$http.post(`keeper?action=login`, this.fromData);
+    //   const { status, data:{ Message}} = response;
+    //   // console.log(response)
+    //   if (response.data.Code === 200) {
+    //     this.$message.success('登录成功');
+    //     // 将tocken取到
+    //     const token = document.cookie;
+    //     // console.log(token)
+    //     // 将tocken保存到sessionStorage中
+    //     sessionStorage.setItem('token', token);
+    //     this.$router.push('/');
+    //   } else {
+    //     this.$message.error('登录失败');
+    //   }
+    // },
+    submitForm(formName) {
+        this.$refs[formName].validate((valid) => {
+          if (valid) {
+            alert('submit!');
+          } else {
+            console.log('error submit!!');
+            return false;
+          }
+        });
+      },
+      resetForm(formName) {
+        this.$refs[formName].resetFields();
+      }
+  }
+};
+</script>
+
+<style type="text/css">
+.searchInput{
+  width: 300px;
+  margin-top: 10px;
+  margin-bottom: 10px;
+}
+.el-table .cell {
+  white-space: nowrap;
+}
+
+.common {
+  margin: 20px 0;
+}
+
+</style>
+
+
+
+

+ 145 - 0
src/views/Users/users.vue

@@ -0,0 +1,145 @@
+<template>
+  <el-card>
+    <my-breadcrumb level1="用户管理" level2="用户列表"></my-breadcrumb>
+    <el-button type='success' @click="addimgtextList = true" plain class="common">创建新闻列表</el-button>
+    <el-table
+      class="tabel"
+      :data="data"
+      stripe
+      border
+      style="width: 100%">
+      <el-table-column
+          label="#"
+          type="index"
+          width="50">
+      </el-table-column>
+      <el-table-column
+        prop="Photo"
+        label="图片路径"
+        width="200">
+      </el-table-column>
+      <el-table-column
+        prop="Describe"
+        label="新闻描述"
+        width="200">
+      </el-table-column>
+      <el-table-column
+        prop="NewName"
+        label="新闻标题"
+        width="200">
+      </el-table-column>
+      <el-table-column
+        prop="Date"
+        label="时间"
+        width="200">
+      </el-table-column>
+      <el-table-column
+        label="操作">
+        <template slot-scope="scope">
+          <!-- <el-button type="primary" icon="el-icon-edit" size="mini" plain @click="openEidtUerDialogFormVisible(scope.row)">
+          </el-button>
+          <el-button type="danger" icon="el-icon-delete" size="mini" plain @click="handleDelete(scope.row.id)">
+          </el-button>
+          <el-button type="success" icon="el-icon-check" size="mini" plain @click="banneraddform(scope.row)">
+          </el-button> -->
+        </template>
+      </el-table-column>
+    </el-table>
+    <!-- 分页 -->
+  <el-pagination
+      @size-change="handleSizeChange"
+      @current-change="handleCurrentChange"
+      :current-page="pagenum"
+      :page-sizes="[6, 20, 30, 40]"
+      :page-size="pagesize"
+      layout="total, sizes, prev, pager, next, jumper"
+      :total="total">
+  </el-pagination>
+     <!-- 添加对话框 -->
+  <el-dialog title="创建新闻列表" :visible.sync="addimgtextList">
+      <el-form label-position="right" label-width="80px" :model="formaddimgtextList">
+        <el-form-item label="图片路径">
+          <el-input v-model="formaddimgtextList.Photo" auto-complete="off"></el-input>
+        </el-form-item>
+        <el-form-item label="描述内容">
+          <el-input v-model="formaddimgtextList.Describe" auto-complete="off"></el-input>
+        </el-form-item>
+        <el-form-item label="标题">
+          <el-input v-model="formaddimgtextList.Index" auto-complete="off"></el-input>
+        </el-form-item>
+        <el-form-item label="序号">
+          <el-input v-model="formaddimgtextList.Index" auto-complete="off"></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="addimgtextList = false">取 消</el-button>
+        <el-button type="primary" @click="handleAdd">确 定</el-button>
+      </div>
+  </el-dialog>
+  </el-card>
+</template>
+
+<script type="text/javascript">
+export default{
+  data() {
+    return {
+      data:[],
+      pagenum: 1,
+      pagesize: 6,
+      searchValue: '',
+      total: 0,
+      addimgtextList: false,
+      formaddimgtextList:{
+        Photo: '',
+        Describe: '',
+        Index: '',
+        Name:''
+      }
+    }
+  },
+  created() {
+    this.loadData();
+  },
+  methods: {
+    async loadData() {
+      const response = await this.$http.get(`newinfo`);
+      // console.log(response.data.Message)
+      if(response.data.Code === 200) {
+        this.data = response.data.Message;
+        this.total = response.data.Message.length;
+      } else {
+        this.$message.error(msg);
+      }
+    },
+    handleSizeChange(val) {
+      this.pagesize = val;
+      this.loadData();
+      console.log(`每页 ${val} 条`);
+    },
+    handleCurrentChange(val) {
+      this.pagenum = val;
+      this.loadData();
+      console.log(`当前页: ${val}`);
+    },
+  }
+};
+</script>
+
+<style type="text/css">
+.searchInput{
+  width: 300px;
+  margin-top: 10px;
+  margin-bottom: 10px;
+}
+.el-table .cell {
+  white-space: nowrap;
+}
+
+.common {
+  margin: 10px 0;
+}
+</style>
+
+
+
+

+ 0 - 0
static/.gitkeep