├── .babelrc
├── .editorconfig
├── .gitignore
├── .postcssrc.js
├── README.md
├── build
├── build.js
├── check-versions.js
├── logo.png
├── utils.js
├── vue-loader.conf.js
├── webpack.base.conf.js
├── webpack.dev.conf.js
└── webpack.prod.conf.js
├── config
├── dev.env.js
├── index.js
└── prod.env.js
├── dist
└── index.html
├── doc
└── 项目环境搭建步骤.doc
├── index.html
├── package.json
├── src
├── api
│ ├── api_enterprise.js
│ ├── api_user.js
│ ├── env.js
│ └── index.js
├── app.vue
├── assets
│ ├── css
│ │ └── style.css
│ ├── fonts
│ │ ├── iconfont.eot
│ │ ├── iconfont.svg
│ │ ├── iconfont.ttf
│ │ └── iconfont.woff
│ ├── iconfont.css
│ ├── images
│ │ ├── card.jpg
│ │ ├── downloadcode.png
│ │ ├── not_found.png
│ │ └── totalnumber.jpg
│ └── logo.png
├── common
│ └── util.js
├── components
│ ├── 404.vue
│ └── nav
│ │ ├── leftNav.vue
│ │ └── topNav.vue
├── main.js
├── road.js
├── router
│ └── index.js
├── store.js
└── views
│ ├── customer
│ └── index.vue
│ ├── dept
│ └── index.vue
│ ├── enterprise
│ ├── add.vue
│ ├── detail.vue
│ ├── index.vue
│ ├── update.vue
│ └── validate.vue
│ ├── home.vue
│ ├── login.vue
│ ├── partner
│ └── index.vue
│ ├── vehicle
│ └── index.vue
│ └── workbench
│ ├── dashboard.vue
│ ├── maillist.vue
│ ├── mission
│ ├── add.vue
│ ├── detail.vue
│ └── mission.vue
│ ├── mySettings.vue
│ └── plan
│ ├── detail.vue
│ └── plan.vue
└── static
├── .gitkeep
└── che.ico
/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | ["env", {
4 | "modules": false,
5 | "targets": {
6 | "browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
7 | }
8 | }],
9 | "stage-2"
10 | ],
11 | "plugins": ["transform-vue-jsx", "transform-runtime"]
12 | }
13 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | charset = utf-8
5 | indent_style = space
6 | indent_size = 2
7 | end_of_line = lf
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules/
3 | /dist/
4 | npm-debug.log*
5 | yarn-debug.log*
6 | yarn-error.log*
7 |
8 | # Editor directories and files
9 | .idea
10 | .vscode
11 | *.suo
12 | *.ntvs*
13 | *.njsproj
14 | *.sln
15 | package-lock.json
16 |
--------------------------------------------------------------------------------
/.postcssrc.js:
--------------------------------------------------------------------------------
1 | // https://github.com/michael-ciniawsky/postcss-load-config
2 |
3 | module.exports = {
4 | "plugins": {
5 | "postcss-import": {},
6 | "postcss-url": {},
7 | // to edit target browsers: use "browserslist" field in package.json
8 | "autoprefixer": {}
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # vvproject
2 |
3 | > A Vue.js project
4 |
5 | ## Build Setup
6 |
7 | ``` bash
8 | # install dependencies
9 | npm install
10 |
11 | # serve with hot reload at localhost:8080
12 | npm run dev
13 |
14 | # build for production with minification
15 | npm run build
16 |
17 | # build for production and view the bundle analyzer report
18 | npm run build --report
19 | ```
20 |
21 | 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).
22 | # vvproject
23 |
--------------------------------------------------------------------------------
/build/build.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | require('./check-versions')()
3 |
4 | process.env.NODE_ENV = 'production'
5 |
6 | const ora = require('ora')
7 | const rm = require('rimraf')
8 | const path = require('path')
9 | const chalk = require('chalk')
10 | const webpack = require('webpack')
11 | const config = require('../config')
12 | const webpackConfig = require('./webpack.prod.conf')
13 |
14 | const spinner = ora('building for production...')
15 | spinner.start()
16 |
17 | rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => {
18 | if (err) throw err
19 | webpack(webpackConfig, (err, stats) => {
20 | spinner.stop()
21 | if (err) throw err
22 | process.stdout.write(stats.toString({
23 | colors: true,
24 | modules: false,
25 | children: false, // If you are using ts-loader, setting this to true will make TypeScript errors show up during build.
26 | chunks: false,
27 | chunkModules: false
28 | }) + '\n\n')
29 |
30 | if (stats.hasErrors()) {
31 | console.log(chalk.red(' Build failed with errors.\n'))
32 | process.exit(1)
33 | }
34 |
35 | console.log(chalk.cyan(' Build complete.\n'))
36 | console.log(chalk.yellow(
37 | ' Tip: built files are meant to be served over an HTTP server.\n' +
38 | ' Opening index.html over file:// won\'t work.\n'
39 | ))
40 | })
41 | })
42 |
43 |
--------------------------------------------------------------------------------
/build/check-versions.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | const chalk = require('chalk')
3 | const semver = require('semver')
4 | const packageConfig = require('../package.json')
5 | const shell = require('shelljs')
6 |
7 | function exec (cmd) {
8 | return require('child_process').execSync(cmd).toString().trim()
9 | }
10 |
11 | const versionRequirements = [
12 | {
13 | name: 'node',
14 | currentVersion: semver.clean(process.version),
15 | versionRequirement: packageConfig.engines.node
16 | }
17 | ]
18 |
19 | if (shell.which('npm')) {
20 | versionRequirements.push({
21 | name: 'npm',
22 | currentVersion: exec('npm --version'),
23 | versionRequirement: packageConfig.engines.npm
24 | })
25 | }
26 |
27 | module.exports = function () {
28 | const warnings = []
29 |
30 | for (let i = 0; i < versionRequirements.length; i++) {
31 | const mod = versionRequirements[i]
32 |
33 | if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) {
34 | warnings.push(mod.name + ': ' +
35 | chalk.red(mod.currentVersion) + ' should be ' +
36 | chalk.green(mod.versionRequirement)
37 | )
38 | }
39 | }
40 |
41 | if (warnings.length) {
42 | console.log('')
43 | console.log(chalk.yellow('To use this template, you must update following to modules:'))
44 | console.log()
45 |
46 | for (let i = 0; i < warnings.length; i++) {
47 | const warning = warnings[i]
48 | console.log(' ' + warning)
49 | }
50 |
51 | console.log()
52 | process.exit(1)
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/build/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yqrong/vvproject/d093c58f01d225db9ca834f484ab19095a757021/build/logo.png
--------------------------------------------------------------------------------
/build/utils.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | const path = require('path')
3 | const config = require('../config')
4 | const ExtractTextPlugin = require('extract-text-webpack-plugin')
5 | const packageConfig = require('../package.json')
6 |
7 | exports.assetsPath = function (_path) {
8 | const assetsSubDirectory = process.env.NODE_ENV === 'production'
9 | ? config.build.assetsSubDirectory
10 | : config.dev.assetsSubDirectory
11 |
12 | return path.posix.join(assetsSubDirectory, _path)
13 | }
14 |
15 | exports.cssLoaders = function (options) {
16 | options = options || {}
17 |
18 | const cssLoader = {
19 | loader: 'css-loader',
20 | options: {
21 | sourceMap: options.sourceMap
22 | }
23 | }
24 |
25 | const postcssLoader = {
26 | loader: 'postcss-loader',
27 | options: {
28 | sourceMap: options.sourceMap
29 | }
30 | }
31 |
32 | // generate loader string to be used with extract text plugin
33 | function generateLoaders (loader, loaderOptions) {
34 | const loaders = options.usePostCSS ? [cssLoader, postcssLoader] : [cssLoader]
35 |
36 | if (loader) {
37 | loaders.push({
38 | loader: loader + '-loader',
39 | options: Object.assign({}, loaderOptions, {
40 | sourceMap: options.sourceMap
41 | })
42 | })
43 | }
44 |
45 | // Extract CSS when that option is specified
46 | // (which is the case during production build)
47 | if (options.extract) {
48 | return ExtractTextPlugin.extract({
49 | use: loaders,
50 | fallback: 'vue-style-loader',
51 | publicPath: '../../'
52 | })
53 | } else {
54 | return ['vue-style-loader'].concat(loaders)
55 | }
56 | }
57 |
58 | // https://vue-loader.vuejs.org/en/configurations/extract-css.html
59 | return {
60 | css: generateLoaders(),
61 | postcss: generateLoaders(),
62 | less: generateLoaders('less'),
63 | sass: generateLoaders('sass', { indentedSyntax: true }),
64 | scss: generateLoaders('sass'),
65 | stylus: generateLoaders('stylus'),
66 | styl: generateLoaders('stylus')
67 | }
68 | }
69 |
70 | // Generate loaders for standalone style files (outside of .vue)
71 | exports.styleLoaders = function (options) {
72 | const output = []
73 | const loaders = exports.cssLoaders(options)
74 |
75 | for (const extension in loaders) {
76 | const loader = loaders[extension]
77 | output.push({
78 | test: new RegExp('\\.' + extension + '$'),
79 | use: loader
80 | })
81 | }
82 |
83 | return output
84 | }
85 |
86 | exports.createNotifierCallback = () => {
87 | const notifier = require('node-notifier')
88 |
89 | return (severity, errors) => {
90 | if (severity !== 'error') return
91 |
92 | const error = errors[0]
93 | const filename = error.file && error.file.split('!').pop()
94 |
95 | notifier.notify({
96 | title: packageConfig.name,
97 | message: severity + ': ' + error.name,
98 | subtitle: filename || '',
99 | icon: path.join(__dirname, 'logo.png')
100 | })
101 | }
102 | }
103 |
--------------------------------------------------------------------------------
/build/vue-loader.conf.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | const utils = require('./utils')
3 | const config = require('../config')
4 | const isProduction = process.env.NODE_ENV === 'production'
5 | const sourceMapEnabled = isProduction
6 | ? config.build.productionSourceMap
7 | : config.dev.cssSourceMap
8 |
9 | module.exports = {
10 | loaders: utils.cssLoaders({
11 | sourceMap: sourceMapEnabled,
12 | extract: isProduction
13 | }),
14 | cssSourceMap: sourceMapEnabled,
15 | cacheBusting: config.dev.cacheBusting,
16 | transformToRequire: {
17 | video: ['src', 'poster'],
18 | source: 'src',
19 | img: 'src',
20 | image: 'xlink:href'
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/build/webpack.base.conf.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | const path = require('path')
3 | const utils = require('./utils')
4 | const config = require('../config')
5 | const vueLoaderConfig = require('./vue-loader.conf')
6 |
7 | function resolve (dir) {
8 | return path.join(__dirname, '..', dir)
9 | }
10 |
11 |
12 |
13 | module.exports = {
14 | context: path.resolve(__dirname, '../'),
15 | entry: {
16 | app: ['babel-polyfill', './src/main.js']
17 | },
18 | output: {
19 | path: config.build.assetsRoot,
20 | filename: '[name].js',
21 | publicPath: process.env.NODE_ENV === 'production'
22 | ? config.build.assetsPublicPath
23 | : config.dev.assetsPublicPath
24 | },
25 | resolve: {
26 | extensions: ['.js', '.vue', '.json'],
27 | alias: {
28 | 'vue$': 'vue/dist/vue.esm.js',
29 | '@': resolve('src'),
30 | }
31 | },
32 | module: {
33 | rules: [
34 | {
35 | test: /\.vue$/,
36 | loader: 'vue-loader',
37 | options: vueLoaderConfig
38 | },
39 | {
40 | test: /\.js$/,
41 | loader: 'babel-loader',
42 | include: [resolve('src'), resolve('test'), resolve('node_modules/webpack-dev-server/client')]
43 | },
44 | {
45 | test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
46 | loader: 'url-loader',
47 | options: {
48 | limit: 10000,
49 | name: utils.assetsPath('img/[name].[hash:7].[ext]')
50 | }
51 | },
52 | {
53 | test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/,
54 | loader: 'url-loader',
55 | options: {
56 | limit: 10000,
57 | name: utils.assetsPath('media/[name].[hash:7].[ext]')
58 | }
59 | },
60 | {
61 | test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
62 | loader: 'url-loader',
63 | options: {
64 | limit: 10000,
65 | name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
66 | }
67 | }
68 | ]
69 | },
70 | node: {
71 | // prevent webpack from injecting useless setImmediate polyfill because Vue
72 | // source contains it (although only uses it if it's native).
73 | setImmediate: false,
74 | // prevent webpack from injecting mocks to Node native modules
75 | // that does not make sense for the client
76 | dgram: 'empty',
77 | fs: 'empty',
78 | net: 'empty',
79 | tls: 'empty',
80 | child_process: 'empty'
81 | }
82 | }
83 |
--------------------------------------------------------------------------------
/build/webpack.dev.conf.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | const utils = require('./utils')
3 | const webpack = require('webpack')
4 | const config = require('../config')
5 | const merge = require('webpack-merge')
6 | const path = require('path')
7 | const baseWebpackConfig = require('./webpack.base.conf')
8 | const CopyWebpackPlugin = require('copy-webpack-plugin')
9 | const HtmlWebpackPlugin = require('html-webpack-plugin')
10 | const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin')
11 | const portfinder = require('portfinder')
12 |
13 | const HOST = process.env.HOST
14 | const PORT = process.env.PORT && Number(process.env.PORT)
15 |
16 | const devWebpackConfig = merge(baseWebpackConfig, {
17 | module: {
18 | rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap, usePostCSS: true })
19 | },
20 | // cheap-module-eval-source-map is faster for development
21 | devtool: config.dev.devtool,
22 |
23 | // these devServer options should be customized in /config/index.js
24 | devServer: {
25 | clientLogLevel: 'warning',
26 | historyApiFallback: {
27 | rewrites: [
28 | { from: /.*/, to: path.posix.join(config.dev.assetsPublicPath, 'index.html') },
29 | ],
30 | },
31 | hot: true,
32 | contentBase: false, // since we use CopyWebpackPlugin.
33 | compress: true,
34 | host: HOST || config.dev.host,
35 | port: PORT || config.dev.port,
36 | open: config.dev.autoOpenBrowser,
37 | overlay: config.dev.errorOverlay
38 | ? { warnings: false, errors: true }
39 | : false,
40 | publicPath: config.dev.assetsPublicPath,
41 | proxy: config.dev.proxyTable,
42 | quiet: true, // necessary for FriendlyErrorsPlugin
43 | watchOptions: {
44 | poll: config.dev.poll,
45 | }
46 | },
47 | plugins: [
48 | new webpack.DefinePlugin({
49 | 'process.env': require('../config/dev.env')
50 | }),
51 | new webpack.HotModuleReplacementPlugin(),
52 | new webpack.NamedModulesPlugin(), // HMR shows correct file names in console on update.
53 | new webpack.NoEmitOnErrorsPlugin(),
54 | // https://github.com/ampedandwired/html-webpack-plugin
55 | new HtmlWebpackPlugin({
56 | filename: 'index.html',
57 | template: 'index.html',
58 | inject: true
59 | }),
60 | // copy custom static assets
61 | new CopyWebpackPlugin([
62 | {
63 | from: path.resolve(__dirname, '../static'),
64 | to: config.dev.assetsSubDirectory,
65 | ignore: ['.*']
66 | }
67 | ])
68 | ]
69 | })
70 |
71 | module.exports = new Promise((resolve, reject) => {
72 | portfinder.basePort = process.env.PORT || config.dev.port
73 | portfinder.getPort((err, port) => {
74 | if (err) {
75 | reject(err)
76 | } else {
77 | // publish the new Port, necessary for e2e tests
78 | process.env.PORT = port
79 | // add port to devServer config
80 | devWebpackConfig.devServer.port = port
81 |
82 | // Add FriendlyErrorsPlugin
83 | devWebpackConfig.plugins.push(new FriendlyErrorsPlugin({
84 | compilationSuccessInfo: {
85 | messages: [`Your application is running here: http://${devWebpackConfig.devServer.host}:${port}`],
86 | },
87 | onErrors: config.dev.notifyOnErrors
88 | ? utils.createNotifierCallback()
89 | : undefined
90 | }))
91 |
92 | resolve(devWebpackConfig)
93 | }
94 | })
95 | })
96 |
--------------------------------------------------------------------------------
/build/webpack.prod.conf.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | const path = require('path')
3 | const utils = require('./utils')
4 | const webpack = require('webpack')
5 | const config = require('../config')
6 | const merge = require('webpack-merge')
7 | const baseWebpackConfig = require('./webpack.base.conf')
8 | const CopyWebpackPlugin = require('copy-webpack-plugin')
9 | const HtmlWebpackPlugin = require('html-webpack-plugin')
10 | const ExtractTextPlugin = require('extract-text-webpack-plugin')
11 | const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin')
12 | const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
13 |
14 | const env = require('../config/prod.env')
15 |
16 | const webpackConfig = merge(baseWebpackConfig, {
17 | module: {
18 | rules: utils.styleLoaders({
19 | sourceMap: config.build.productionSourceMap,
20 | extract: true,
21 | usePostCSS: true
22 | })
23 | },
24 | devtool: config.build.productionSourceMap ? config.build.devtool : false,
25 | output: {
26 | path: config.build.assetsRoot,
27 | filename: utils.assetsPath('js/[name].[chunkhash].js'),
28 | chunkFilename: utils.assetsPath('js/[id].[chunkhash].js')
29 | },
30 | plugins: [
31 | // http://vuejs.github.io/vue-loader/en/workflow/production.html
32 | new webpack.DefinePlugin({
33 | 'process.env': env
34 | }),
35 | new UglifyJsPlugin({
36 | uglifyOptions: {
37 | compress: {
38 | warnings: false
39 | }
40 | },
41 | sourceMap: config.build.productionSourceMap,
42 | parallel: true
43 | }),
44 | // extract css into its own file
45 | new ExtractTextPlugin({
46 | filename: utils.assetsPath('css/[name].[contenthash].css'),
47 | // Setting the following option to `false` will not extract CSS from codesplit chunks.
48 | // Their CSS will instead be inserted dynamically with style-loader when the codesplit chunk has been loaded by webpack.
49 | // It's currently set to `true` because we are seeing that sourcemaps are included in the codesplit bundle as well when it's `false`,
50 | // increasing file size: https://github.com/vuejs-templates/webpack/issues/1110
51 | allChunks: true,
52 | }),
53 | // Compress extracted CSS. We are using this plugin so that possible
54 | // duplicated CSS from different components can be deduped.
55 | new OptimizeCSSPlugin({
56 | cssProcessorOptions: config.build.productionSourceMap
57 | ? { safe: true, map: { inline: false } }
58 | : { safe: true }
59 | }),
60 | // generate dist index.html with correct asset hash for caching.
61 | // you can customize output by editing /index.html
62 | // see https://github.com/ampedandwired/html-webpack-plugin
63 | new HtmlWebpackPlugin({
64 | filename: config.build.index,
65 | template: 'index.html',
66 | inject: true,
67 | minify: {
68 | removeComments: true,
69 | collapseWhitespace: true,
70 | removeAttributeQuotes: true
71 | // more options:
72 | // https://github.com/kangax/html-minifier#options-quick-reference
73 | },
74 | // necessary to consistently work with multiple chunks via CommonsChunkPlugin
75 | chunksSortMode: 'dependency'
76 | }),
77 | // keep module.id stable when vendor modules does not change
78 | new webpack.HashedModuleIdsPlugin(),
79 | // enable scope hoisting
80 | new webpack.optimize.ModuleConcatenationPlugin(),
81 | // split vendor js into its own file
82 | new webpack.optimize.CommonsChunkPlugin({
83 | name: 'vendor',
84 | minChunks (module) {
85 | // any required modules inside node_modules are extracted to vendor
86 | return (
87 | module.resource &&
88 | /\.js$/.test(module.resource) &&
89 | module.resource.indexOf(
90 | path.join(__dirname, '../node_modules')
91 | ) === 0
92 | )
93 | }
94 | }),
95 | // extract webpack runtime and module manifest to its own file in order to
96 | // prevent vendor hash from being updated whenever app bundle is updated
97 | new webpack.optimize.CommonsChunkPlugin({
98 | name: 'manifest',
99 | minChunks: Infinity
100 | }),
101 | // This instance extracts shared chunks from code splitted chunks and bundles them
102 | // in a separate chunk, similar to the vendor chunk
103 | // see: https://webpack.js.org/plugins/commons-chunk-plugin/#extra-async-commons-chunk
104 | new webpack.optimize.CommonsChunkPlugin({
105 | name: 'app',
106 | async: 'vendor-async',
107 | children: true,
108 | minChunks: 3
109 | }),
110 |
111 | // copy custom static assets
112 | new CopyWebpackPlugin([
113 | {
114 | from: path.resolve(__dirname, '../static'),
115 | to: config.build.assetsSubDirectory,
116 | ignore: ['.*']
117 | }
118 | ])
119 | ]
120 | })
121 |
122 | if (config.build.productionGzip) {
123 | const CompressionWebpackPlugin = require('compression-webpack-plugin')
124 |
125 | webpackConfig.plugins.push(
126 | new CompressionWebpackPlugin({
127 | asset: '[path].gz[query]',
128 | algorithm: 'gzip',
129 | test: new RegExp(
130 | '\\.(' +
131 | config.build.productionGzipExtensions.join('|') +
132 | ')$'
133 | ),
134 | threshold: 10240,
135 | minRatio: 0.8
136 | })
137 | )
138 | }
139 |
140 | if (config.build.bundleAnalyzerReport) {
141 | const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
142 | webpackConfig.plugins.push(new BundleAnalyzerPlugin())
143 | }
144 |
145 | module.exports = webpackConfig
146 |
--------------------------------------------------------------------------------
/config/dev.env.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | const merge = require('webpack-merge')
3 | const prodEnv = require('./prod.env')
4 |
5 | module.exports = merge(prodEnv, {
6 | NODE_ENV: '"development"'
7 | })
8 |
--------------------------------------------------------------------------------
/config/index.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | // Template version: 1.3.1
3 | // see http://vuejs-templates.github.io/webpack for documentation.
4 |
5 | const path = require('path')
6 |
7 | module.exports = {
8 | dev: {
9 |
10 | // Paths
11 | assetsSubDirectory: 'static',
12 | assetsPublicPath: '/',
13 | proxyTable: {
14 | // '/api': {
15 | // target: 'http://localhost:8080',//设置你调用的接口域名和端口号 别忘了加http
16 | // changeOrigin: true,
17 | // pathRewrite: {
18 | // '^/api': ''//这里理解成用‘/api’代替target里面的地址,后面组件中我们掉接口时直接用api代替 比如我要调用'http://40.00.100.100:3002/user/add',直接写‘/api/user/add’即可
19 | // }
20 | // }
21 | },
22 |
23 | // Various Dev Server settings
24 | host: 'localhost', // can be overwritten by process.env.HOST
25 | port: 8081, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
26 | autoOpenBrowser: false,
27 | errorOverlay: true,
28 | notifyOnErrors: true,
29 | poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
30 |
31 |
32 | /**
33 | * Source Maps
34 | */
35 |
36 | // https://webpack.js.org/configuration/devtool/#development
37 | devtool: 'cheap-module-eval-source-map',
38 |
39 | // If you have problems debugging vue-files in devtools,
40 | // set this to false - it *may* help
41 | // https://vue-loader.vuejs.org/en/options.html#cachebusting
42 | cacheBusting: true,
43 |
44 | cssSourceMap: true
45 | },
46 |
47 | build: {
48 | // Template for index.html
49 | index: path.resolve(__dirname, '../dist/index.html'),
50 |
51 | // Paths
52 | assetsRoot: path.resolve(__dirname, '../dist'),
53 | assetsSubDirectory: 'static',
54 | assetsPublicPath: './',
55 |
56 | /**
57 | * Source Maps
58 | */
59 |
60 | productionSourceMap: true,
61 | // https://webpack.js.org/configuration/devtool/#production
62 | devtool: '#source-map',
63 |
64 | // Gzip off by default as many popular static hosts such as
65 | // Surge or Netlify already gzip all static assets for you.
66 | // Before setting to `true`, make sure to:
67 | // npm install --save-dev compression-webpack-plugin
68 | productionGzip: false,
69 | productionGzipExtensions: ['js', 'css'],
70 |
71 | // Run the build command with an extra argument to
72 | // View the bundle analyzer report after build finishes:
73 | // `npm run build --report`
74 | // Set to `true` or `false` to always turn it on or off
75 | bundleAnalyzerReport: process.env.npm_config_report
76 | }
77 | }
78 |
--------------------------------------------------------------------------------
/config/prod.env.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | module.exports = {
3 | NODE_ENV: '"production"'
4 | }
5 |
--------------------------------------------------------------------------------
/dist/index.html:
--------------------------------------------------------------------------------
1 |
车车综合管理
--------------------------------------------------------------------------------
/doc/项目环境搭建步骤.doc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yqrong/vvproject/d093c58f01d225db9ca834f484ab19095a757021/doc/项目环境搭建步骤.doc
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | 车车综合管理
8 |
9 |
10 |
11 |
12 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "vvproject",
3 | "version": "1.0.0",
4 | "description": "A Vue.js project",
5 | "author": "Lena",
6 | "private": true,
7 | "scripts": {
8 | "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
9 | "start": "npm run dev",
10 | "build": "node build/build.js"
11 | },
12 | "dependencies": {
13 | "axios": "^0.18.0",
14 | "babel-polyfill": "^6.26.0",
15 | "echarts": "^4.0.4",
16 | "element-ui": "^2.4.11",
17 | "vue": "^2.5.2",
18 | "vue-router": "^3.0.1",
19 | "vuex": "^3.0.1"
20 | },
21 | "devDependencies": {
22 | "autoprefixer": "^7.1.2",
23 | "babel-core": "^6.22.1",
24 | "babel-helper-vue-jsx-merge-props": "^2.0.3",
25 | "babel-loader": "^7.1.1",
26 | "babel-plugin-syntax-jsx": "^6.18.0",
27 | "babel-plugin-transform-runtime": "^6.22.0",
28 | "babel-plugin-transform-vue-jsx": "^3.5.0",
29 | "babel-preset-env": "^1.3.2",
30 | "babel-preset-stage-2": "^6.22.0",
31 | "chalk": "^2.0.1",
32 | "copy-webpack-plugin": "^4.0.1",
33 | "css-loader": "^0.28.0",
34 | "extract-text-webpack-plugin": "^3.0.0",
35 | "file-loader": "^1.1.4",
36 | "friendly-errors-webpack-plugin": "^1.6.1",
37 | "html-webpack-plugin": "^2.30.1",
38 | "node-notifier": "^5.1.2",
39 | "node-sass": "^4.9.0",
40 | "optimize-css-assets-webpack-plugin": "^3.2.0",
41 | "ora": "^1.2.0",
42 | "portfinder": "^1.0.13",
43 | "postcss-import": "^11.0.0",
44 | "postcss-loader": "^2.0.8",
45 | "postcss-url": "^7.2.1",
46 | "rimraf": "^2.6.0",
47 | "sass-loader": "^7.0.1",
48 | "semver": "^5.3.0",
49 | "shelljs": "^0.7.6",
50 | "uglifyjs-webpack-plugin": "^1.1.1",
51 | "url-loader": "^0.5.8",
52 | "vue-loader": "^13.3.0",
53 | "vue-style-loader": "^3.0.1",
54 | "vue-template-compiler": "^2.5.2",
55 | "webpack": "^3.6.0",
56 | "webpack-bundle-analyzer": "^2.9.0",
57 | "webpack-dev-server": "^2.9.1",
58 | "webpack-merge": "^4.1.0"
59 | },
60 | "engines": {
61 | "node": ">= 6.0.0",
62 | "npm": ">= 3.0.0"
63 | },
64 | "browserslist": [
65 | "> 1%",
66 | "last 2 versions",
67 | "not ie <= 8"
68 | ]
69 | }
70 |
--------------------------------------------------------------------------------
/src/api/api_enterprise.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Created by yqr on 2018/4/13.
3 | */
4 | import * as API from './'
5 |
6 | export default {
7 | //查询列表
8 | findList: params => {
9 | return API.GET('/json', params)
10 | },
11 | findById: id => {
12 | return API.GET(`/api/enterprise/list/${id}`)
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/api/api_user.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Created by yqr on 2018/4/13.
3 | */
4 | import * as API from './'
5 |
6 | export default {
7 | //登录
8 | login: params => {
9 | return "success";
10 | //return API.POST('/api/users/login', params)
11 | },
12 | //登出
13 | logout: params => {
14 | return "success";
15 | //return API.GET('/api/users/logout', params)
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/api/env.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Created by yqr on 2018/4/13.
3 | * 设置api请求的baseURL
4 | * 实际项目中建议该文件不纳入版本管理
5 | */
6 | export default {
7 | baseURL: 'http://localhost:8090',
8 | isDev: true
9 | }
10 |
--------------------------------------------------------------------------------
/src/api/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Created by yqr on 2018/4/13.
3 | */
4 | import Env from './env';
5 | import axios from 'axios'
6 | import {road} from '../road.js'
7 | import routerIndex from '../router/index'
8 |
9 | axios.defaults.withCredentials = false;
10 | // axios.defaults.headers.common['Authorization'] = AUTH_TOKEN;
11 | // axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8';//配置请求头
12 | axios.defaults.headers.post['Content-Type'] = 'application/json;charset=UTF-8';//配置请求头
13 |
14 | //添加一个请求拦截器
15 | axios.interceptors.request.use(function (config) {
16 | //console.dir(config);
17 | return config;
18 | }, function (error) {
19 | // Do something with request error
20 | return Promise.reject(error);
21 | });
22 |
23 | // 添加一个响应拦截器
24 | axios.interceptors.response.use(function (response) {
25 | if (response.data && response.data.errcode) {
26 | if (parseInt(response.data.errcode) === 40001) {
27 | //未登录
28 | road.$message.error('请重新登录');
29 | routerIndex.push('/login');
30 | }
31 | }
32 | return response;
33 | }, function (error) {
34 | // Do something with response error
35 | return Promise.reject(error);
36 | });
37 |
38 | //基地址
39 | let base = Env.baseURL;
40 |
41 | //测试使用
42 | export const ISDEV = Env.isDev;
43 |
44 | //通用方法
45 | export const POST = (url, params) => {
46 | return axios.post(`${base}${url}`, params).then(res => res.data)
47 | }
48 |
49 | export const GET = (url, params) => {
50 | return axios.get(`${base}${url}`, {params: params}).then(res => res.data)
51 | }
52 |
53 | export const PUT = (url, params) => {
54 | return axios.put(`${base}${url}`, params).then(res => res.data)
55 | }
56 |
57 | export const DELETE = (url, params) => {
58 | return axios.delete(`${base}${url}`, {params: params}).then(res => res.data)
59 | }
60 |
61 | export const PATCH = (url, params) => {
62 | return axios.patch(`${base}${url}`, params).then(res => res.data)
63 | }
64 |
--------------------------------------------------------------------------------
/src/app.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
11 |
--------------------------------------------------------------------------------
/src/assets/css/style.css:
--------------------------------------------------------------------------------
1 | * {
2 | margin: 0;
3 | padding: 0;
4 | }
5 |
6 | *, :after, :before {
7 | webkit-box-sizing: border-box;
8 | -moz-box-sizing: border-box;
9 | box-sizing: border-box;
10 | }
11 |
12 | html {
13 | font-size: 14px;
14 | }
15 |
16 | @media all and (max-width: 768px) {
17 | html {
18 | font-size: 12px;
19 | }
20 | }
21 |
22 | a {
23 | text-decoration: none;
24 | }
25 |
26 | ul {
27 | list-style: none;
28 | margin-bottom: 0;
29 | }
30 |
31 | #app {
32 | font-family: 'Avenir', Helvetica, Arial, sans-serif;
33 | -webkit-font-smoothing: antialiased;
34 | -moz-osx-font-smoothing: grayscale;
35 | color: #2c3e50;
36 | margin-top: 60px;
37 | }
38 |
39 | .pull-left {
40 | float: left;
41 | }
42 |
43 | .pull-right {
44 | float: right;
45 | }
46 |
47 | .container {
48 | position: absolute;
49 | top: 0px;
50 | bottom: 0px;
51 | width: 100%;
52 | }
53 |
54 | /* top navbar style start */
55 | .container .topbar-wrap {
56 | height: 50px;
57 | line-height: 50px;
58 | background: #373d41;
59 | padding: 0px;
60 | }
61 |
62 | .container .topbar-wrap .topbar-btn {
63 | color: #fff;
64 | }
65 |
66 | .container .topbar-wrap .topbar-logo {
67 | float: left;
68 | width: 60px;
69 | line-height: 26px;
70 | }
71 |
72 | .container .topbar-wrap .topbar-logos {
73 | float: left;
74 | width: 128px;
75 | line-height: 48px;
76 | font-size: 14px;
77 | }
78 |
79 | .container .topbar-wrap .topbar-logo img, .container .topbar-wrap .topbar-logos img {
80 | height: 30px;
81 | margin-top: 12px;
82 | margin-left: 2px;
83 | }
84 |
85 | .container .topbar-wrap .topbar-title {
86 | float: left;
87 | text-align: left;
88 | padding-left: 10px;
89 | border-left: 1px solid #000;
90 | }
91 |
92 | .topbar-title .el-menu--horizontal {
93 | background-color: transparent;
94 | }
95 |
96 | .el-menu--horizontal > .el-menu-item:not(.is-disabled):hover, .el-menu--horizontal > .el-menu-item:not(.is-disabled):focus, .el-menu--horizontal > .el-menu-item.is-active {
97 | color: #fff;
98 | background-color: transparent;
99 | border-bottom: 2px solid #409EFF !important;
100 | }
101 |
102 | .topbar-title .el-menu--horizontal > .el-menu-item {
103 | height: 50px;
104 | line-height: 50px;
105 | color: #fff;
106 | }
107 |
108 | .el-menu-item .iconfont {
109 | margin-right: 5px;
110 | display: inline-block;
111 | width: 24px;
112 | text-align: center;
113 | font-size: 18px;
114 | vertical-align: middle;
115 | }
116 |
117 | .container .topbar-wrap .topbar-account {
118 | float: right;
119 | padding-right: 12px;
120 | }
121 |
122 | .container .topbar-wrap .topbar-timer {
123 | display: inline-block;
124 | }
125 |
126 | .container .topbar-wrap .topbar-timer span {
127 | display: inline-block;
128 | vertical-align: middle;
129 | }
130 |
131 | .container .topbar-wrap .topbar-timer .login-name {
132 | margin: 0 6px;
133 | font-style: normal;
134 | }
135 |
136 | .container .topbar-wrap .userinfo-inner {
137 | cursor: pointer;
138 | color: #fff;
139 | padding-left: 10px;
140 | }
141 |
142 | .container .topbar-wrap .userinfo-inner img {
143 | margin-left: 6px;
144 | width: 42px;
145 | height: 42px;
146 | border: 1px solid #504d4d;
147 | -webkit-border-radius: 50%;
148 | -moz-border-radius: 50%;
149 | border-radius: 50%;
150 | vertical-align: middle;
151 | }
152 | /* top navbar style end */
153 |
154 | /* left sidebar style start */
155 | .container aside {
156 | min-width: 50px;
157 | background: #333744;
158 | }
159 |
160 | .container aside::-webkit-scrollbar {
161 | display: none;
162 | }
163 |
164 | .container aside .menu-toggle {
165 | background: #4A5064;
166 | text-align: center;
167 | color: white;
168 | height: 26px;
169 | line-height: 30px;
170 | }
171 |
172 | .container aside .menu-toggle .iconfont:hover {
173 | cursor: pointer;
174 | }
175 |
176 | aside .el-menu-item, aside .el-submenu__title {
177 | color: #fff;
178 | text-align: left;
179 | }
180 |
181 | aside .el-menu-item:hover, aside .el-submenu .el-menu-item:hover, aside .el-submenu__title:hover {
182 | background-color: #7ed2df;
183 | }
184 |
185 | aside .el-submenu .el-menu-item {
186 | background-color: #333744;
187 | }
188 |
189 | aside .el-submenu .el-menu-item:hover {
190 | background-color: #4A5064;
191 | }
192 |
193 | aside .el-submenu .el-menu-item.is-active, aside .el-menu-item.is-active,
194 | aside .el-submenu .el-menu-item.is-active:hover, aside .el-menu-item.is-active:hover {
195 | background-color: #00C1DE;
196 | color: #fff;
197 | }
198 |
199 | .container aside.showSidebar {
200 | overflow-x: hidden;
201 | overflow-y: auto;
202 | }
203 |
204 | .container aside .el-menu {
205 | height: 100%; /*写给不支持calc()的浏览器*/
206 | height: calc(100% - 80px);
207 | border-radius: 0px;
208 | background-color: #333744;
209 | border-right: 0px;
210 | }
211 |
212 | .container aside .el-submenu .el-menu-item {
213 | min-width: 60px;
214 | }
215 |
216 | .container aside .el-menu {
217 | width: 189px;
218 | }
219 |
220 | .container aside .el-menu--collapse {
221 | width: 60px;
222 | }
223 |
224 | .container aside .el-menu .el-menu-item, .container aside .el-submenu .el-submenu__title {
225 | height: 46px;
226 | line-height: 46px;
227 | }
228 |
229 | .container aside .el-menu-item:hover, .container aside .el-submenu .el-menu-item:hover, .container aside .el-submenu__title:hover {
230 | background-color: #7ed2df;
231 | }
232 |
233 | /* left sidebar style end */
234 |
235 | .container .main {
236 | display: -ms-flexbox;
237 | display: flex;
238 | position: absolute;
239 | top: 50px;
240 | bottom: 0px;
241 | overflow: hidden;
242 | }
243 |
244 | .container .warp-main {
245 | padding-top: 10px;
246 | padding-bottom: 10px;
247 | }
248 |
249 | .container .content-container {
250 | background: #f2f2f2;
251 | -ms-flex: 1;
252 | flex: 1;
253 | overflow-y: auto;
254 | padding: 10px;
255 | }
256 |
257 | .container .content-container .content-wrapper {
258 | background-color: #fff;
259 | box-sizing: border-box;
260 | }
261 |
262 | .grid-content {
263 | border-radius: 2px;
264 | background-color: #fff;
265 | }
266 |
267 | .grid-content .toolbar {
268 | padding: 10px 10px 0 10px;
269 | }
270 |
271 | .grid-content .el-pagination {
272 | padding: 15px;
273 | text-align: right;
274 | }
275 |
276 | .table-wrapper {
277 | border-top: 1px solid #ebeef5;
278 | }
279 |
280 | /* bottom footer style start */
281 | .footer {
282 | position: fixed;
283 | bottom: 0;
284 | left: 0;
285 | padding: 20px 0;
286 | width: 100%;
287 | background-color: #2d2e2e;
288 | }
289 |
290 | .footer .footer-msg {
291 | max-width: 800px;
292 | margin: 0 auto;
293 | text-align: center;
294 | font-size: 1.08rem;
295 | color: #666;
296 | }
297 |
298 | .footer .footer-msg a {
299 | color: #428bca;
300 | text-decoration: none;
301 | }
302 |
303 | .footer .footer-msg a:hover,
304 | .footer .footer-msg a:focus,
305 | .footer .footer-msg a:active {
306 | color: #2a6496;
307 | text-decoration: underline;
308 | outline: 0;
309 | }
310 | /* bottom footer style end */
311 |
312 | /* scrollbar style start */
313 | ::-webkit-scrollbar {
314 | background: transparent;
315 | width: 10px;
316 | height: 10px
317 | }
318 |
319 | ::-webkit-scrollbar-thumb {
320 | -webkit-border-radius: 5px;
321 | -moz-border-radius: 5px;
322 | border-radius: 5px;
323 | background-color: #e1e1e1;
324 | width: 6px;
325 | height: 6px;
326 | border: 2px solid transparent;
327 | background-clip: content-box
328 | }
329 |
330 | ::-webkit-scrollbar-track {
331 | -webkit-border-radius: 5px;
332 | -moz-border-radius: 5px;
333 | border-radius: 5px;
334 | background-color: #fafafa
335 | }
336 | /* scrollbar style end */
337 |
338 | /* sidebar style start */
339 | .slide-fade-enter-active {
340 | transition: all .3s ease;
341 | }
342 | .slide-fade-leave-active {
343 | transition: all .3s cubic-bezier(1, .5, .8, 1);
344 | }
345 | .slide-fade-enter, .slide-fade-leave-to {
346 | transform: translateX(600px);
347 | }
348 | /* sidebar style end */
349 |
--------------------------------------------------------------------------------
/src/assets/fonts/iconfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yqrong/vvproject/d093c58f01d225db9ca834f484ab19095a757021/src/assets/fonts/iconfont.eot
--------------------------------------------------------------------------------
/src/assets/fonts/iconfont.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
49 |
--------------------------------------------------------------------------------
/src/assets/fonts/iconfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yqrong/vvproject/d093c58f01d225db9ca834f484ab19095a757021/src/assets/fonts/iconfont.ttf
--------------------------------------------------------------------------------
/src/assets/fonts/iconfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yqrong/vvproject/d093c58f01d225db9ca834f484ab19095a757021/src/assets/fonts/iconfont.woff
--------------------------------------------------------------------------------
/src/assets/iconfont.css:
--------------------------------------------------------------------------------
1 |
2 | @font-face {font-family: "iconfont";
3 | src: url('fonts/iconfont.eot?t=1524894158375'); /* IE9*/
4 | src: url('fonts/iconfont.eot?t=1524894158375#iefix') format('embedded-opentype'), /* IE6-IE8 */
5 | url('fonts/iconfont.woff?t=1524894158375') format('woff'),
6 | url('fonts/iconfont.ttf?t=1524894158375') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
7 | url('fonts/iconfont.svg?t=1524894158375#iconfont') format('svg'); /* iOS 4.1- */
8 | }
9 |
10 | .iconfont {
11 | font-family:"iconfont" !important;
12 | font-size:16px;
13 | font-style:normal;
14 | -webkit-font-smoothing: antialiased;
15 | -moz-osx-font-smoothing: grayscale;
16 | }
17 |
18 | .icon-home:before { content: "\e626"; }
19 |
20 | .icon-user:before { content: "\ec52"; }
21 |
22 | .icon-indent:before { content: "\e62b"; }
23 |
24 | .icon-outdent:before { content: "\e62c"; }
25 |
26 | .icon-caret-down:before { content: "\e631"; }
27 |
28 |
--------------------------------------------------------------------------------
/src/assets/images/card.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yqrong/vvproject/d093c58f01d225db9ca834f484ab19095a757021/src/assets/images/card.jpg
--------------------------------------------------------------------------------
/src/assets/images/downloadcode.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yqrong/vvproject/d093c58f01d225db9ca834f484ab19095a757021/src/assets/images/downloadcode.png
--------------------------------------------------------------------------------
/src/assets/images/not_found.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yqrong/vvproject/d093c58f01d225db9ca834f484ab19095a757021/src/assets/images/not_found.png
--------------------------------------------------------------------------------
/src/assets/images/totalnumber.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yqrong/vvproject/d093c58f01d225db9ca834f484ab19095a757021/src/assets/images/totalnumber.jpg
--------------------------------------------------------------------------------
/src/assets/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yqrong/vvproject/d093c58f01d225db9ca834f484ab19095a757021/src/assets/logo.png
--------------------------------------------------------------------------------
/src/common/util.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Created by yqr on 2018/4/25.
3 | */
4 | var TEL_REGEXP = /^1([38]\d|5[0-35-9]|7[3678])\d{8}$/;
5 |
6 | export default {
7 | checkTel: {
8 | validateTel: function(tel){
9 | if(TEL_REGEXP.test(tel)){
10 | return true;
11 | }
12 | return false;
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/components/404.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |

4 |
您访问的页面不存在...
5 |
6 | 返回首页
7 |
8 |
9 |
10 |
34 |
--------------------------------------------------------------------------------
/src/components/nav/leftNav.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
31 |
32 |
88 |
--------------------------------------------------------------------------------
/src/components/nav/topNav.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |

7 |
8 |
11 |
12 |
13 |
14 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
34 |
35 |
36 | {{nickname}}
37 |
38 |
39 | 个人信息
40 |
41 |
42 | 修改密码
43 |
44 | 退出登录
45 |
46 |
47 |
48 |
49 |
50 |
51 |
149 |
--------------------------------------------------------------------------------
/src/main.js:
--------------------------------------------------------------------------------
1 | // The Vue build version to load with the `import` command
2 | // (runtime-only or standalone) has been set in webpack.base.conf with an alias.
3 | import Vue from 'vue'
4 | import App from './App'
5 | import router from './router'
6 | import ElementUI from 'element-ui'
7 |
8 | import store from './store.js'
9 | import 'element-ui/lib/theme-chalk/index.css'
10 | import '@/assets/iconfont.css'
11 | import '@/assets/css/style.css'
12 |
13 | Vue.config.productionTip = false
14 | Vue.use(ElementUI)
15 |
16 | Vue.component('footer-copyright', {
17 | template: ''
18 | });
19 |
20 | Vue.filter('formatDateTime', function (value) {
21 | if (!value) return ''
22 | let date = new Date(value);
23 | let y = date.getFullYear() + '/';
24 | let mon = (date.getMonth() + 1) + '/';
25 | let d = date.getDate();
26 | return y + mon + d;
27 | });
28 |
29 | new Vue({
30 | router,
31 | store,
32 | el: '#app',
33 | render: h => h(App)
34 | })
35 |
--------------------------------------------------------------------------------
/src/road.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Created by yqr on 2018/4/13.
3 | */
4 | import Vue from 'vue'
5 |
6 | export let road = new Vue()
7 |
--------------------------------------------------------------------------------
/src/router/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Created by yqr on 2018/3/26.
3 | */
4 | import Vue from 'vue'
5 | import Router from 'vue-router'
6 | import TopNav from '@/components/nav/topNav.vue'
7 | import LeftNav from '@/components/nav/leftNav.vue'
8 | import Home from '@/views/home.vue'
9 | import Dashboard from '@/views/workbench/dashboard.vue'
10 | import MySettings from '@/views/workbench/mySettings.vue'
11 | import Mission from '@/views/workbench/mission/mission.vue'
12 | import Plan from '@/views/workbench/plan/plan.vue'
13 | import Maillist from '@/views/workbench/maillist.vue'
14 | import EnterpriseList from '@/views/enterprise/index.vue'
15 | import EnterpriseAdd from '@/views/enterprise/add.vue'
16 | import EnterpriseDetail from '@/views/enterprise/detail.vue'
17 | import EnterpriseValidate from '@/views/enterprise/validate.vue'
18 | import VehicleManage from '@/views/vehicle/index.vue'
19 | import DeptManager from '@/views/dept/index.vue'
20 | import NotFound from '@/components/404.vue'
21 |
22 | // 懒加载方式,当路由被访问的时候才加载对应组件
23 | const Login = resolve => require(['@/views/login'], resolve)
24 |
25 | Vue.use(Router)
26 |
27 | let router = new Router({
28 | routes: [
29 | {
30 | path: '/login',
31 | type: 'login',
32 | component: Login
33 | },
34 | {
35 | path: '*',
36 | component: NotFound
37 | },
38 | {
39 | path: '/',
40 | type: 'home',
41 | name: 'home',
42 | redirect: '/dashboard',
43 | component: Home,
44 | children: [
45 | {
46 | path: '/dashboard',
47 | name: '首页',
48 | components: {
49 | default: Dashboard,
50 | top: TopNav,
51 | aside: LeftNav
52 | },
53 | leaf: true, // 只有一个节点
54 | iconCls: 'iconfont icon-home', // 图标样式class
55 | menuShow: true
56 | },
57 | {
58 | path: '/mySet',
59 | components: {
60 | default: MySettings,
61 | top: TopNav,
62 | aside: LeftNav
63 | },
64 | name: '我的设置',
65 | iconCls: 'el-icon-menu',
66 | menuShow: true,
67 | children: [
68 | { path: '/mySet/plan', component: Plan, name: '行程计划', menuShow: true },
69 | { path: '/mySet/mission', component: Mission, name: '我的任务', menuShow: true },
70 | { path: '/mySet/maillist', component: Maillist, name: '通讯录', menuShow: true }
71 | ]
72 | }
73 | ]
74 | },
75 | {
76 | path: '/enterpriseManager',
77 | type: 'enterprise',
78 | name: 'enterprise',
79 | component: Home,
80 | redirect: '/enterprise/list',
81 | menuShow: true,
82 | children: [
83 | {
84 | path: '/enterprise/list',
85 | name: '企业信息',
86 | components: {
87 | default: EnterpriseList,
88 | top: TopNav,
89 | aside: LeftNav
90 | },
91 | leaf: true,
92 | iconCls: 'el-icon-setting',
93 | menuShow: true
94 | },
95 | {
96 | path: '/enterprise/detail',
97 | name: '企业详情',
98 | components: {
99 | default: EnterpriseDetail,
100 | top: TopNav,
101 | aside: LeftNav
102 | },
103 | leaf: true,
104 | iconCls: 'el-icon-setting',
105 | menuShow: false
106 | },
107 | {
108 | path: '/enterprise/add',
109 | name: '添加企业',
110 | components: {
111 | default: EnterpriseAdd,
112 | top: TopNav,
113 | aside: LeftNav
114 | },
115 | leaf: true,
116 | iconCls: 'el-icon-menu',
117 | menuShow: true
118 | },
119 | {
120 | path: '/enterprise/validate',
121 | name: '企业认证',
122 | components: {
123 | default: EnterpriseValidate,
124 | top: TopNav,
125 | aside: LeftNav
126 | },
127 | leaf: true,
128 | iconCls: 'el-icon-menu',
129 | menuShow: true
130 | }
131 | ]
132 | },
133 | {
134 | path: '/vehicleManager',
135 | type: 'enterprise',
136 | name: 'vehicle',
137 | component: Home,
138 | redirect: '/vehicle/list',
139 | menuShow: true,
140 | children: [
141 | {
142 | path: '/vehicle/list',
143 | name: '车辆信息',
144 | components: {
145 | default: VehicleManage,
146 | top: TopNav,
147 | aside: LeftNav
148 | },
149 | leaf: true, // 只有一个节点
150 | iconCls: 'iconfont icon-home', // 图标样式class
151 | menuShow: true
152 | }
153 | ]
154 | },
155 | {
156 | path: '/deptManager',
157 | type: 'enterprise',
158 | name: 'dept',
159 | component: Home,
160 | redirect: '/dept/list',
161 | menuShow: true,
162 | children: [
163 | {
164 | path: '/dept/list',
165 | name: '部门信息',
166 | components: {
167 | default: DeptManager,
168 | top: TopNav,
169 | aside: LeftNav
170 | },
171 | leaf: true, // 只有一个节点
172 | iconCls: 'iconfont icon-home', // 图标样式class
173 | menuShow: true
174 | }
175 | ]
176 | }
177 | ]
178 | });
179 |
180 | router.beforeEach((to, from, next) => {
181 | // console.log('to:' + to.path)
182 | if (to.path.startsWith('/login')) {
183 | window.localStorage.removeItem('access-user')
184 | next()
185 | } else {
186 | let user = JSON.parse(window.localStorage.getItem('access-user'))
187 | if (!user) {
188 | next({path: '/login'})
189 | } else {
190 | next()
191 | }
192 | }
193 | });
194 |
195 | export default router
196 |
--------------------------------------------------------------------------------
/src/store.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Created by yqr on 2018/3/26.
3 | */
4 | import Vue from 'vue'
5 | import Vuex from 'vuex'
6 |
7 | Vue.use(Vuex)
8 |
9 | /*测试数据*/
10 | const date = 'Mon Mar 24 2018 00:00:00 GMT+0800 (中国标准时间)'
11 | const data = [
12 | {
13 | id: '1111',
14 | name: 'Allen',
15 | type: '员工',
16 | status: '已离职'
17 | },{
18 | id: '2222',
19 | name: 'Thomas',
20 | type: '司机',
21 | status: '在职'
22 | }
23 | ]
24 |
25 | const state = {
26 | collapsed: false,
27 | topNavState: 'home',
28 | leftNavState: 'home'
29 | }
30 |
31 | /*从本地存储读取数据*/
32 | for(var item in state) {
33 | localStorage.getItem(item)? state[item] = JSON.parse(localStorage.getItem(item)): false;
34 | }
35 |
36 | export default new Vuex.Store({
37 | state
38 | })
39 |
--------------------------------------------------------------------------------
/src/views/customer/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 | 客户查看
4 |
5 |
6 |
20 |
--------------------------------------------------------------------------------
/src/views/dept/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
63 |
--------------------------------------------------------------------------------
/src/views/enterprise/add.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
添加企业
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 | 保存添加
43 |
44 |
45 |
46 |
47 |
64 |
--------------------------------------------------------------------------------
/src/views/enterprise/detail.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 | 详情
4 |
5 |
6 |
--------------------------------------------------------------------------------
/src/views/enterprise/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | 查询
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
29 |
30 |
38 |
39 |
40 |
41 |
42 |
43 |
120 |
129 |
--------------------------------------------------------------------------------
/src/views/enterprise/update.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Start
5 |
6 |
保存
7 |
8 |
9 |
28 |
--------------------------------------------------------------------------------
/src/views/enterprise/validate.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
企业认证
4 |
5 |
6 |
7 |
8 |
9 |
认证
10 |
11 |
12 |
37 |
66 |
--------------------------------------------------------------------------------
/src/views/home.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
29 |
--------------------------------------------------------------------------------
/src/views/login.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
11 | 欢迎登录
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
23 |
24 | 登录
25 |
26 |
27 |
30 |
31 |
32 |
117 |
184 |
--------------------------------------------------------------------------------
/src/views/partner/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 | 伙伴查看
4 |
5 |
6 |
20 |
--------------------------------------------------------------------------------
/src/views/vehicle/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 | 车辆查看
4 |
5 |
6 |
20 |
--------------------------------------------------------------------------------
/src/views/workbench/dashboard.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 首页
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
标题
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
标题
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
标题
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
91 |
166 |
--------------------------------------------------------------------------------
/src/views/workbench/maillist.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 | 通讯录
4 |
5 |
6 |
--------------------------------------------------------------------------------
/src/views/workbench/mission/add.vue:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 | 接乘客
20 | 派车辆
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
37 |
38 |
39 |
71 |
--------------------------------------------------------------------------------
/src/views/workbench/mission/detail.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
任务详情
4 |
5 | - 任务编号:
{{detail.number}}
6 | - 任务类型:
{{detail.type}}
7 | - 任务内容:
{{detail.content | contentFilter}}
8 | - 任务备注:
{{detail.remark}}
9 | - 创建日期:
{{detail.createTime | formatDateTime}}
10 | - 执行日期:
{{detail.activeTime | formatDateTime}}
11 |
12 |
13 |
14 |
58 |
84 |
--------------------------------------------------------------------------------
/src/views/workbench/mission/mission.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | 查询
11 |
12 |
13 | 新增
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 | 删除
33 |
34 |
35 |
36 |
37 |
38 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
154 |
177 |
--------------------------------------------------------------------------------
/src/views/workbench/mySettings.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/src/views/workbench/plan/detail.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
计划详情
4 |
5 | - 计划编号:
{{detail.pNum}}
6 | - 计划名称:
{{detail.name}}
7 | - 计划内容:
{{detail.content}}
8 | - 开始时间:
{{detail.startTime}}
9 | - 完成时间:
{{detail.finishTime}}
10 | - 计划备注:
{{detail.remark}}
11 |
12 |
13 |
14 |
30 |
56 |
--------------------------------------------------------------------------------
/src/views/workbench/plan/plan.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | 查询
11 |
12 |
13 | 添加行程
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | {{props.row.pNum}}
25 |
26 |
27 | {{props.row.name}}
28 |
29 |
30 | {{props.row.content}}
31 |
32 |
33 | {{props.row.startTime}}
34 |
35 |
36 | {{props.row.finishTime}}
37 |
38 |
39 | {{props.row.remark}}
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
63 |
64 |
65 |
66 |
167 |
202 |
--------------------------------------------------------------------------------
/static/.gitkeep:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/static/che.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yqrong/vvproject/d093c58f01d225db9ca834f484ab19095a757021/static/che.ico
--------------------------------------------------------------------------------