作者 shenhailong

完善水电系统前端操作

要显示太多修改。

为保证性能只显示 58 of 58+ 个文件。

1 { 1 {
2 - "presets": ["es2015", "stage-2"],  
3 - "plugins": ["transform-runtime","transform-vue-jsx"], 2 + "presets": [
  3 + "es2015",
  4 + "stage-2"
  5 + ],
  6 + "plugins": [
  7 + "transform-runtime",
  8 + "transform-vue-jsx"
  9 + ],
4 "comments": false 10 "comments": false
5 } 11 }
@@ -19,6 +19,5 @@ module.exports = { @@ -19,6 +19,5 @@ module.exports = {
19 "plugins": [ 19 "plugins": [
20 "vue" 20 "vue"
21 ], 21 ],
22 - "rules": {  
23 - } 22 + "rules": {}
24 }; 23 };
@@ -14,22 +14,22 @@ var spinner = ora('building for production...') @@ -14,22 +14,22 @@ var spinner = ora('building for production...')
14 spinner.start() 14 spinner.start()
15 15
16 rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => { 16 rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => {
17 - if (err) throw err  
18 - webpack(webpackConfig, function (err, stats) {  
19 - spinner.stop()  
20 if (err) throw err 17 if (err) throw err
21 - process.stdout.write(stats.toString({  
22 - colors: true,  
23 - modules: false,  
24 - children: false,  
25 - chunks: false,  
26 - chunkModules: false  
27 - }) + '\n\n') 18 + webpack(webpackConfig, function (err, stats) {
  19 + spinner.stop()
  20 + if (err) throw err
  21 + process.stdout.write(stats.toString({
  22 + colors: true,
  23 + modules: false,
  24 + children: false,
  25 + chunks: false,
  26 + chunkModules: false
  27 + }) + '\n\n')
28 28
29 - console.log(chalk.cyan(' Build complete.\n'))  
30 - console.log(chalk.yellow(  
31 - ' Tip: built files are meant to be served over an HTTP server.\n' +  
32 - ' Opening index.html over file:// won\'t work.\n'  
33 - ))  
34 - }) 29 + console.log(chalk.cyan(' Build complete.\n'))
  30 + console.log(chalk.yellow(
  31 + ' Tip: built files are meant to be served over an HTTP server.\n' +
  32 + ' Opening index.html over file:// won\'t work.\n'
  33 + ))
  34 + })
35 }) 35 })
@@ -2,47 +2,48 @@ var chalk = require('chalk') @@ -2,47 +2,48 @@ var chalk = require('chalk')
2 var semver = require('semver') 2 var semver = require('semver')
3 var packageConfig = require('../package.json') 3 var packageConfig = require('../package.json')
4 var shell = require('shelljs') 4 var shell = require('shelljs')
5 -function exec (cmd) {  
6 - return require('child_process').execSync(cmd).toString().trim() 5 +
  6 +function exec(cmd) {
  7 + return require('child_process').execSync(cmd).toString().trim()
7 } 8 }
8 9
9 var versionRequirements = [ 10 var versionRequirements = [
10 - {  
11 - name: 'node',  
12 - currentVersion: semver.clean(process.version),  
13 - versionRequirement: packageConfig.engines.node  
14 - }, 11 + {
  12 + name: 'node',
  13 + currentVersion: semver.clean(process.version),
  14 + versionRequirement: packageConfig.engines.node
  15 + },
15 ] 16 ]
16 17
17 if (shell.which('npm')) { 18 if (shell.which('npm')) {
18 - versionRequirements.push({  
19 - name: 'npm',  
20 - currentVersion: exec('npm --version'),  
21 - versionRequirement: packageConfig.engines.npm  
22 - }) 19 + versionRequirements.push({
  20 + name: 'npm',
  21 + currentVersion: exec('npm --version'),
  22 + versionRequirement: packageConfig.engines.npm
  23 + })
23 } 24 }
24 25
25 module.exports = function () { 26 module.exports = function () {
26 - var warnings = []  
27 - for (var i = 0; i < versionRequirements.length; i++) {  
28 - var mod = versionRequirements[i]  
29 - if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) {  
30 - warnings.push(mod.name + ': ' +  
31 - chalk.red(mod.currentVersion) + ' should be ' +  
32 - chalk.green(mod.versionRequirement)  
33 - ) 27 + var warnings = []
  28 + for (var i = 0; i < versionRequirements.length; i++) {
  29 + var mod = versionRequirements[i]
  30 + if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) {
  31 + warnings.push(mod.name + ': ' +
  32 + chalk.red(mod.currentVersion) + ' should be ' +
  33 + chalk.green(mod.versionRequirement)
  34 + )
  35 + }
34 } 36 }
35 - }  
36 37
37 - if (warnings.length) {  
38 - console.log('')  
39 - console.log(chalk.yellow('To use this template, you must update following to modules:'))  
40 - console.log()  
41 - for (var i = 0; i < warnings.length; i++) {  
42 - var warning = warnings[i]  
43 - console.log(' ' + warning) 38 + if (warnings.length) {
  39 + console.log('')
  40 + console.log(chalk.yellow('To use this template, you must update following to modules:'))
  41 + console.log()
  42 + for (var i = 0; i < warnings.length; i++) {
  43 + var warning = warnings[i]
  44 + console.log(' ' + warning)
  45 + }
  46 + console.log()
  47 + process.exit(1)
44 } 48 }
45 - console.log()  
46 - process.exit(1)  
47 - }  
48 } 49 }
@@ -3,7 +3,7 @@ require('eventsource-polyfill') @@ -3,7 +3,7 @@ require('eventsource-polyfill')
3 var hotClient = require('webpack-hot-middleware/client?noInfo=true&reload=true') 3 var hotClient = require('webpack-hot-middleware/client?noInfo=true&reload=true')
4 4
5 hotClient.subscribe(function (event) { 5 hotClient.subscribe(function (event) {
6 - if (event.action === 'reload') {  
7 - window.location.reload()  
8 - } 6 + if (event.action === 'reload') {
  7 + window.location.reload()
  8 + }
9 }) 9 })
@@ -2,7 +2,7 @@ require('./check-versions')() @@ -2,7 +2,7 @@ require('./check-versions')()
2 2
3 var config = require('../config') 3 var config = require('../config')
4 if (!process.env.NODE_ENV) { 4 if (!process.env.NODE_ENV) {
5 - process.env.NODE_ENV = JSON.parse(config.dev.env.NODE_ENV) 5 + process.env.NODE_ENV = JSON.parse(config.dev.env.NODE_ENV)
6 } 6 }
7 7
8 var opn = require('opn') 8 var opn = require('opn')
@@ -24,28 +24,29 @@ var app = express() @@ -24,28 +24,29 @@ var app = express()
24 var compiler = webpack(webpackConfig) 24 var compiler = webpack(webpackConfig)
25 25
26 var devMiddleware = require('webpack-dev-middleware')(compiler, { 26 var devMiddleware = require('webpack-dev-middleware')(compiler, {
27 - publicPath: webpackConfig.output.publicPath,  
28 - quiet: true 27 + publicPath: webpackConfig.output.publicPath,
  28 + quiet: true
29 }) 29 })
30 30
31 var hotMiddleware = require('webpack-hot-middleware')(compiler, { 31 var hotMiddleware = require('webpack-hot-middleware')(compiler, {
32 - log: () => {} 32 + log: () => {
  33 + }
33 }) 34 })
34 // force page reload when html-webpack-plugin template changes 35 // force page reload when html-webpack-plugin template changes
35 compiler.plugin('compilation', function (compilation) { 36 compiler.plugin('compilation', function (compilation) {
36 - compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) {  
37 - hotMiddleware.publish({ action: 'reload' })  
38 - cb()  
39 - }) 37 + compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) {
  38 + hotMiddleware.publish({action: 'reload'})
  39 + cb()
  40 + })
40 }) 41 })
41 42
42 // proxy api requests 43 // proxy api requests
43 Object.keys(proxyTable).forEach(function (context) { 44 Object.keys(proxyTable).forEach(function (context) {
44 - var options = proxyTable[context]  
45 - if (typeof options === 'string') {  
46 - options = { target: options }  
47 - }  
48 - app.use(proxyMiddleware(options.filter || context, options)) 45 + var options = proxyTable[context]
  46 + if (typeof options === 'string') {
  47 + options = {target: options}
  48 + }
  49 + app.use(proxyMiddleware(options.filter || context, options))
49 }) 50 })
50 51
51 // handle fallback for HTML5 history API 52 // handle fallback for HTML5 history API
@@ -66,24 +67,24 @@ var uri = 'http://localhost:' + port @@ -66,24 +67,24 @@ var uri = 'http://localhost:' + port
66 67
67 var _resolve 68 var _resolve
68 var readyPromise = new Promise(resolve => { 69 var readyPromise = new Promise(resolve => {
69 - _resolve = resolve 70 + _resolve = resolve
70 }) 71 })
71 72
72 console.log('> Starting dev server...') 73 console.log('> Starting dev server...')
73 devMiddleware.waitUntilValid(() => { 74 devMiddleware.waitUntilValid(() => {
74 - console.log('> Listening at ' + uri + '\n')  
75 - // when env is testing, don't need open it  
76 - if (autoOpenBrowser && process.env.NODE_ENV !== 'testing') {  
77 - opn(uri)  
78 - }  
79 - _resolve() 75 + console.log('> Listening at ' + uri + '\n')
  76 + // when env is testing, don't need open it
  77 + if (autoOpenBrowser && process.env.NODE_ENV !== 'testing') {
  78 + opn(uri)
  79 + }
  80 + _resolve()
80 }) 81 })
81 82
82 var server = app.listen(port) 83 var server = app.listen(port)
83 84
84 module.exports = { 85 module.exports = {
85 - ready: readyPromise,  
86 - close: () => {  
87 - server.close()  
88 - } 86 + ready: readyPromise,
  87 + close: () => {
  88 + server.close()
  89 + }
89 } 90 }
@@ -3,70 +3,70 @@ var config = require('../config') @@ -3,70 +3,70 @@ var config = require('../config')
3 var ExtractTextPlugin = require('extract-text-webpack-plugin') 3 var ExtractTextPlugin = require('extract-text-webpack-plugin')
4 4
5 exports.assetsPath = function (_path) { 5 exports.assetsPath = function (_path) {
6 - var assetsSubDirectory = process.env.NODE_ENV === 'production'  
7 - ? config.build.assetsSubDirectory  
8 - : config.dev.assetsSubDirectory  
9 - return path.posix.join(assetsSubDirectory, _path) 6 + var assetsSubDirectory = process.env.NODE_ENV === 'production'
  7 + ? config.build.assetsSubDirectory
  8 + : config.dev.assetsSubDirectory
  9 + return path.posix.join(assetsSubDirectory, _path)
10 } 10 }
11 11
12 exports.cssLoaders = function (options) { 12 exports.cssLoaders = function (options) {
13 - options = options || {} 13 + options = options || {}
14 14
15 - var cssLoader = {  
16 - loader: 'css-loader',  
17 - options: {  
18 - minimize: process.env.NODE_ENV === 'production',  
19 - sourceMap: options.sourceMap 15 + var cssLoader = {
  16 + loader: 'css-loader',
  17 + options: {
  18 + minimize: process.env.NODE_ENV === 'production',
  19 + sourceMap: options.sourceMap
  20 + }
20 } 21 }
21 - }  
22 22
23 - // generate loader string to be used with extract text plugin  
24 - function generateLoaders (loader, loaderOptions) {  
25 - var loaders = [cssLoader]  
26 - if (loader) {  
27 - loaders.push({  
28 - loader: loader + '-loader',  
29 - options: Object.assign({}, loaderOptions, {  
30 - sourceMap: options.sourceMap  
31 - })  
32 - })  
33 - } 23 + // generate loader string to be used with extract text plugin
  24 + function generateLoaders(loader, loaderOptions) {
  25 + var loaders = [cssLoader]
  26 + if (loader) {
  27 + loaders.push({
  28 + loader: loader + '-loader',
  29 + options: Object.assign({}, loaderOptions, {
  30 + sourceMap: options.sourceMap
  31 + })
  32 + })
  33 + }
34 34
35 - // Extract CSS when that option is specified  
36 - // (which is the case during production build)  
37 - if (options.extract) {  
38 - return ExtractTextPlugin.extract({  
39 - use: loaders,  
40 - fallback: 'vue-style-loader',  
41 - publicPath: '../../'  
42 - })  
43 - } else {  
44 - return ['vue-style-loader'].concat(loaders) 35 + // Extract CSS when that option is specified
  36 + // (which is the case during production build)
  37 + if (options.extract) {
  38 + return ExtractTextPlugin.extract({
  39 + use: loaders,
  40 + fallback: 'vue-style-loader',
  41 + publicPath: '../../'
  42 + })
  43 + } else {
  44 + return ['vue-style-loader'].concat(loaders)
  45 + }
45 } 46 }
46 - }  
47 47
48 - // https://vue-loader.vuejs.org/en/configurations/extract-css.html  
49 - return {  
50 - css: generateLoaders(),  
51 - postcss: generateLoaders(),  
52 - less: generateLoaders('less'),  
53 - sass: generateLoaders('sass', { indentedSyntax: true }),  
54 - scss: generateLoaders('sass'),  
55 - stylus: generateLoaders('stylus'),  
56 - styl: generateLoaders('stylus')  
57 - } 48 + // https://vue-loader.vuejs.org/en/configurations/extract-css.html
  49 + return {
  50 + css: generateLoaders(),
  51 + postcss: generateLoaders(),
  52 + less: generateLoaders('less'),
  53 + sass: generateLoaders('sass', {indentedSyntax: true}),
  54 + scss: generateLoaders('sass'),
  55 + stylus: generateLoaders('stylus'),
  56 + styl: generateLoaders('stylus')
  57 + }
58 } 58 }
59 59
60 // Generate loaders for standalone style files (outside of .vue) 60 // Generate loaders for standalone style files (outside of .vue)
61 exports.styleLoaders = function (options) { 61 exports.styleLoaders = function (options) {
62 - var output = []  
63 - var loaders = exports.cssLoaders(options)  
64 - for (var extension in loaders) {  
65 - var loader = loaders[extension]  
66 - output.push({  
67 - test: new RegExp('\\.' + extension + '$'),  
68 - use: loader  
69 - })  
70 - }  
71 - return output 62 + var output = []
  63 + var loaders = exports.cssLoaders(options)
  64 + for (var extension in loaders) {
  65 + var loader = loaders[extension]
  66 + output.push({
  67 + test: new RegExp('\\.' + extension + '$'),
  68 + use: loader
  69 + })
  70 + }
  71 + return output
72 } 72 }
@@ -3,10 +3,10 @@ var config = require('../config') @@ -3,10 +3,10 @@ var config = require('../config')
3 var isProduction = process.env.NODE_ENV === 'production' 3 var isProduction = process.env.NODE_ENV === 'production'
4 4
5 module.exports = { 5 module.exports = {
6 - loaders: utils.cssLoaders({  
7 - sourceMap: isProduction  
8 - ? config.build.productionSourceMap  
9 - : config.dev.cssSourceMap,  
10 - extract: isProduction  
11 - }) 6 + loaders: utils.cssLoaders({
  7 + sourceMap: isProduction
  8 + ? config.build.productionSourceMap
  9 + : config.dev.cssSourceMap,
  10 + extract: isProduction
  11 + })
12 } 12 }
@@ -2,76 +2,76 @@ var path = require('path') @@ -2,76 +2,76 @@ var path = require('path')
2 var utils = require('./utils') 2 var utils = require('./utils')
3 var config = require('../config') 3 var config = require('../config')
4 var vueLoaderConfig = require('./vue-loader.conf') 4 var vueLoaderConfig = require('./vue-loader.conf')
5 -var webpack=require('webpack') 5 +var webpack = require('webpack')
6 6
7 function resolve(dir) { 7 function resolve(dir) {
8 - return path.join(__dirname, '..', dir) 8 + return path.join(__dirname, '..', dir)
9 } 9 }
10 10
11 module.exports = { 11 module.exports = {
12 - entry: {  
13 - app: './src/main.js'  
14 - },  
15 - output: {  
16 - path: config.build.assetsRoot,  
17 - filename: '[name].js',  
18 - publicPath: process.env.NODE_ENV === 'production'  
19 - ? config.build.assetsPublicPath  
20 - : config.dev.assetsPublicPath  
21 - },  
22 - resolve: {  
23 - extensions: ['.js', '.vue', '.json'],  
24 - alias: {  
25 - 'vue$': 'vue/dist/vue.esm.js',  
26 - '@': resolve('src'),  
27 - 'scss_vars': '@/styles/vars.scss'  
28 - }  
29 - },  
30 - module: {  
31 - rules: [  
32 - {  
33 - test: /\.vue$/,  
34 - loader: 'vue-loader',  
35 - options: vueLoaderConfig  
36 - },  
37 - {  
38 - test: /\.js$/,  
39 - loader: 'babel-loader',  
40 - include: [resolve('src'), resolve('test')]  
41 - },  
42 - {  
43 - test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,  
44 - loader: 'url-loader',  
45 - options: {  
46 - limit: 10000,  
47 - name: utils.assetsPath('img/[name].[hash:7].[ext]') 12 + entry: {
  13 + app: './src/main.js'
  14 + },
  15 + output: {
  16 + path: config.build.assetsRoot,
  17 + filename: '[name].js',
  18 + publicPath: process.env.NODE_ENV === 'production'
  19 + ? config.build.assetsPublicPath
  20 + : config.dev.assetsPublicPath
  21 + },
  22 + resolve: {
  23 + extensions: ['.js', '.vue', '.json'],
  24 + alias: {
  25 + 'vue$': 'vue/dist/vue.esm.js',
  26 + '@': resolve('src'),
  27 + 'scss_vars': '@/styles/vars.scss'
48 } 28 }
49 - },  
50 - {  
51 - test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,  
52 - loader: 'url-loader',  
53 - options: {  
54 - limit: 10000,  
55 - name: utils.assetsPath('fonts/[name].[hash:7].[ext]')  
56 - }  
57 - },  
58 - {  
59 - test: /\.js$/i,  
60 - loader: 'babel-loader',  
61 - include: [  
62 - resolve('src'),  
63 - resolve('test'),  
64 - resolve('node_modules/element-ui/src'),  
65 - resolve('node_modules/element-ui/packages')  
66 - ],  
67 - } 29 + },
  30 + module: {
  31 + rules: [
  32 + {
  33 + test: /\.vue$/,
  34 + loader: 'vue-loader',
  35 + options: vueLoaderConfig
  36 + },
  37 + {
  38 + test: /\.js$/,
  39 + loader: 'babel-loader',
  40 + include: [resolve('src'), resolve('test')]
  41 + },
  42 + {
  43 + test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
  44 + loader: 'url-loader',
  45 + options: {
  46 + limit: 10000,
  47 + name: utils.assetsPath('img/[name].[hash:7].[ext]')
  48 + }
  49 + },
  50 + {
  51 + test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
  52 + loader: 'url-loader',
  53 + options: {
  54 + limit: 10000,
  55 + name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
  56 + }
  57 + },
  58 + {
  59 + test: /\.js$/i,
  60 + loader: 'babel-loader',
  61 + include: [
  62 + resolve('src'),
  63 + resolve('test'),
  64 + resolve('node_modules/element-ui/src'),
  65 + resolve('node_modules/element-ui/packages')
  66 + ],
  67 + }
  68 + ]
  69 + },
  70 + plugins: [
  71 + new webpack.ProvidePlugin({
  72 + $: "jquery",
  73 + jQuery: "jquery",
  74 + "windows.jQuery": "jquery"
  75 + })
68 ] 76 ]
69 - },  
70 - plugins: [  
71 - new webpack.ProvidePlugin({  
72 - $:"jquery",  
73 - jQuery:"jquery",  
74 - "windows.jQuery":"jquery"  
75 - })  
76 - ]  
77 } 77 }
@@ -8,29 +8,29 @@ var FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin') @@ -8,29 +8,29 @@ var FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin')
8 8
9 // add hot-reload related code to entry chunks 9 // add hot-reload related code to entry chunks
10 Object.keys(baseWebpackConfig.entry).forEach(function (name) { 10 Object.keys(baseWebpackConfig.entry).forEach(function (name) {
11 - baseWebpackConfig.entry[name] = ['./build/dev-client'].concat(baseWebpackConfig.entry[name]) 11 + baseWebpackConfig.entry[name] = ['./build/dev-client'].concat(baseWebpackConfig.entry[name])
12 }) 12 })
13 13
14 module.exports = merge(baseWebpackConfig, { 14 module.exports = merge(baseWebpackConfig, {
15 - module: {  
16 - rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap })  
17 - },  
18 - // cheap-module-eval-source-map is faster for development  
19 - devtool: '#cheap-module-eval-source-map',  
20 - plugins: [  
21 - new webpack.DefinePlugin({  
22 - 'process.env': config.dev.env  
23 - }),  
24 - // https://github.com/glenjamin/webpack-hot-middleware#installation--usage  
25 - new webpack.HotModuleReplacementPlugin(),  
26 - new webpack.NoEmitOnErrorsPlugin(),  
27 - // https://github.com/ampedandwired/html-webpack-plugin  
28 - new HtmlWebpackPlugin({  
29 - filename: 'index.html',  
30 - template: 'index.html',  
31 - favicon:'static/favicon.ico',  
32 - inject: true  
33 - }),  
34 - new FriendlyErrorsPlugin()  
35 - ] 15 + module: {
  16 + rules: utils.styleLoaders({sourceMap: config.dev.cssSourceMap})
  17 + },
  18 + // cheap-module-eval-source-map is faster for development
  19 + devtool: '#cheap-module-eval-source-map',
  20 + plugins: [
  21 + new webpack.DefinePlugin({
  22 + 'process.env': config.dev.env
  23 + }),
  24 + // https://github.com/glenjamin/webpack-hot-middleware#installation--usage
  25 + new webpack.HotModuleReplacementPlugin(),
  26 + new webpack.NoEmitOnErrorsPlugin(),
  27 + // https://github.com/ampedandwired/html-webpack-plugin
  28 + new HtmlWebpackPlugin({
  29 + filename: 'index.html',
  30 + template: 'index.html',
  31 + favicon: 'static/favicon.ico',
  32 + inject: true
  33 + }),
  34 + new FriendlyErrorsPlugin()
  35 + ]
36 }) 36 })
@@ -12,110 +12,110 @@ var OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin') @@ -12,110 +12,110 @@ var OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin')
12 var env = config.build.env 12 var env = config.build.env
13 13
14 var webpackConfig = merge(baseWebpackConfig, { 14 var webpackConfig = merge(baseWebpackConfig, {
15 - module: {  
16 - rules: utils.styleLoaders({  
17 - sourceMap: config.build.productionSourceMap,  
18 - extract: true  
19 - })  
20 - },  
21 - devtool: config.build.productionSourceMap ? '#source-map' : false,  
22 - output: {  
23 - publicPath: './',  
24 - path: config.build.assetsRoot,  
25 - filename: utils.assetsPath('js/[name].[chunkhash].js'),  
26 - chunkFilename: utils.assetsPath('js/[id].[chunkhash].js')  
27 - },  
28 - plugins: [  
29 - // http://vuejs.github.io/vue-loader/en/workflow/production.html  
30 - new webpack.DefinePlugin({  
31 - 'process.env': env  
32 - }),  
33 - new webpack.optimize.UglifyJsPlugin({  
34 - compress: {  
35 - warnings: false  
36 - },  
37 - sourceMap: true  
38 - }),  
39 - // extract css into its own file  
40 - new ExtractTextPlugin({  
41 - filename: utils.assetsPath('css/[name].[contenthash].css')  
42 - }),  
43 - // Compress extracted CSS. We are using this plugin so that possible  
44 - // duplicated CSS from different components can be deduped.  
45 - new OptimizeCSSPlugin({  
46 - cssProcessorOptions: {  
47 - safe: true  
48 - }  
49 - }),  
50 - // generate dist index.html with correct asset hash for caching.  
51 - // you can customize output by editing /index.html  
52 - // see https://github.com/ampedandwired/html-webpack-plugin  
53 - new HtmlWebpackPlugin({  
54 - filename: config.build.index,  
55 - template: 'index.html',  
56 - inject: true,  
57 - minify: {  
58 - removeComments: true,  
59 - collapseWhitespace: true,  
60 - removeAttributeQuotes: true  
61 - // more options:  
62 - // https://github.com/kangax/html-minifier#options-quick-reference  
63 - },  
64 - // necessary to consistently work with multiple chunks via CommonsChunkPlugin  
65 - chunksSortMode: 'dependency'  
66 - }),  
67 - // split vendor js into its own file  
68 - new webpack.optimize.CommonsChunkPlugin({  
69 - name: 'vendor',  
70 - minChunks: function (module, count) {  
71 - // any required modules inside node_modules are extracted to vendor  
72 - return (  
73 - module.resource &&  
74 - /\.js$/.test(module.resource) &&  
75 - module.resource.indexOf(  
76 - path.join(__dirname, '../node_modules')  
77 - ) === 0  
78 - )  
79 - }  
80 - }),  
81 - // extract webpack runtime and module manifest to its own file in order to  
82 - // prevent vendor hash from being updated whenever app bundle is updated  
83 - new webpack.optimize.CommonsChunkPlugin({  
84 - name: 'manifest',  
85 - chunks: ['vendor']  
86 - }),  
87 - // copy custom static assets  
88 - new CopyWebpackPlugin([  
89 - {  
90 - from: path.resolve(__dirname, '../static'),  
91 - to: config.build.assetsSubDirectory,  
92 - ignore: ['.*']  
93 - }  
94 - ])  
95 - ] 15 + module: {
  16 + rules: utils.styleLoaders({
  17 + sourceMap: config.build.productionSourceMap,
  18 + extract: true
  19 + })
  20 + },
  21 + devtool: config.build.productionSourceMap ? '#source-map' : false,
  22 + output: {
  23 + publicPath: './',
  24 + path: config.build.assetsRoot,
  25 + filename: utils.assetsPath('js/[name].[chunkhash].js'),
  26 + chunkFilename: utils.assetsPath('js/[id].[chunkhash].js')
  27 + },
  28 + plugins: [
  29 + // http://vuejs.github.io/vue-loader/en/workflow/production.html
  30 + new webpack.DefinePlugin({
  31 + 'process.env': env
  32 + }),
  33 + new webpack.optimize.UglifyJsPlugin({
  34 + compress: {
  35 + warnings: false
  36 + },
  37 + sourceMap: true
  38 + }),
  39 + // extract css into its own file
  40 + new ExtractTextPlugin({
  41 + filename: utils.assetsPath('css/[name].[contenthash].css')
  42 + }),
  43 + // Compress extracted CSS. We are using this plugin so that possible
  44 + // duplicated CSS from different components can be deduped.
  45 + new OptimizeCSSPlugin({
  46 + cssProcessorOptions: {
  47 + safe: true
  48 + }
  49 + }),
  50 + // generate dist index.html with correct asset hash for caching.
  51 + // you can customize output by editing /index.html
  52 + // see https://github.com/ampedandwired/html-webpack-plugin
  53 + new HtmlWebpackPlugin({
  54 + filename: config.build.index,
  55 + template: 'index.html',
  56 + inject: true,
  57 + minify: {
  58 + removeComments: true,
  59 + collapseWhitespace: true,
  60 + removeAttributeQuotes: true
  61 + // more options:
  62 + // https://github.com/kangax/html-minifier#options-quick-reference
  63 + },
  64 + // necessary to consistently work with multiple chunks via CommonsChunkPlugin
  65 + chunksSortMode: 'dependency'
  66 + }),
  67 + // split vendor js into its own file
  68 + new webpack.optimize.CommonsChunkPlugin({
  69 + name: 'vendor',
  70 + minChunks: function (module, count) {
  71 + // any required modules inside node_modules are extracted to vendor
  72 + return (
  73 + module.resource &&
  74 + /\.js$/.test(module.resource) &&
  75 + module.resource.indexOf(
  76 + path.join(__dirname, '../node_modules')
  77 + ) === 0
  78 + )
  79 + }
  80 + }),
  81 + // extract webpack runtime and module manifest to its own file in order to
  82 + // prevent vendor hash from being updated whenever app bundle is updated
  83 + new webpack.optimize.CommonsChunkPlugin({
  84 + name: 'manifest',
  85 + chunks: ['vendor']
  86 + }),
  87 + // copy custom static assets
  88 + new CopyWebpackPlugin([
  89 + {
  90 + from: path.resolve(__dirname, '../static'),
  91 + to: config.build.assetsSubDirectory,
  92 + ignore: ['.*']
  93 + }
  94 + ])
  95 + ]
96 }) 96 })
97 97
98 if (config.build.productionGzip) { 98 if (config.build.productionGzip) {
99 - var CompressionWebpackPlugin = require('compression-webpack-plugin') 99 + var CompressionWebpackPlugin = require('compression-webpack-plugin')
100 100
101 - webpackConfig.plugins.push(  
102 - new CompressionWebpackPlugin({  
103 - asset: '[path].gz[query]',  
104 - algorithm: 'gzip',  
105 - test: new RegExp(  
106 - '\\.(' +  
107 - config.build.productionGzipExtensions.join('|') +  
108 - ')$'  
109 - ),  
110 - threshold: 10240,  
111 - minRatio: 0.8  
112 - })  
113 - ) 101 + webpackConfig.plugins.push(
  102 + new CompressionWebpackPlugin({
  103 + asset: '[path].gz[query]',
  104 + algorithm: 'gzip',
  105 + test: new RegExp(
  106 + '\\.(' +
  107 + config.build.productionGzipExtensions.join('|') +
  108 + ')$'
  109 + ),
  110 + threshold: 10240,
  111 + minRatio: 0.8
  112 + })
  113 + )
114 } 114 }
115 115
116 if (config.build.bundleAnalyzerReport) { 116 if (config.build.bundleAnalyzerReport) {
117 - var BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin  
118 - webpackConfig.plugins.push(new BundleAnalyzerPlugin()) 117 + var BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
  118 + webpackConfig.plugins.push(new BundleAnalyzerPlugin())
119 } 119 }
120 120
121 module.exports = webpackConfig 121 module.exports = webpackConfig
@@ -2,5 +2,5 @@ var merge = require('webpack-merge') @@ -2,5 +2,5 @@ var merge = require('webpack-merge')
2 var prodEnv = require('./prod.env') 2 var prodEnv = require('./prod.env')
3 3
4 module.exports = merge(prodEnv, { 4 module.exports = merge(prodEnv, {
5 - NODE_ENV: '"development"' 5 + NODE_ENV: '"development"'
6 }) 6 })
@@ -2,46 +2,46 @@ @@ -2,46 +2,46 @@
2 var path = require('path') 2 var path = require('path')
3 3
4 module.exports = { 4 module.exports = {
5 - build: {  
6 - env: require('./prod.env'),  
7 - index: path.resolve(__dirname, '../dist/index.html'),  
8 - assetsRoot: path.resolve(__dirname, '../dist'),  
9 - assetsSubDirectory: 'static',  
10 - assetsPublicPath: './',  
11 - productionSourceMap: true,  
12 - // Gzip off by default as many popular static hosts such as  
13 - // Surge or Netlify already gzip all static assets for you.  
14 - // Before setting to `true`, make sure to:  
15 - // npm install --save-dev compression-webpack-plugin  
16 - productionGzip: false,  
17 - productionGzipExtensions: ['js', 'css'],  
18 - // Run the build command with an extra argument to  
19 - // View the bundle analyzer report after build finishes:  
20 - // `npm run build --report`  
21 - // Set to `true` or `false` to always turn it on or off  
22 - bundleAnalyzerReport: process.env.npm_config_report  
23 - },  
24 - dev: {  
25 - env: require('./dev.env'),  
26 - port: 8001,  
27 - autoOpenBrowser: true,  
28 - assetsSubDirectory: 'static',  
29 - assetsPublicPath: '/',  
30 - proxyTable: {  
31 - '/api':{  
32 - target: 'http://192.168.1.53:12343',//设置你调用的接口域名和端口号 别忘了加http  
33 - // target: 'http://192.168.43.78:12343',//设置你调用的接口域名和端口号 别忘了加http  
34 - changeOrigin: true,  
35 - pathRewrite: {  
36 - '^/api/': '/'//这里理解成用‘/api’代替target里面的地址,后面组件中我们掉接口时直接用api代替 比如我要调用'http://40.00.100.100:3002/user/add',直接写‘/api/user/add’即可  
37 - }  
38 - } 5 + build: {
  6 + env: require('./prod.env'),
  7 + index: path.resolve(__dirname, '../dist/index.html'),
  8 + assetsRoot: path.resolve(__dirname, '../dist'),
  9 + assetsSubDirectory: 'static',
  10 + assetsPublicPath: './',
  11 + productionSourceMap: true,
  12 + // Gzip off by default as many popular static hosts such as
  13 + // Surge or Netlify already gzip all static assets for you.
  14 + // Before setting to `true`, make sure to:
  15 + // npm install --save-dev compression-webpack-plugin
  16 + productionGzip: false,
  17 + productionGzipExtensions: ['js', 'css'],
  18 + // Run the build command with an extra argument to
  19 + // View the bundle analyzer report after build finishes:
  20 + // `npm run build --report`
  21 + // Set to `true` or `false` to always turn it on or off
  22 + bundleAnalyzerReport: process.env.npm_config_report
39 }, 23 },
40 - // CSS Sourcemaps off by default because relative paths are "buggy"  
41 - // with this option, according to the CSS-Loader README  
42 - // (https://github.com/webpack/css-loader#sourcemaps)  
43 - // In our experience, they generally work as expected,  
44 - // just be aware of this issue when enabling this option.  
45 - cssSourceMap: false  
46 - } 24 + dev: {
  25 + env: require('./dev.env'),
  26 + port: 8001,
  27 + autoOpenBrowser: true,
  28 + assetsSubDirectory: 'static',
  29 + assetsPublicPath: '/',
  30 + proxyTable: {
  31 + '/api': {
  32 + target: 'http://192.168.1.53:12343',//设置你调用的接口域名和端口号 别忘了加http
  33 + // target: 'http://192.168.43.78:12343',//设置你调用的接口域名和端口号 别忘了加http
  34 + changeOrigin: true,
  35 + pathRewrite: {
  36 + '^/api/': '/'//这里理解成用‘/api’代替target里面的地址,后面组件中我们掉接口时直接用api代替 比如我要调用'http://40.00.100.100:3002/user/add',直接写‘/api/user/add’即可
  37 + }
  38 + }
  39 + },
  40 + // CSS Sourcemaps off by default because relative paths are "buggy"
  41 + // with this option, according to the CSS-Loader README
  42 + // (https://github.com/webpack/css-loader#sourcemaps)
  43 + // In our experience, they generally work as expected,
  44 + // just be aware of this issue when enabling this option.
  45 + cssSourceMap: false
  46 + }
47 } 47 }
1 module.exports = { 1 module.exports = {
2 - NODE_ENV: '"production"' 2 + NODE_ENV: '"production"'
3 } 3 }
@@ -2,16 +2,16 @@ @@ -2,16 +2,16 @@
2 <html> 2 <html>
3 3
4 <head> 4 <head>
5 - <meta charset="utf-8">  
6 - <title>郑州机场集团水电缴费平台</title>  
7 - <link rel="shortcut icon" type="image/x-icon" href="favicon.ico"> 5 + <meta charset="utf-8">
  6 + <title>郑州机场集团水电缴费平台</title>
  7 + <link rel="shortcut icon" type="image/x-icon" href="favicon.ico">
8 </head> 8 </head>
9 9
10 <body> 10 <body>
11 - <div id="app"> 11 +<div id="app">
12 12
13 - </div>  
14 - <!-- built files will be auto injected --> 13 +</div>
  14 +<!-- built files will be auto injected -->
15 </body> 15 </body>
16 16
17 </html> 17 </html>
1 <template> 1 <template>
2 - <div id="app">  
3 - <transition name="fade" mode="out-in">  
4 - <router-view></router-view>  
5 - </transition>  
6 - </div> 2 + <div id="app">
  3 + <transition name="fade" mode="out-in">
  4 + <router-view></router-view>
  5 + </transition>
  6 + </div>
7 </template> 7 </template>
8 8
9 <script> 9 <script>
10 -export default {  
11 - name: 'app',  
12 - components: {  
13 - }  
14 -} 10 + export default {
  11 + name: 'app',
  12 + components: {}
  13 + }
15 14
16 </script> 15 </script>
17 16
18 <style lang="scss"> 17 <style lang="scss">
19 -body {  
20 - margin: 0px;  
21 - padding: 0px;  
22 - /*background: url(assets/bg1.jpg) center !important;  
23 - background-size: cover;*/  
24 - // background: #1F2D3D;  
25 - font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, SimSun, sans-serif;  
26 - font-size: 14px;  
27 - -webkit-font-smoothing: antialiased;  
28 -} 18 + body {
  19 + margin: 0px;
  20 + padding: 0px;
  21 + /*background: url(assets/bg1.jpg) center !important;
  22 + background-size: cover;*/
  23 + // background: #1F2D3D;
  24 + font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, SimSun, sans-serif;
  25 + font-size: 14px;
  26 + -webkit-font-smoothing: antialiased;
  27 + }
29 28
30 -#app {  
31 - position: absolute;  
32 - top: 0px;  
33 - bottom: 0px;  
34 - width: 100%;  
35 -} 29 + #app {
  30 + position: absolute;
  31 + top: 0px;
  32 + bottom: 0px;
  33 + width: 100%;
  34 + }
36 35
37 -.el-submenu [class^=fa] {  
38 - vertical-align: baseline;  
39 - margin-right: 10px;  
40 -} 36 + .el-submenu [class^=fa] {
  37 + vertical-align: baseline;
  38 + margin-right: 10px;
  39 + }
41 40
42 -.el-menu-item [class^=fa] {  
43 - vertical-align: baseline;  
44 - margin-right: 10px;  
45 -} 41 + .el-menu-item [class^=fa] {
  42 + vertical-align: baseline;
  43 + margin-right: 10px;
  44 + }
46 45
47 -.toolbar {  
48 - background: #f2f2f2;  
49 - padding: 10px;  
50 - //border:1px solid #dfe6ec;  
51 - margin: 10px 0px;  
52 - .el-form-item {  
53 - margin-bottom: 10px;  
54 - }  
55 -} 46 + .toolbar {
  47 + background: #f2f2f2;
  48 + padding: 10px;
  49 + //border:1px solid #dfe6ec;
  50 + margin: 10px 0px;
56 51
57 -.fade-enter-active,  
58 -.fade-leave-active {  
59 - transition: all .2s ease;  
60 -} 52 + .el-form-item {
  53 + margin-bottom: 10px;
  54 + }
  55 + }
61 56
62 -.fade-enter,  
63 -.fade-leave-active {  
64 - opacity: 0;  
65 -} 57 + .fade-enter-active,
  58 + .fade-leave-active {
  59 + transition: all .2s ease;
  60 + }
  61 +
  62 + .fade-enter,
  63 + .fade-leave-active {
  64 + opacity: 0;
  65 + }
66 </style> 66 </style>
@@ -5,54 +5,70 @@ import qs from 'qs' @@ -5,54 +5,70 @@ import qs from 'qs'
5 Vue.prototype.$http = axios; 5 Vue.prototype.$http = axios;
6 6
7 7
8 -export const getuserMenus = params => { return axios.get(`/perm/userMenus`, { params: params }); };  
9 -  
10 -export const getUserList = params => { return axios.get(`/hqpt-user-center/user/list`, { params: params }); };  
11 -  
12 -export const getUserListPage = params => { return axios({  
13 - method: 'GET',  
14 - url: `/user/list`,  
15 - data: params,  
16 - headers: {  
17 - 'Content-Type': 'application/json;charset=UTF-8'  
18 - }  
19 - // withCredentials: true  
20 -}) };  
21 -  
22 -export const removeUser = params => { return axios({  
23 - method: 'DELETE',  
24 - url: `/user/del`,  
25 - data: params,  
26 - headers: {  
27 - 'Content-Type': 'application/json;charset=UTF-8'  
28 - }  
29 -})};  
30 -  
31 -export const batchRemoveUser = params => { return axios.get(`/user/batchremove`, { params: params }); };  
32 -  
33 -export const editUser = params => { return axios({  
34 - method: 'PUT',  
35 - url: `/user/edit`,  
36 - data: params,  
37 - headers: {  
38 - 'Content-Type': 'application/json;charset=UTF-8'  
39 - }  
40 -})};  
41 -  
42 -export const addUser = params => { return axios({  
43 - method: 'POST',  
44 - url: `/user/add`,  
45 - data: params,  
46 - headers: {  
47 - 'Content-Type': 'application/json;charset=UTF-8'  
48 - }  
49 -})};  
50 -  
51 -export const setUserRole = params => { return axios({  
52 - method: 'PUT',  
53 - url: `/user/roleset`,  
54 - data: params,  
55 - headers: {  
56 - 'Content-Type': 'application/json;charset=UTF-8'  
57 - }  
58 -})};  
  8 +export const getuserMenus = params => {
  9 + return axios.get(`/perm/userMenus`, {params: params});
  10 +};
  11 +
  12 +export const getUserList = params => {
  13 + return axios.get(`/hqpt-user-center/user/list`, {params: params});
  14 +};
  15 +
  16 +export const getUserListPage = params => {
  17 + return axios({
  18 + method: 'GET',
  19 + url: `/user/list`,
  20 + data: params,
  21 + headers: {
  22 + 'Content-Type': 'application/json;charset=UTF-8'
  23 + }
  24 + // withCredentials: true
  25 + })
  26 +};
  27 +
  28 +export const removeUser = params => {
  29 + return axios({
  30 + method: 'DELETE',
  31 + url: `/user/del`,
  32 + data: params,
  33 + headers: {
  34 + 'Content-Type': 'application/json;charset=UTF-8'
  35 + }
  36 + })
  37 +};
  38 +
  39 +export const batchRemoveUser = params => {
  40 + return axios.get(`/user/batchremove`, {params: params});
  41 +};
  42 +
  43 +export const editUser = params => {
  44 + return axios({
  45 + method: 'PUT',
  46 + url: `/user/edit`,
  47 + data: params,
  48 + headers: {
  49 + 'Content-Type': 'application/json;charset=UTF-8'
  50 + }
  51 + })
  52 +};
  53 +
  54 +export const addUser = params => {
  55 + return axios({
  56 + method: 'POST',
  57 + url: `/user/add`,
  58 + data: params,
  59 + headers: {
  60 + 'Content-Type': 'application/json;charset=UTF-8'
  61 + }
  62 + })
  63 +};
  64 +
  65 +export const setUserRole = params => {
  66 + return axios({
  67 + method: 'PUT',
  68 + url: `/user/roleset`,
  69 + data: params,
  70 + headers: {
  71 + 'Content-Type': 'application/json;charset=UTF-8'
  72 + }
  73 + })
  74 +};
1 import request from '@/utils/request' 1 import request from '@/utils/request'
2 2
3 export function fetchList(query) { 3 export function fetchList(query) {
4 - return request({  
5 - url: '/article/list',  
6 - method: 'get',  
7 - params: query  
8 - }) 4 + return request({
  5 + url: '/article/list',
  6 + method: 'get',
  7 + params: query
  8 + })
9 } 9 }
10 10
11 export function fetchArticle(id) { 11 export function fetchArticle(id) {
12 - return request({  
13 - url: '/article/detail',  
14 - method: 'get',  
15 - params: { id }  
16 - }) 12 + return request({
  13 + url: '/article/detail',
  14 + method: 'get',
  15 + params: {id}
  16 + })
17 } 17 }
18 18
19 export function fetchPv(pv) { 19 export function fetchPv(pv) {
20 - return request({  
21 - url: '/article/pv',  
22 - method: 'get',  
23 - params: { pv }  
24 - }) 20 + return request({
  21 + url: '/article/pv',
  22 + method: 'get',
  23 + params: {pv}
  24 + })
25 } 25 }
26 26
27 export function createArticle(data) { 27 export function createArticle(data) {
28 - return request({  
29 - url: '/article/create',  
30 - method: 'post',  
31 - data  
32 - }) 28 + return request({
  29 + url: '/article/create',
  30 + method: 'post',
  31 + data
  32 + })
33 } 33 }
34 34
35 export function updateArticle(data) { 35 export function updateArticle(data) {
36 - return request({  
37 - url: '/article/update',  
38 - method: 'post',  
39 - data  
40 - }) 36 + return request({
  37 + url: '/article/update',
  38 + method: 'post',
  39 + data
  40 + })
41 } 41 }
1 const loginuserInfo = JSON.parse(sessionStorage.getItem('user')); 1 const loginuserInfo = JSON.parse(sessionStorage.getItem('user'));
2 -export default loginuserInfo;  
  2 +export default loginuserInfo;
@@ -3,35 +3,45 @@ import axios from 'axios' @@ -3,35 +3,45 @@ import axios from 'axios'
3 let base = '/hqpt-user-center/company'; 3 let base = '/hqpt-user-center/company';
4 4
5 5
6 -export const getList = params => { return axios.get(`${base}/list`, { params: params }); };  
7 -  
8 -  
9 -export const remove = params => { return axios({  
10 - method: 'DELETE',  
11 - url: `${base}/del`,  
12 - data: params,  
13 - headers: {  
14 - 'Content-Type': 'application/json;charset=UTF-8'  
15 - }  
16 -})}; 6 +export const getList = params => {
  7 + return axios.get(`${base}/list`, {params: params});
  8 +};
  9 +
  10 +
  11 +export const remove = params => {
  12 + return axios({
  13 + method: 'DELETE',
  14 + url: `${base}/del`,
  15 + data: params,
  16 + headers: {
  17 + 'Content-Type': 'application/json;charset=UTF-8'
  18 + }
  19 + })
  20 +};
17 21
18 //批量删除 22 //批量删除
19 -export const batchRemove = params => { return axios.get(`${base}/batchremove`, { params: params }); };  
20 -  
21 -export const edit = params => { return axios({  
22 - method: 'PUT',  
23 - url: `${base}/edit`,  
24 - data: params,  
25 - headers: {  
26 - 'Content-Type': 'application/json;charset=UTF-8'  
27 - }  
28 -})};  
29 -  
30 -export const add = params => { return axios({  
31 - method: 'POST',  
32 - url: `${base}/add`,  
33 - data: params,  
34 - headers: {  
35 - 'Content-Type': 'application/json;charset=UTF-8'  
36 - }  
37 -})};  
  23 +export const batchRemove = params => {
  24 + return axios.get(`${base}/batchremove`, {params: params});
  25 +};
  26 +
  27 +export const edit = params => {
  28 + return axios({
  29 + method: 'PUT',
  30 + url: `${base}/edit`,
  31 + data: params,
  32 + headers: {
  33 + 'Content-Type': 'application/json;charset=UTF-8'
  34 + }
  35 + })
  36 +};
  37 +
  38 +export const add = params => {
  39 + return axios({
  40 + method: 'POST',
  41 + url: `${base}/add`,
  42 + data: params,
  43 + headers: {
  44 + 'Content-Type': 'application/json;charset=UTF-8'
  45 + }
  46 + })
  47 +};
@@ -3,35 +3,45 @@ import axios from 'axios' @@ -3,35 +3,45 @@ import axios from 'axios'
3 let base = '/cloud-user-center/department'; 3 let base = '/cloud-user-center/department';
4 4
5 5
6 -export const getList = params => { return axios.get(`${base}/list`, { params: params }); };  
7 -  
8 -  
9 -export const remove = params => { return axios({  
10 - method: 'DELETE',  
11 - url: `${base}/del`,  
12 - data: params,  
13 - headers: {  
14 - 'Content-Type': 'application/json;charset=UTF-8'  
15 - }  
16 -})}; 6 +export const getList = params => {
  7 + return axios.get(`${base}/list`, {params: params});
  8 +};
  9 +
  10 +
  11 +export const remove = params => {
  12 + return axios({
  13 + method: 'DELETE',
  14 + url: `${base}/del`,
  15 + data: params,
  16 + headers: {
  17 + 'Content-Type': 'application/json;charset=UTF-8'
  18 + }
  19 + })
  20 +};
17 21
18 //批量删除 22 //批量删除
19 -export const batchRemove = params => { return axios.get(`${base}/batchremove`, { params: params }); };  
20 -  
21 -export const edit = params => { return axios({  
22 - method: 'PUT',  
23 - url: `${base}/edit`,  
24 - data: params,  
25 - headers: {  
26 - 'Content-Type': 'application/json;charset=UTF-8'  
27 - }  
28 -})};  
29 -  
30 -export const add = params => { return axios({  
31 - method: 'POST',  
32 - url: `${base}/add`,  
33 - data: params,  
34 - headers: {  
35 - 'Content-Type': 'application/json;charset=UTF-8'  
36 - }  
37 -})};  
  23 +export const batchRemove = params => {
  24 + return axios.get(`${base}/batchremove`, {params: params});
  25 +};
  26 +
  27 +export const edit = params => {
  28 + return axios({
  29 + method: 'PUT',
  30 + url: `${base}/edit`,
  31 + data: params,
  32 + headers: {
  33 + 'Content-Type': 'application/json;charset=UTF-8'
  34 + }
  35 + })
  36 +};
  37 +
  38 +export const add = params => {
  39 + return axios({
  40 + method: 'POST',
  41 + url: `${base}/add`,
  42 + data: params,
  43 + headers: {
  44 + 'Content-Type': 'application/json;charset=UTF-8'
  45 + }
  46 + })
  47 +};
@@ -2,26 +2,45 @@ import axios from 'axios' @@ -2,26 +2,45 @@ import axios from 'axios'
2 2
3 let base = 'empt-location/order'; 3 let base = 'empt-location/order';
4 4
5 -export const getOrder = params => { return axios.get(`${base}/list`, { params: params }); }; 5 +export const getOrder = params => {
  6 + return axios.get(`${base}/list`, {params: params});
  7 +};
6 8
7 -export const addOrder=params=>{return http.post(`${base}/add`, params);}; 9 +export const addOrder = params => {
  10 + return http.post(`${base}/add`, params);
  11 +};
8 12
9 // export const ediOrder=params=>{return http.put(`${base}/edi`, params);}; 13 // export const ediOrder=params=>{return http.put(`${base}/edi`, params);};
10 14
11 -export const remove = params => { return axios({  
12 - method: 'DELETE',  
13 - url: `${base}/del`,  
14 - data: params,  
15 - headers: {  
16 - 'Content-Type': 'application/json;charset=UTF-8'  
17 - }  
18 -})}; 15 +export const remove = params => {
  16 + return axios({
  17 + method: 'DELETE',
  18 + url: `${base}/del`,
  19 + data: params,
  20 + headers: {
  21 + 'Content-Type': 'application/json;charset=UTF-8'
  22 + }
  23 + })
  24 +};
19 25
20 -export const ediOrder = params => { return axios({  
21 - method: 'PUT',  
22 - url: `${base}/edi`,  
23 - data: params,  
24 - headers: {  
25 - 'Content-Type': 'application/json;charset=UTF-8'  
26 - }  
27 -})};  
  26 +export const ediOrder = params => {
  27 + return axios({
  28 + method: 'PUT',
  29 + url: `${base}/edi`,
  30 + data: params,
  31 + headers: {
  32 + 'Content-Type': 'application/json;charset=UTF-8'
  33 + }
  34 + })
  35 +};
  36 +
  37 +export const defeatedOrder = params =>{
  38 + return axios({
  39 + method: 'POST',
  40 + url: `${base}/defeatedOrder`,
  41 + data: params,
  42 + headers: {
  43 + 'Content-Type': 'application/json;charset=UTF-8'
  44 + }
  45 + })
  46 +}
@@ -2,4 +2,6 @@ import axios from 'axios' @@ -2,4 +2,6 @@ import axios from 'axios'
2 2
3 let base = 'empt-location/eeInfo'; 3 let base = 'empt-location/eeInfo';
4 4
5 -export const getList = params => { return axios.get(`${base}/list`, { params: params }); };  
  5 +export const getList = params => {
  6 + return axios.get(`${base}/list`, {params: params});
  7 +};
@@ -3,62 +3,78 @@ import axios from 'axios' @@ -3,62 +3,78 @@ import axios from 'axios'
3 let base = 'empt-location/electricity_meter'; 3 let base = 'empt-location/electricity_meter';
4 4
5 5
6 -export const getList = params => { return axios.get(`${base}/list`, { params: params }); }; 6 +export const getList = params => {
  7 + return axios.get(`${base}/list`, {params: params});
  8 +};
7 9
8 10
9 -export const remove = params => { return axios({  
10 - method: 'DELETE',  
11 - url: `${base}/del`,  
12 - data: params,  
13 - headers: {  
14 - 'Content-Type': 'application/json;charset=UTF-8'  
15 - }  
16 -})}; 11 +export const remove = params => {
  12 + return axios({
  13 + method: 'DELETE',
  14 + url: `${base}/del`,
  15 + data: params,
  16 + headers: {
  17 + 'Content-Type': 'application/json;charset=UTF-8'
  18 + }
  19 + })
  20 +};
17 21
18 //批量删除 22 //批量删除
19 -export const batchRemove = params => { return axios.get(`${base}/batchremove`, { params: params }); }; 23 +export const batchRemove = params => {
  24 + return axios.get(`${base}/batchremove`, {params: params});
  25 +};
20 26
21 -export const edit = params => { return axios({  
22 - method: 'PUT',  
23 - url: `${base}/edit`,  
24 - data: params,  
25 - headers: {  
26 - 'Content-Type': 'application/json;charset=UTF-8'  
27 - }  
28 -})}; 27 +export const edit = params => {
  28 + return axios({
  29 + method: 'PUT',
  30 + url: `${base}/edit`,
  31 + data: params,
  32 + headers: {
  33 + 'Content-Type': 'application/json;charset=UTF-8'
  34 + }
  35 + })
  36 +};
29 37
30 -export const add = params => { return axios({  
31 - method: 'POST',  
32 - url: `${base}/add`,  
33 - params: params,  
34 - headers: {  
35 - 'Content-Type': 'application/json;charset=UTF-8'  
36 - }  
37 -})}; 38 +export const add = params => {
  39 + return axios({
  40 + method: 'POST',
  41 + url: `${base}/add`,
  42 + params: params,
  43 + headers: {
  44 + 'Content-Type': 'application/json;charset=UTF-8'
  45 + }
  46 + })
  47 +};
38 48
39 -export const electricityInfo = params => { return axios({  
40 - method: 'POST',  
41 - url: `${base}/getEnergyInfoForRealTime`,  
42 - params: params,  
43 - headers: {  
44 - 'Content-Type': 'application/json;charset=UTF-8'  
45 - }  
46 -})}; 49 +export const electricityInfo = params => {
  50 + return axios({
  51 + method: 'POST',
  52 + url: `${base}/getEnergyInfoForRealTime`,
  53 + params: params,
  54 + headers: {
  55 + 'Content-Type': 'application/json;charset=UTF-8'
  56 + }
  57 + })
  58 +};
47 59
48 -export const getEEModel = params => { return axios({  
49 - method: 'POST',  
50 - url: `${base}/getEEModel`,  
51 - params: params,  
52 - headers: {  
53 - 'Content-Type': 'application/json;charset=UTF-8'  
54 - }  
55 -})}; 60 +export const getEEModel = params => {
  61 + return axios({
  62 + method: 'POST',
  63 + url: `${base}/getEEModel`,
  64 + params: params,
  65 + headers: {
  66 + 'Content-Type': 'application/json;charset=UTF-8'
  67 + }
  68 + })
  69 +};
56 70
57 -export const update = params => { return axios({  
58 - method: 'PUT',  
59 - url: `${base}/update`,  
60 - data: params,  
61 - headers: {  
62 - 'Content-Type': 'application/json;charset=UTF-8'  
63 - }  
64 -})};  
  71 +export const update = params => {
  72 + return axios({
  73 + method: 'PUT',
  74 + url: `${base}/update`,
  75 + data: params,
  76 + headers: {
  77 + 'Content-Type': 'application/json;charset=UTF-8'
  78 + }
  79 + })
  80 +};
@@ -3,44 +3,56 @@ import axios from 'axios' @@ -3,44 +3,56 @@ import axios from 'axios'
3 let base = 'empt-location/location'; 3 let base = 'empt-location/location';
4 4
5 5
6 -export const getList = params => { return axios.get(`${base}/list`, { params: params }); };  
7 -  
8 -  
9 -export const remove = params => { return axios({  
10 - method: 'DELETE',  
11 - url: `${base}/del`,  
12 - data: params,  
13 - headers: {  
14 - 'Content-Type': 'application/json;charset=UTF-8'  
15 - }  
16 -})}; 6 +export const getList = params => {
  7 + return axios.get(`${base}/list`, {params: params});
  8 +};
  9 +
  10 +
  11 +export const remove = params => {
  12 + return axios({
  13 + method: 'DELETE',
  14 + url: `${base}/del`,
  15 + data: params,
  16 + headers: {
  17 + 'Content-Type': 'application/json;charset=UTF-8'
  18 + }
  19 + })
  20 +};
17 21
18 //批量删除 22 //批量删除
19 -export const batchRemove = params => { return axios.get(`${base}/batchremove`, { params: params }); };  
20 -  
21 -export const edit = params => { return axios({  
22 - method: 'PUT',  
23 - url: `${base}/edit`,  
24 - data: params,  
25 - headers: {  
26 - 'Content-Type': 'application/json;charset=UTF-8'  
27 - }  
28 -})};  
29 -  
30 -export const add = params => { return axios({  
31 - method: 'POST',  
32 - url: `${base}/add`,  
33 - params: params,  
34 - headers: {  
35 - 'Content-Type': 'application/json;charset=UTF-8'  
36 - }  
37 -})};  
38 -  
39 -export const update = params => { return axios({  
40 - method: 'PUT',  
41 - url: `${base}/update`,  
42 - data: params,  
43 - headers: {  
44 - 'Content-Type': 'application/json;charset=UTF-8'  
45 - }  
46 -})};  
  23 +export const batchRemove = params => {
  24 + return axios.get(`${base}/batchremove`, {params: params});
  25 +};
  26 +
  27 +export const edit = params => {
  28 + return axios({
  29 + method: 'PUT',
  30 + url: `${base}/edit`,
  31 + data: params,
  32 + headers: {
  33 + 'Content-Type': 'application/json;charset=UTF-8'
  34 + }
  35 + })
  36 +};
  37 +
  38 +export const add = params => {
  39 + return axios({
  40 + method: 'POST',
  41 + url: `${base}/add`,
  42 + params: params,
  43 + headers: {
  44 + 'Content-Type': 'application/json;charset=UTF-8'
  45 + }
  46 + })
  47 +};
  48 +
  49 +export const update = params => {
  50 + return axios({
  51 + method: 'PUT',
  52 + url: `${base}/update`,
  53 + data: params,
  54 + headers: {
  55 + 'Content-Type': 'application/json;charset=UTF-8'
  56 + }
  57 + })
  58 +};
@@ -3,53 +3,67 @@ import axios from 'axios' @@ -3,53 +3,67 @@ import axios from 'axios'
3 let base = 'empt-location/userPayOrder'; 3 let base = 'empt-location/userPayOrder';
4 4
5 5
6 -export const getList = params => { return axios.get(`${base}/list`, { params: params }); }; 6 +export const getList = params => {
  7 + return axios.get(`${base}/list`, {params: params});
  8 +};
7 9
8 10
9 -export const remove = params => { return axios({  
10 - method: 'DELETE',  
11 - url: `${base}/del`,  
12 - data: params,  
13 - headers: {  
14 - 'Content-Type': 'application/json;charset=UTF-8'  
15 - }  
16 -})}; 11 +export const remove = params => {
  12 + return axios({
  13 + method: 'DELETE',
  14 + url: `${base}/del`,
  15 + data: params,
  16 + headers: {
  17 + 'Content-Type': 'application/json;charset=UTF-8'
  18 + }
  19 + })
  20 +};
17 21
18 //批量删除 22 //批量删除
19 -export const batchRemove = params => { return axios.get(`${base}/batchremove`, { params: params }); };  
20 -  
21 -export const edit = params => { return axios({  
22 - method: 'PUT',  
23 - url: `${base}/edit`,  
24 - data: params,  
25 - headers: {  
26 - 'Content-Type': 'application/json;charset=UTF-8'  
27 - }  
28 -})};  
29 -  
30 -export const add = params => { return axios({  
31 - method: 'POST',  
32 - url: `${base}/add`,  
33 - params: params,  
34 - headers: {  
35 - 'Content-Type': 'application/json;charset=UTF-8'  
36 - }  
37 -})};  
38 -  
39 -export const qrCode = params => { return axios({  
40 - method: 'POST',  
41 - url: `${base}/qrCode`,  
42 - params: params,  
43 - headers: {  
44 - 'Content-Type': 'application/json;charset=UTF-8'  
45 - }  
46 -})};  
47 -  
48 -export const update = params => { return axios({  
49 - method: 'PUT',  
50 - url: `${base}/update`,  
51 - data: params,  
52 - headers: {  
53 - 'Content-Type': 'application/json;charset=UTF-8'  
54 - }  
55 -})};  
  23 +export const batchRemove = params => {
  24 + return axios.get(`${base}/batchremove`, {params: params});
  25 +};
  26 +
  27 +export const edit = params => {
  28 + return axios({
  29 + method: 'PUT',
  30 + url: `${base}/edit`,
  31 + data: params,
  32 + headers: {
  33 + 'Content-Type': 'application/json;charset=UTF-8'
  34 + }
  35 + })
  36 +};
  37 +
  38 +export const add = params => {
  39 + return axios({
  40 + method: 'POST',
  41 + url: `${base}/add`,
  42 + params: params,
  43 + headers: {
  44 + 'Content-Type': 'application/json;charset=UTF-8'
  45 + }
  46 + })
  47 +};
  48 +
  49 +export const qrCode = params => {
  50 + return axios({
  51 + method: 'POST',
  52 + url: `${base}/qrCode`,
  53 + params: params,
  54 + headers: {
  55 + 'Content-Type': 'application/json;charset=UTF-8'
  56 + }
  57 + })
  58 +};
  59 +
  60 +export const update = params => {
  61 + return axios({
  62 + method: 'PUT',
  63 + url: `${base}/update`,
  64 + data: params,
  65 + headers: {
  66 + 'Content-Type': 'application/json;charset=UTF-8'
  67 + }
  68 + })
  69 +};
@@ -3,55 +3,71 @@ import axios from 'axios' @@ -3,55 +3,71 @@ import axios from 'axios'
3 let base = 'empt-location/water_meter'; 3 let base = 'empt-location/water_meter';
4 4
5 5
6 -export const getList = params => { return axios.get(`${base}/selectAll`, { params: params }); }; 6 +export const getList = params => {
  7 + return axios.get(`${base}/selectAll`, {params: params});
  8 +};
7 9
8 -export const waterMeterAll = params => { return axios.get(`${base}/waterMeterAll`, { params: params }); }; 10 +export const waterMeterAll = params => {
  11 + return axios.get(`${base}/waterMeterAll`, {params: params});
  12 +};
9 13
10 14
11 -export const remove = params => { return axios({  
12 - method: 'DELETE',  
13 - url: `${base}/del`,  
14 - data: params,  
15 - headers: {  
16 - 'Content-Type': 'application/json;charset=UTF-8'  
17 - }  
18 -})}; 15 +export const remove = params => {
  16 + return axios({
  17 + method: 'DELETE',
  18 + url: `${base}/del`,
  19 + data: params,
  20 + headers: {
  21 + 'Content-Type': 'application/json;charset=UTF-8'
  22 + }
  23 + })
  24 +};
19 25
20 //批量删除 26 //批量删除
21 -export const batchRemove = params => { return axios.get(`${base}/batchremove`, { params: params }); };  
22 -  
23 -export const edit = params => { return axios({  
24 - method: 'PUT',  
25 - url: `${base}/edit`,  
26 - data: params,  
27 - headers: {  
28 - 'Content-Type': 'application/json;charset=UTF-8'  
29 - }  
30 -})};  
31 -  
32 -export const add = params => { return axios({  
33 - method: 'POST',  
34 - url: `${base}/add`,  
35 - params: params,  
36 - headers: {  
37 - 'Content-Type': 'application/json;charset=UTF-8'  
38 - }  
39 -})};  
40 -  
41 -export const findRealTime = params => { return axios({  
42 - method: 'POST',  
43 - url: `${base}/findRealTime`,  
44 - params: params,  
45 - headers: {  
46 - 'Content-Type': 'application/json;charset=UTF-8'  
47 - }  
48 -})};  
49 -  
50 -export const update = params => { return axios({  
51 - method: 'PUT',  
52 - url: `${base}/update`,  
53 - data: params,  
54 - headers: {  
55 - 'Content-Type': 'application/json;charset=UTF-8'  
56 - }  
57 -})};  
  27 +export const batchRemove = params => {
  28 + return axios.get(`${base}/batchremove`, {params: params});
  29 +};
  30 +
  31 +export const edit = params => {
  32 + return axios({
  33 + method: 'PUT',
  34 + url: `${base}/edit`,
  35 + data: params,
  36 + headers: {
  37 + 'Content-Type': 'application/json;charset=UTF-8'
  38 + }
  39 + })
  40 +};
  41 +
  42 +export const add = params => {
  43 + return axios({
  44 + method: 'POST',
  45 + url: `${base}/add`,
  46 + params: params,
  47 + headers: {
  48 + 'Content-Type': 'application/json;charset=UTF-8'
  49 + }
  50 + })
  51 +};
  52 +
  53 +export const findRealTime = params => {
  54 + return axios({
  55 + method: 'POST',
  56 + url: `${base}/findRealTime`,
  57 + params: params,
  58 + headers: {
  59 + 'Content-Type': 'application/json;charset=UTF-8'
  60 + }
  61 + })
  62 +};
  63 +
  64 +export const update = params => {
  65 + return axios({
  66 + method: 'PUT',
  67 + url: `${base}/update`,
  68 + data: params,
  69 + headers: {
  70 + 'Content-Type': 'application/json;charset=UTF-8'
  71 + }
  72 + })
  73 +};
@@ -3,35 +3,45 @@ import axios from 'axios' @@ -3,35 +3,45 @@ import axios from 'axios'
3 let base = '/hqpt-user-center/group'; 3 let base = '/hqpt-user-center/group';
4 4
5 5
6 -export const getList = params => { return axios.get(`${base}/list`, { params: params }); };  
7 -  
8 -  
9 -export const remove = params => { return axios({  
10 - method: 'DELETE',  
11 - url: `${base}/del`,  
12 - data: params,  
13 - headers: {  
14 - 'Content-Type': 'application/json;charset=UTF-8'  
15 - }  
16 -})}; 6 +export const getList = params => {
  7 + return axios.get(`${base}/list`, {params: params});
  8 +};
  9 +
  10 +
  11 +export const remove = params => {
  12 + return axios({
  13 + method: 'DELETE',
  14 + url: `${base}/del`,
  15 + data: params,
  16 + headers: {
  17 + 'Content-Type': 'application/json;charset=UTF-8'
  18 + }
  19 + })
  20 +};
17 21
18 //批量删除 22 //批量删除
19 -export const batchRemove = params => { return axios.get(`${base}/batchremove`, { params: params }); };  
20 -  
21 -export const edit = params => { return axios({  
22 - method: 'PUT',  
23 - url: `${base}/edit`,  
24 - data: params,  
25 - headers: {  
26 - 'Content-Type': 'application/json;charset=UTF-8'  
27 - }  
28 -})};  
29 -  
30 -export const add = params => { return axios({  
31 - method: 'POST',  
32 - url: `${base}/add`,  
33 - data: params,  
34 - headers: {  
35 - 'Content-Type': 'application/json;charset=UTF-8'  
36 - }  
37 -})};  
  23 +export const batchRemove = params => {
  24 + return axios.get(`${base}/batchremove`, {params: params});
  25 +};
  26 +
  27 +export const edit = params => {
  28 + return axios({
  29 + method: 'PUT',
  30 + url: `${base}/edit`,
  31 + data: params,
  32 + headers: {
  33 + 'Content-Type': 'application/json;charset=UTF-8'
  34 + }
  35 + })
  36 +};
  37 +
  38 +export const add = params => {
  39 + return axios({
  40 + method: 'POST',
  41 + url: `${base}/add`,
  42 + data: params,
  43 + headers: {
  44 + 'Content-Type': 'application/json;charset=UTF-8'
  45 + }
  46 + })
  47 +};
@@ -17,13 +17,13 @@ export default { @@ -17,13 +17,13 @@ export default {
17 return axios({ 17 return axios({
18 method: 'GET', 18 method: 'GET',
19 url: url, 19 url: url,
20 - params: params, 20 + params: params,
21 headers: { 21 headers: {
22 'Content-Type': 'application/x-www-form-urlencoded' 22 'Content-Type': 'application/x-www-form-urlencoded'
23 } 23 }
24 }); 24 });
25 }, 25 },
26 - put(url, params){ 26 + put(url, params) {
27 return axios({ 27 return axios({
28 method: 'PUT', 28 method: 'PUT',
29 url: url, 29 url: url,
@@ -33,7 +33,7 @@ export default { @@ -33,7 +33,7 @@ export default {
33 } 33 }
34 }) 34 })
35 }, 35 },
36 - del: (url,params) => { 36 + del: (url, params) => {
37 return axios({ 37 return axios({
38 method: 'DELETE', 38 method: 'DELETE',
39 url: url, 39 url: url,
@@ -43,7 +43,7 @@ export default { @@ -43,7 +43,7 @@ export default {
43 } 43 }
44 }) 44 })
45 }, 45 },
46 - login: data =>{ 46 + login: data => {
47 return axios({ 47 return axios({
48 method: 'POST', // 请求协议 48 method: 'POST', // 请求协议
49 url: 'cloud-user-center/login', // 请求的地址 49 url: 'cloud-user-center/login', // 请求的地址
@@ -3,44 +3,56 @@ import axios from 'axios' @@ -3,44 +3,56 @@ import axios from 'axios'
3 let base = 'hqpt-process/job'; 3 let base = 'hqpt-process/job';
4 4
5 5
6 -export const getList = params => { return axios.get(`${base}/list`, { params: params }); };  
7 -  
8 -  
9 -export const remove = params => { return axios({  
10 - method: 'DELETE',  
11 - url: `${base}/del`,  
12 - data: params,  
13 - headers: {  
14 - 'Content-Type': 'application/json;charset=UTF-8'  
15 - }  
16 -})}; 6 +export const getList = params => {
  7 + return axios.get(`${base}/list`, {params: params});
  8 +};
  9 +
  10 +
  11 +export const remove = params => {
  12 + return axios({
  13 + method: 'DELETE',
  14 + url: `${base}/del`,
  15 + data: params,
  16 + headers: {
  17 + 'Content-Type': 'application/json;charset=UTF-8'
  18 + }
  19 + })
  20 +};
17 21
18 //批量删除 22 //批量删除
19 -export const batchRemove = params => { return axios.get(`${base}/batchremove`, { params: params }); };  
20 -  
21 -export const edit = params => { return axios({  
22 - method: 'PUT',  
23 - url: `${base}/edit`,  
24 - data: params,  
25 - headers: {  
26 - 'Content-Type': 'application/json;charset=UTF-8'  
27 - }  
28 -})};  
29 -  
30 -export const add = params => { return axios({  
31 - method: 'POST',  
32 - url: `${base}/add`,  
33 - params: params,  
34 - headers: {  
35 - 'Content-Type': 'application/json;charset=UTF-8'  
36 - }  
37 -})};  
38 -  
39 -export const startJob = params => { return axios({  
40 - method: 'PUT',  
41 - url: `${base}/start`,  
42 - data: params,  
43 - headers: {  
44 - 'Content-Type': 'application/json;charset=UTF-8'  
45 - }  
46 -})};  
  23 +export const batchRemove = params => {
  24 + return axios.get(`${base}/batchremove`, {params: params});
  25 +};
  26 +
  27 +export const edit = params => {
  28 + return axios({
  29 + method: 'PUT',
  30 + url: `${base}/edit`,
  31 + data: params,
  32 + headers: {
  33 + 'Content-Type': 'application/json;charset=UTF-8'
  34 + }
  35 + })
  36 +};
  37 +
  38 +export const add = params => {
  39 + return axios({
  40 + method: 'POST',
  41 + url: `${base}/add`,
  42 + params: params,
  43 + headers: {
  44 + 'Content-Type': 'application/json;charset=UTF-8'
  45 + }
  46 + })
  47 +};
  48 +
  49 +export const startJob = params => {
  50 + return axios({
  51 + method: 'PUT',
  52 + url: `${base}/start`,
  53 + data: params,
  54 + headers: {
  55 + 'Content-Type': 'application/json;charset=UTF-8'
  56 + }
  57 + })
  58 +};
@@ -3,4 +3,6 @@ import axios from 'axios' @@ -3,4 +3,6 @@ import axios from 'axios'
3 let base = '/cloud-user-center/system/log'; 3 let base = '/cloud-user-center/system/log';
4 4
5 5
6 -export const getList = params => { return axios.get(`${base}/list`, { params: params }); };  
  6 +export const getList = params => {
  7 + return axios.get(`${base}/list`, {params: params});
  8 +};
@@ -3,35 +3,45 @@ import axios from 'axios' @@ -3,35 +3,45 @@ import axios from 'axios'
3 let base = '/cloud-user-center/perm'; 3 let base = '/cloud-user-center/perm';
4 4
5 5
6 -export const getList = params => { return axios.get(`${base}/list`, { params: params }); };  
7 -  
8 -  
9 -export const remove = params => { return axios({  
10 - method: 'DELETE',  
11 - url: `${base}/del`,  
12 - data: params,  
13 - headers: {  
14 - 'Content-Type': 'application/json;charset=UTF-8'  
15 - }  
16 -})}; 6 +export const getList = params => {
  7 + return axios.get(`${base}/list`, {params: params});
  8 +};
  9 +
  10 +
  11 +export const remove = params => {
  12 + return axios({
  13 + method: 'DELETE',
  14 + url: `${base}/del`,
  15 + data: params,
  16 + headers: {
  17 + 'Content-Type': 'application/json;charset=UTF-8'
  18 + }
  19 + })
  20 +};
17 21
18 //批量删除 22 //批量删除
19 -export const batchRemove = params => { return axios.get(`${base}/user/batchremove`, { params: params }); };  
20 -  
21 -export const edit = params => { return axios({  
22 - method: 'PUT',  
23 - url: `${base}/edit`,  
24 - data: params,  
25 - headers: {  
26 - 'Content-Type': 'application/json;charset=UTF-8'  
27 - }  
28 -})};  
29 -  
30 -export const add = params => { return axios({  
31 - method: 'POST',  
32 - url: `${base}/add`,  
33 - data: params,  
34 - headers: {  
35 - 'Content-Type': 'application/json;charset=UTF-8'  
36 - }  
37 -})};  
  23 +export const batchRemove = params => {
  24 + return axios.get(`${base}/user/batchremove`, {params: params});
  25 +};
  26 +
  27 +export const edit = params => {
  28 + return axios({
  29 + method: 'PUT',
  30 + url: `${base}/edit`,
  31 + data: params,
  32 + headers: {
  33 + 'Content-Type': 'application/json;charset=UTF-8'
  34 + }
  35 + })
  36 +};
  37 +
  38 +export const add = params => {
  39 + return axios({
  40 + method: 'POST',
  41 + url: `${base}/add`,
  42 + data: params,
  43 + headers: {
  44 + 'Content-Type': 'application/json;charset=UTF-8'
  45 + }
  46 + })
  47 +};
@@ -3,47 +3,59 @@ import axios from 'axios' @@ -3,47 +3,59 @@ import axios from 'axios'
3 let base = 'hqpt-process/process'; 3 let base = 'hqpt-process/process';
4 4
5 5
6 -export const getList = params => { return axios.get(`${base}/list`, { params: params }); }; 6 +export const getList = params => {
  7 + return axios.get(`${base}/list`, {params: params});
  8 +};
7 9
8 10
9 -export const remove = params => { return axios({  
10 - method: 'DELETE',  
11 - url: `${base}/del`,  
12 - data: params,  
13 - headers: {  
14 - 'Content-Type': 'application/json;charset=UTF-8'  
15 - }  
16 -})}; 11 +export const remove = params => {
  12 + return axios({
  13 + method: 'DELETE',
  14 + url: `${base}/del`,
  15 + data: params,
  16 + headers: {
  17 + 'Content-Type': 'application/json;charset=UTF-8'
  18 + }
  19 + })
  20 +};
17 21
18 //批量删除 22 //批量删除
19 -export const batchRemove = params => { return axios.get(`${base}/batchremove`, { params: params }); };  
20 -  
21 -export const edit = params => { return axios({  
22 - method: 'PUT',  
23 - url: `${base}/edit`,  
24 - data: params,  
25 - headers: {  
26 - 'Content-Type': 'application/json;charset=UTF-8'  
27 - }  
28 -})};  
29 -  
30 -export const add = params => { return axios({  
31 - method: 'POST',  
32 - url: `${base}/add`,  
33 - params: params,  
34 - headers: {  
35 - 'Content-Type': 'application/json;charset=UTF-8'  
36 - }  
37 -})};  
38 -  
39 -export const updateRolePerm = params => { return axios({  
40 - method: 'PUT',  
41 - url: `${base}/permSet`,  
42 - data: params,  
43 - headers: {  
44 - 'Content-Type': 'application/json;charset=UTF-8'  
45 - }  
46 -})}; 23 +export const batchRemove = params => {
  24 + return axios.get(`${base}/batchremove`, {params: params});
  25 +};
  26 +
  27 +export const edit = params => {
  28 + return axios({
  29 + method: 'PUT',
  30 + url: `${base}/edit`,
  31 + data: params,
  32 + headers: {
  33 + 'Content-Type': 'application/json;charset=UTF-8'
  34 + }
  35 + })
  36 +};
  37 +
  38 +export const add = params => {
  39 + return axios({
  40 + method: 'POST',
  41 + url: `${base}/add`,
  42 + params: params,
  43 + headers: {
  44 + 'Content-Type': 'application/json;charset=UTF-8'
  45 + }
  46 + })
  47 +};
  48 +
  49 +export const updateRolePerm = params => {
  50 + return axios({
  51 + method: 'PUT',
  52 + url: `${base}/permSet`,
  53 + data: params,
  54 + headers: {
  55 + 'Content-Type': 'application/json;charset=UTF-8'
  56 + }
  57 + })
  58 +};
47 59
48 export const vacationTypeOptions = [ 60 export const vacationTypeOptions = [
49 { 61 {
@@ -3,44 +3,56 @@ import axios from 'axios' @@ -3,44 +3,56 @@ import axios from 'axios'
3 let base = '/cloud-user-center/role'; 3 let base = '/cloud-user-center/role';
4 4
5 5
6 -export const getList = params => { return axios.get(`${base}/list`, { params: params }); };  
7 -  
8 -  
9 -export const remove = params => { return axios({  
10 - method: 'DELETE',  
11 - url: `${base}/del`,  
12 - data: params,  
13 - headers: {  
14 - 'Content-Type': 'application/json;charset=UTF-8'  
15 - }  
16 -})}; 6 +export const getList = params => {
  7 + return axios.get(`${base}/list`, {params: params});
  8 +};
  9 +
  10 +
  11 +export const remove = params => {
  12 + return axios({
  13 + method: 'DELETE',
  14 + url: `${base}/del`,
  15 + data: params,
  16 + headers: {
  17 + 'Content-Type': 'application/json;charset=UTF-8'
  18 + }
  19 + })
  20 +};
17 21
18 //批量删除 22 //批量删除
19 -export const batchRemove = params => { return axios.get(`${base}/batchremove`, { params: params }); };  
20 -  
21 -export const edit = params => { return axios({  
22 - method: 'PUT',  
23 - url: `${base}/edit`,  
24 - data: params,  
25 - headers: {  
26 - 'Content-Type': 'application/json;charset=UTF-8'  
27 - }  
28 -})};  
29 -  
30 -export const add = params => { return axios({  
31 - method: 'POST',  
32 - url: `${base}/add`,  
33 - data: params,  
34 - headers: {  
35 - 'Content-Type': 'application/json;charset=UTF-8'  
36 - }  
37 -})};  
38 -  
39 -export const updateRolePerm = params => { return axios({  
40 - method: 'PUT',  
41 - url: `${base}/permSet`,  
42 - data: params,  
43 - headers: {  
44 - 'Content-Type': 'application/json;charset=UTF-8'  
45 - }  
46 -})};  
  23 +export const batchRemove = params => {
  24 + return axios.get(`${base}/batchremove`, {params: params});
  25 +};
  26 +
  27 +export const edit = params => {
  28 + return axios({
  29 + method: 'PUT',
  30 + url: `${base}/edit`,
  31 + data: params,
  32 + headers: {
  33 + 'Content-Type': 'application/json;charset=UTF-8'
  34 + }
  35 + })
  36 +};
  37 +
  38 +export const add = params => {
  39 + return axios({
  40 + method: 'POST',
  41 + url: `${base}/add`,
  42 + data: params,
  43 + headers: {
  44 + 'Content-Type': 'application/json;charset=UTF-8'
  45 + }
  46 + })
  47 +};
  48 +
  49 +export const updateRolePerm = params => {
  50 + return axios({
  51 + method: 'PUT',
  52 + url: `${base}/permSet`,
  53 + data: params,
  54 + headers: {
  55 + 'Content-Type': 'application/json;charset=UTF-8'
  56 + }
  57 + })
  58 +};
@@ -3,9 +3,9 @@ let setIntervalWesocketPush = null @@ -3,9 +3,9 @@ let setIntervalWesocketPush = null
3 3
4 /**建立连接 */ 4 /**建立连接 */
5 export function createSocket() { 5 export function createSocket() {
6 - var socketUrl="http://localhost:10003/imserver";  
7 - // var socketUrl="http://218.28.199.138:10003/imserver";  
8 - socketUrl=socketUrl.replace("https","ws").replace("http","ws"); 6 + // var socketUrl="http://localhost:10003/imserver";
  7 + var socketUrl = "http://218.28.199.138:10003/imserver";
  8 + socketUrl = socketUrl.replace("https", "ws").replace("http", "ws");
9 9
10 console.log(socketUrl); 10 console.log(socketUrl);
11 if (!Socket) { 11 if (!Socket) {
@@ -19,16 +19,19 @@ export function createSocket() { @@ -19,16 +19,19 @@ export function createSocket() {
19 console.log('websocket已连接') 19 console.log('websocket已连接')
20 } 20 }
21 } 21 }
  22 +
22 /**打开WS之后发送心跳 */ 23 /**打开WS之后发送心跳 */
23 export function onopenWS() { 24 export function onopenWS() {
24 sendPing() //发送心跳 25 sendPing() //发送心跳
25 } 26 }
  27 +
26 /**连接失败重连 */ 28 /**连接失败重连 */
27 export function onerrorWS() { 29 export function onerrorWS() {
28 clearInterval(setIntervalWesocketPush) 30 clearInterval(setIntervalWesocketPush)
29 Socket.close() 31 Socket.close()
30 createSocket() //重连 32 createSocket() //重连
31 } 33 }
  34 +
32 /**WS数据接收统一处理 */ 35 /**WS数据接收统一处理 */
33 export function onmessageWS(e) { 36 export function onmessageWS(e) {
34 console.log(e.data); 37 console.log(e.data);
@@ -38,6 +41,7 @@ export function onmessageWS(e) { @@ -38,6 +41,7 @@ export function onmessageWS(e) {
38 } 41 }
39 })) 42 }))
40 } 43 }
  44 +
41 /**发送数据 45 /**发送数据
42 * @param eventType 46 * @param eventType
43 */ 47 */
@@ -58,11 +62,13 @@ export function sendWSPush(eventTypeArr) { @@ -58,11 +62,13 @@ export function sendWSPush(eventTypeArr) {
58 }, 3000) 62 }, 3000)
59 } 63 }
60 } 64 }
  65 +
61 /**关闭WS */ 66 /**关闭WS */
62 export function oncloseWS() { 67 export function oncloseWS() {
63 clearInterval(setIntervalWesocketPush) 68 clearInterval(setIntervalWesocketPush)
64 console.log('websocket已断开') 69 console.log('websocket已断开')
65 } 70 }
  71 +
66 /**发送心跳 */ 72 /**发送心跳 */
67 export function sendPing() { 73 export function sendPing() {
68 Socket.send('ping') 74 Socket.send('ping')
@@ -3,36 +3,45 @@ import axios from 'axios' @@ -3,36 +3,45 @@ import axios from 'axios'
3 let base = '/hqpt-user-center/come_car'; 3 let base = '/hqpt-user-center/come_car';
4 4
5 5
6 -  
7 -export const getList = params => { return axios.get(`${base}/list`, { params: params }); };  
8 -  
9 -  
10 -export const remove = params => { return axios({  
11 - method: 'DELETE',  
12 - url: `${base}/del`,  
13 - data: params,  
14 - headers: {  
15 - 'Content-Type': 'application/json;charset=UTF-8'  
16 - }  
17 -})}; 6 +export const getList = params => {
  7 + return axios.get(`${base}/list`, {params: params});
  8 +};
  9 +
  10 +
  11 +export const remove = params => {
  12 + return axios({
  13 + method: 'DELETE',
  14 + url: `${base}/del`,
  15 + data: params,
  16 + headers: {
  17 + 'Content-Type': 'application/json;charset=UTF-8'
  18 + }
  19 + })
  20 +};
18 21
19 //批量删除 22 //批量删除
20 -export const batchRemove = params => { return axios.get(`${base}/batchremove`, { params: params }); };  
21 -  
22 -export const edit = params => { return axios({  
23 - method: 'PUT',  
24 - url: `${base}/edit`,  
25 - data: params,  
26 - headers: {  
27 - 'Content-Type': 'application/json;charset=UTF-8'  
28 - }  
29 -})};  
30 -  
31 -export const add = params => { return axios({  
32 - method: 'POST',  
33 - url: `${base}/add`,  
34 - data: params,  
35 - headers: {  
36 - 'Content-Type': 'application/json;charset=UTF-8'  
37 - }  
38 -})};  
  23 +export const batchRemove = params => {
  24 + return axios.get(`${base}/batchremove`, {params: params});
  25 +};
  26 +
  27 +export const edit = params => {
  28 + return axios({
  29 + method: 'PUT',
  30 + url: `${base}/edit`,
  31 + data: params,
  32 + headers: {
  33 + 'Content-Type': 'application/json;charset=UTF-8'
  34 + }
  35 + })
  36 +};
  37 +
  38 +export const add = params => {
  39 + return axios({
  40 + method: 'POST',
  41 + url: `${base}/add`,
  42 + data: params,
  43 + headers: {
  44 + 'Content-Type': 'application/json;charset=UTF-8'
  45 + }
  46 + })
  47 +};
@@ -3,36 +3,45 @@ import axios from 'axios' @@ -3,36 +3,45 @@ import axios from 'axios'
3 let base = '/hqpt-user-center/key'; 3 let base = '/hqpt-user-center/key';
4 4
5 5
6 -  
7 -export const getList = params => { return axios.get(`${base}/list`, { params: params }); };  
8 -  
9 -  
10 -export const remove = params => { return axios({  
11 - method: 'DELETE',  
12 - url: `${base}/del`,  
13 - data: params,  
14 - headers: {  
15 - 'Content-Type': 'application/json;charset=UTF-8'  
16 - }  
17 -})}; 6 +export const getList = params => {
  7 + return axios.get(`${base}/list`, {params: params});
  8 +};
  9 +
  10 +
  11 +export const remove = params => {
  12 + return axios({
  13 + method: 'DELETE',
  14 + url: `${base}/del`,
  15 + data: params,
  16 + headers: {
  17 + 'Content-Type': 'application/json;charset=UTF-8'
  18 + }
  19 + })
  20 +};
18 21
19 //批量删除 22 //批量删除
20 -export const batchRemove = params => { return axios.get(`${base}/batchremove`, { params: params }); };  
21 -  
22 -export const edit = params => { return axios({  
23 - method: 'PUT',  
24 - url: `${base}/edit`,  
25 - data: params,  
26 - headers: {  
27 - 'Content-Type': 'application/json;charset=UTF-8'  
28 - }  
29 -})};  
30 -  
31 -export const add = params => { return axios({  
32 - method: 'POST',  
33 - url: `${base}/add`,  
34 - data: params,  
35 - headers: {  
36 - 'Content-Type': 'application/json;charset=UTF-8'  
37 - }  
38 -})};  
  23 +export const batchRemove = params => {
  24 + return axios.get(`${base}/batchremove`, {params: params});
  25 +};
  26 +
  27 +export const edit = params => {
  28 + return axios({
  29 + method: 'PUT',
  30 + url: `${base}/edit`,
  31 + data: params,
  32 + headers: {
  33 + 'Content-Type': 'application/json;charset=UTF-8'
  34 + }
  35 + })
  36 +};
  37 +
  38 +export const add = params => {
  39 + return axios({
  40 + method: 'POST',
  41 + url: `${base}/add`,
  42 + data: params,
  43 + headers: {
  44 + 'Content-Type': 'application/json;charset=UTF-8'
  45 + }
  46 + })
  47 +};
@@ -3,36 +3,45 @@ import axios from 'axios' @@ -3,36 +3,45 @@ import axios from 'axios'
3 let base = '/hqpt-user-center/maintain'; 3 let base = '/hqpt-user-center/maintain';
4 4
5 5
6 -  
7 -export const getList = params => { return axios.get(`${base}/list`, { params: params }); };  
8 -  
9 -  
10 -export const remove = params => { return axios({  
11 - method: 'DELETE',  
12 - url: `${base}/del`,  
13 - data: params,  
14 - headers: {  
15 - 'Content-Type': 'application/json;charset=UTF-8'  
16 - }  
17 -})}; 6 +export const getList = params => {
  7 + return axios.get(`${base}/list`, {params: params});
  8 +};
  9 +
  10 +
  11 +export const remove = params => {
  12 + return axios({
  13 + method: 'DELETE',
  14 + url: `${base}/del`,
  15 + data: params,
  16 + headers: {
  17 + 'Content-Type': 'application/json;charset=UTF-8'
  18 + }
  19 + })
  20 +};
18 21
19 //批量删除 22 //批量删除
20 -export const batchRemove = params => { return axios.get(`${base}/batchremove`, { params: params }); };  
21 -  
22 -export const edit = params => { return axios({  
23 - method: 'PUT',  
24 - url: `${base}/edit`,  
25 - data: params,  
26 - headers: {  
27 - 'Content-Type': 'application/json;charset=UTF-8'  
28 - }  
29 -})};  
30 -  
31 -export const add = params => { return axios({  
32 - method: 'POST',  
33 - url: `${base}/add`,  
34 - data: params,  
35 - headers: {  
36 - 'Content-Type': 'application/json;charset=UTF-8'  
37 - }  
38 -})};  
  23 +export const batchRemove = params => {
  24 + return axios.get(`${base}/batchremove`, {params: params});
  25 +};
  26 +
  27 +export const edit = params => {
  28 + return axios({
  29 + method: 'PUT',
  30 + url: `${base}/edit`,
  31 + data: params,
  32 + headers: {
  33 + 'Content-Type': 'application/json;charset=UTF-8'
  34 + }
  35 + })
  36 +};
  37 +
  38 +export const add = params => {
  39 + return axios({
  40 + method: 'POST',
  41 + url: `${base}/add`,
  42 + data: params,
  43 + headers: {
  44 + 'Content-Type': 'application/json;charset=UTF-8'
  45 + }
  46 + })
  47 +};
@@ -3,36 +3,45 @@ import axios from 'axios' @@ -3,36 +3,45 @@ import axios from 'axios'
3 let base = '/hqpt-user-center/on_duty'; 3 let base = '/hqpt-user-center/on_duty';
4 4
5 5
6 -  
7 -export const getList = params => { return axios.get(`${base}/list`, { params: params }); };  
8 -  
9 -  
10 -export const remove = params => { return axios({  
11 - method: 'DELETE',  
12 - url: `${base}/del`,  
13 - data: params,  
14 - headers: {  
15 - 'Content-Type': 'application/json;charset=UTF-8'  
16 - }  
17 -})}; 6 +export const getList = params => {
  7 + return axios.get(`${base}/list`, {params: params});
  8 +};
  9 +
  10 +
  11 +export const remove = params => {
  12 + return axios({
  13 + method: 'DELETE',
  14 + url: `${base}/del`,
  15 + data: params,
  16 + headers: {
  17 + 'Content-Type': 'application/json;charset=UTF-8'
  18 + }
  19 + })
  20 +};
18 21
19 //批量删除 22 //批量删除
20 -export const batchRemove = params => { return axios.get(`${base}/batchremove`, { params: params }); };  
21 -  
22 -export const edit = params => { return axios({  
23 - method: 'PUT',  
24 - url: `${base}/edit`,  
25 - data: params,  
26 - headers: {  
27 - 'Content-Type': 'application/json;charset=UTF-8'  
28 - }  
29 -})};  
30 -  
31 -export const add = params => { return axios({  
32 - method: 'POST',  
33 - url: `${base}/add`,  
34 - data: params,  
35 - headers: {  
36 - 'Content-Type': 'application/json;charset=UTF-8'  
37 - }  
38 -})};  
  23 +export const batchRemove = params => {
  24 + return axios.get(`${base}/batchremove`, {params: params});
  25 +};
  26 +
  27 +export const edit = params => {
  28 + return axios({
  29 + method: 'PUT',
  30 + url: `${base}/edit`,
  31 + data: params,
  32 + headers: {
  33 + 'Content-Type': 'application/json;charset=UTF-8'
  34 + }
  35 + })
  36 +};
  37 +
  38 +export const add = params => {
  39 + return axios({
  40 + method: 'POST',
  41 + url: `${base}/add`,
  42 + data: params,
  43 + headers: {
  44 + 'Content-Type': 'application/json;charset=UTF-8'
  45 + }
  46 + })
  47 +};
@@ -3,36 +3,45 @@ import axios from 'axios' @@ -3,36 +3,45 @@ import axios from 'axios'
3 let base = '/hqpt-user-center/inspection'; 3 let base = '/hqpt-user-center/inspection';
4 4
5 5
6 -  
7 -export const getList = params => { return axios.get(`${base}/list`, { params: params }); };  
8 -  
9 -  
10 -export const remove = params => { return axios({  
11 - method: 'DELETE',  
12 - url: `${base}/del`,  
13 - data: params,  
14 - headers: {  
15 - 'Content-Type': 'application/json;charset=UTF-8'  
16 - }  
17 -})}; 6 +export const getList = params => {
  7 + return axios.get(`${base}/list`, {params: params});
  8 +};
  9 +
  10 +
  11 +export const remove = params => {
  12 + return axios({
  13 + method: 'DELETE',
  14 + url: `${base}/del`,
  15 + data: params,
  16 + headers: {
  17 + 'Content-Type': 'application/json;charset=UTF-8'
  18 + }
  19 + })
  20 +};
18 21
19 //批量删除 22 //批量删除
20 -export const batchRemove = params => { return axios.get(`${base}/batchremove`, { params: params }); };  
21 -  
22 -export const edit = params => { return axios({  
23 - method: 'PUT',  
24 - url: `${base}/edit`,  
25 - data: params,  
26 - headers: {  
27 - 'Content-Type': 'application/json;charset=UTF-8'  
28 - }  
29 -})};  
30 -  
31 -export const add = params => { return axios({  
32 - method: 'POST',  
33 - url: `${base}/add`,  
34 - data: params,  
35 - headers: {  
36 - 'Content-Type': 'application/json;charset=UTF-8'  
37 - }  
38 -})};  
  23 +export const batchRemove = params => {
  24 + return axios.get(`${base}/batchremove`, {params: params});
  25 +};
  26 +
  27 +export const edit = params => {
  28 + return axios({
  29 + method: 'PUT',
  30 + url: `${base}/edit`,
  31 + data: params,
  32 + headers: {
  33 + 'Content-Type': 'application/json;charset=UTF-8'
  34 + }
  35 + })
  36 +};
  37 +
  38 +export const add = params => {
  39 + return axios({
  40 + method: 'POST',
  41 + url: `${base}/add`,
  42 + data: params,
  43 + headers: {
  44 + 'Content-Type': 'application/json;charset=UTF-8'
  45 + }
  46 + })
  47 +};
1 export const checkNull = params => { 1 export const checkNull = params => {
2 - if (params!=null && !params && typeof(params)!="undefined"){ 2 + if (params != null && !params && typeof (params) != "undefined") {
3 return true; 3 return true;
4 - }else { 4 + } else {
5 return false; 5 return false;
6 } 6 }
7 }; 7 };
1 import http from './http.js' 1 import http from './http.js'
  2 +
2 let baseUrl = '/cloud-user-center/user' 3 let baseUrl = '/cloud-user-center/user'
3 -export const getUserList = params => { return http.get(`${baseUrl}/list`, params); }; 4 +export const getUserList = params => {
  5 + return http.get(`${baseUrl}/list`, params);
  6 +};
4 7
5 -export const getUserListPage = params => { return http.get(`/user/list`,params) }; 8 +export const getUserListPage = params => {
  9 + return http.get(`/user/list`, params)
  10 +};
6 11
7 -export const removeUser = params => { return http.del(`${baseUrl}/del`,params)}; 12 +export const removeUser = params => {
  13 + return http.del(`${baseUrl}/del`, params)
  14 +};
8 15
9 -export const batchRemoveUser = params => { return http.del(`${baseUrl}/batchremove`, { params: params }); }; 16 +export const batchRemoveUser = params => {
  17 + return http.del(`${baseUrl}/batchremove`, {params: params});
  18 +};
10 19
11 -export const editPass = params => { return http.put(`${baseUrl}/password`,params)}; 20 +export const editPass = params => {
  21 + return http.put(`${baseUrl}/password`, params)
  22 +};
12 23
13 -export const editUser = params => { return http.put(`${baseUrl}/edit`,params)}; 24 +export const editUser = params => {
  25 + return http.put(`${baseUrl}/edit`, params)
  26 +};
14 27
15 -export const addUser = params => { return http.post(`${baseUrl}/add`,params)}; 28 +export const addUser = params => {
  29 + return http.post(`${baseUrl}/add`, params)
  30 +};
16 31
17 -export const setUserRole = params => { return http.put(`${baseUrl}/roleset`,params)}; 32 +export const setUserRole = params => {
  33 + return http.put(`${baseUrl}/roleset`, params)
  34 +};
18 35
19 -export const resetToken = params => { return http.put(`${baseUrl}/resetToken`,params)};  
  36 +export const resetToken = params => {
  37 + return http.put(`${baseUrl}/resetToken`, params)
  38 +};
@@ -4,7 +4,7 @@ var DEFAULT_PATTERN = 'yyyy-MM-dd'; @@ -4,7 +4,7 @@ var DEFAULT_PATTERN = 'yyyy-MM-dd';
4 * 根据数组 元素的“值” 来删除或者获取数据 4 * 根据数组 元素的“值” 来删除或者获取数据
5 * 使用方法arrList.splice(arrList.contains('c'),1) 5 * 使用方法arrList.splice(arrList.contains('c'),1)
6 */ 6 */
7 -Array.prototype.contains = function(obj) { 7 +Array.prototype.contains = function (obj) {
8 var i = this.length; 8 var i = this.length;
9 while (i--) { 9 while (i--) {
10 if (this[i] === obj) { 10 if (this[i] === obj) {
@@ -16,7 +16,9 @@ Array.prototype.contains = function(obj) { @@ -16,7 +16,9 @@ Array.prototype.contains = function(obj) {
16 16
17 function padding(s, len) { 17 function padding(s, len) {
18 len = len - (s + '').length; 18 len = len - (s + '').length;
19 - for (var i = 0; i < len; i++) { s = '0' + s; } 19 + for (var i = 0; i < len; i++) {
  20 + s = '0' + s;
  21 + }
20 return s; 22 return s;
21 } 23 }
22 24
@@ -38,13 +40,20 @@ export default { @@ -38,13 +40,20 @@ export default {
38 pattern = pattern || DEFAULT_PATTERN; 40 pattern = pattern || DEFAULT_PATTERN;
39 return pattern.replace(SIGN_REGEXP, function ($0) { 41 return pattern.replace(SIGN_REGEXP, function ($0) {
40 switch ($0.charAt(0)) { 42 switch ($0.charAt(0)) {
41 - case 'y': return padding(date.getFullYear(), $0.length);  
42 - case 'M': return padding(date.getMonth() + 1, $0.length);  
43 - case 'd': return padding(date.getDate(), $0.length);  
44 - case 'w': return date.getDay() + 1;  
45 - case 'h': return padding(date.getHours(), $0.length);  
46 - case 'm': return padding(date.getMinutes(), $0.length);  
47 - case 's': return padding(date.getSeconds(), $0.length); 43 + case 'y':
  44 + return padding(date.getFullYear(), $0.length);
  45 + case 'M':
  46 + return padding(date.getMonth() + 1, $0.length);
  47 + case 'd':
  48 + return padding(date.getDate(), $0.length);
  49 + case 'w':
  50 + return date.getDay() + 1;
  51 + case 'h':
  52 + return padding(date.getHours(), $0.length);
  53 + case 'm':
  54 + return padding(date.getMinutes(), $0.length);
  55 + case 's':
  56 + return padding(date.getSeconds(), $0.length);
48 } 57 }
49 }); 58 });
50 }, 59 },
@@ -57,12 +66,24 @@ export default { @@ -57,12 +66,24 @@ export default {
57 var _int = parseInt(matchs2[i]); 66 var _int = parseInt(matchs2[i]);
58 var sign = matchs1[i]; 67 var sign = matchs1[i];
59 switch (sign.charAt(0)) { 68 switch (sign.charAt(0)) {
60 - case 'y': _date.setFullYear(_int); break;  
61 - case 'M': _date.setMonth(_int - 1); break;  
62 - case 'd': _date.setDate(_int); break;  
63 - case 'h': _date.setHours(_int); break;  
64 - case 'm': _date.setMinutes(_int); break;  
65 - case 's': _date.setSeconds(_int); break; 69 + case 'y':
  70 + _date.setFullYear(_int);
  71 + break;
  72 + case 'M':
  73 + _date.setMonth(_int - 1);
  74 + break;
  75 + case 'd':
  76 + _date.setDate(_int);
  77 + break;
  78 + case 'h':
  79 + _date.setHours(_int);
  80 + break;
  81 + case 'm':
  82 + _date.setMinutes(_int);
  83 + break;
  84 + case 's':
  85 + _date.setSeconds(_int);
  86 + break;
66 } 87 }
67 } 88 }
68 return _date; 89 return _date;
@@ -72,9 +93,9 @@ export default { @@ -72,9 +93,9 @@ export default {
72 93
73 }, 94 },
74 checkNull: params => { 95 checkNull: params => {
75 - if (params!==null && typeof(params)!="undefined"){ 96 + if (params !== null && typeof (params) != "undefined") {
76 return true; 97 return true;
77 - }else { 98 + } else {
78 return false; 99 return false;
79 } 100 }
80 } 101 }
1 <template> 1 <template>
2 - <div :class="{'hidden':hidden}" class="pagination-container">  
3 - <el-pagination  
4 - :background="background"  
5 - :current-page.sync="currentPage"  
6 - :page-size.sync="pageSize"  
7 - :layout="layout"  
8 - :page-sizes="pageSizes"  
9 - :total="total"  
10 - v-bind="$attrs"  
11 - @size-change="handleSizeChange"  
12 - @current-change="handleCurrentChange"/>  
13 - </div> 2 + <div :class="{'hidden':hidden}" class="pagination-container">
  3 + <el-pagination
  4 + :background="background"
  5 + :current-page.sync="currentPage"
  6 + :page-size.sync="pageSize"
  7 + :layout="layout"
  8 + :page-sizes="pageSizes"
  9 + :total="total"
  10 + v-bind="$attrs"
  11 + @size-change="handleSizeChange"
  12 + @current-change="handleCurrentChange"/>
  13 + </div>
14 </template> 14 </template>
15 15
16 <script> 16 <script>
17 -import { scrollTo } from '@/utils/scrollTo' 17 + import {scrollTo} from '@/utils/scrollTo'
18 18
19 -export default {  
20 - name: 'Pagination',  
21 - props: {  
22 - total: {  
23 - required: true,  
24 - type: Number  
25 - },  
26 - page: {  
27 - type: Number,  
28 - default: 1  
29 - },  
30 - limit: {  
31 - type: Number,  
32 - default: 20  
33 - },  
34 - pageSizes: {  
35 - type: Array,  
36 - default() {  
37 - return [10, 20, 30, 50]  
38 - }  
39 - },  
40 - layout: {  
41 - type: String,  
42 - default: 'total, sizes, prev, pager, next, jumper'  
43 - },  
44 - background: {  
45 - type: Boolean,  
46 - default: true  
47 - },  
48 - autoScroll: {  
49 - type: Boolean,  
50 - default: true  
51 - },  
52 - hidden: {  
53 - type: Boolean,  
54 - default: false 19 + export default {
  20 + name: 'Pagination',
  21 + props: {
  22 + total: {
  23 + required: true,
  24 + type: Number
  25 + },
  26 + page: {
  27 + type: Number,
  28 + default: 1
  29 + },
  30 + limit: {
  31 + type: Number,
  32 + default: 20
  33 + },
  34 + pageSizes: {
  35 + type: Array,
  36 + default() {
  37 + return [10, 20, 30, 50]
  38 + }
  39 + },
  40 + layout: {
  41 + type: String,
  42 + default: 'total, sizes, prev, pager, next, jumper'
  43 + },
  44 + background: {
  45 + type: Boolean,
  46 + default: true
  47 + },
  48 + autoScroll: {
  49 + type: Boolean,
  50 + default: true
  51 + },
  52 + hidden: {
  53 + type: Boolean,
  54 + default: false
  55 + }
  56 + },
  57 + computed: {
  58 + currentPage: {
  59 + get() {
  60 + return this.page
  61 + },
  62 + set(val) {
  63 + this.$emit('update:page', val)
  64 + }
  65 + },
  66 + pageSize: {
  67 + get() {
  68 + return this.limit
  69 + },
  70 + set(val) {
  71 + this.$emit('update:limit', val)
  72 + }
  73 + }
  74 + },
  75 + methods: {
  76 + handleSizeChange(val) {
  77 + this.$emit('pagination', {page: this.currentPage, limit: val})
  78 + if (this.autoScroll) {
  79 + scrollTo(0, 800)
  80 + }
  81 + },
  82 + handleCurrentChange(val) {
  83 + this.$emit('pagination', {page: val, limit: this.pageSize})
  84 + if (this.autoScroll) {
  85 + scrollTo(0, 800)
  86 + }
  87 + }
  88 + }
55 } 89 }
56 - },  
57 - computed: {  
58 - currentPage: {  
59 - get() {  
60 - return this.page  
61 - },  
62 - set(val) {  
63 - this.$emit('update:page', val)  
64 - }  
65 - },  
66 - pageSize: {  
67 - get() {  
68 - return this.limit  
69 - },  
70 - set(val) {  
71 - this.$emit('update:limit', val)  
72 - }  
73 - }  
74 - },  
75 - methods: {  
76 - handleSizeChange(val) {  
77 - this.$emit('pagination', { page: this.currentPage, limit: val })  
78 - if (this.autoScroll) {  
79 - scrollTo(0, 800)  
80 - }  
81 - },  
82 - handleCurrentChange(val) {  
83 - this.$emit('pagination', { page: val, limit: this.pageSize })  
84 - if (this.autoScroll) {  
85 - scrollTo(0, 800)  
86 - }  
87 - }  
88 - }  
89 -}  
90 </script> 90 </script>
91 91
92 <style scoped> 92 <style scoped>
93 -.pagination-container {  
94 - background: #fff;  
95 - padding: 32px 16px;  
96 -}  
97 -.pagination-container.hidden {  
98 - display: none;  
99 -} 93 + .pagination-container {
  94 + background: #fff;
  95 + padding: 32px 16px;
  96 + }
  97 +
  98 + .pagination-container.hidden {
  99 + display: none;
  100 + }
100 </style> 101 </style>
1 /** 1 /**
2 -* @Author: jianglei  
3 -* @Date: 2017-10-12 12:06:49  
4 -*/ 2 + * @Author: jianglei
  3 + * @Date: 2017-10-12 12:06:49
  4 + */
5 'use strict' 5 'use strict'
6 import Vue from 'vue' 6 import Vue from 'vue'
  7 +
7 export default function treeToArray(data, expandAll, parent = null, level = null) { 8 export default function treeToArray(data, expandAll, parent = null, level = null) {
8 - let tmp = []  
9 - Array.from(data).forEach(function(record) {  
10 - if (record._expanded === undefined) {  
11 - Vue.set(record, '_expanded', expandAll)  
12 - }  
13 - let _level = 1  
14 - if (level !== undefined && level !== null) {  
15 - _level = level + 1  
16 - }  
17 - Vue.set(record, '_level', _level)  
18 - // 如果有父元素  
19 - if (parent) {  
20 - Vue.set(record, 'parent', parent)  
21 - }  
22 - tmp.push(record)  
23 - if (record.children && record.children.length > 0) {  
24 - const children = treeToArray(record.children, expandAll, record, _level)  
25 - tmp = tmp.concat(children)  
26 - }  
27 - })  
28 - return tmp 9 + let tmp = []
  10 + Array.from(data).forEach(function (record) {
  11 + if (record._expanded === undefined) {
  12 + Vue.set(record, '_expanded', expandAll)
  13 + }
  14 + let _level = 1
  15 + if (level !== undefined && level !== null) {
  16 + _level = level + 1
  17 + }
  18 + Vue.set(record, '_level', _level)
  19 + // 如果有父元素
  20 + if (parent) {
  21 + Vue.set(record, 'parent', parent)
  22 + }
  23 + tmp.push(record)
  24 + if (record.children && record.children.length > 0) {
  25 + const children = treeToArray(record.children, expandAll, record, _level)
  26 + tmp = tmp.concat(children)
  27 + }
  28 + })
  29 + return tmp
29 } 30 }
1 <template> 1 <template>
2 - <el-table :data="formatData" :row-style="showRow" v-bind="$attrs">  
3 - <el-table-column type="selection" width="30" align="center"/>  
4 - <el-table-column v-if="columns.length===0" width="30" align="center">  
5 - <template slot-scope="scope">  
6 - <span v-for="space in scope.row._level" :key="space" class="ms-tree-space"/>  
7 - <span v-if="iconShow(0,scope.row)" class="tree-ctrl" @click="toggleExpanded(scope.$index)"> 2 + <el-table :data="formatData" :row-style="showRow" v-bind="$attrs">
  3 + <el-table-column type="selection" width="30" align="center"/>
  4 + <el-table-column v-if="columns.length===0" width="30" align="center">
  5 + <template slot-scope="scope">
  6 + <span v-for="space in scope.row._level" :key="space" class="ms-tree-space"/>
  7 + <span v-if="iconShow(0,scope.row)" class="tree-ctrl" @click="toggleExpanded(scope.$index)">
8 <i v-if="!scope.row._expanded" class="el-icon-plus"/> 8 <i v-if="!scope.row._expanded" class="el-icon-plus"/>
9 <i v-else class="el-icon-minus"/> 9 <i v-else class="el-icon-minus"/>
10 </span> 10 </span>
11 - <!--{{ scope.$index }}-->  
12 - </template>  
13 - </el-table-column>  
14 - <el-table-column v-for="(column, index) in columns" v-else :key="column.value" :label="column.text" :width="column.width">  
15 - <template slot-scope="scope">  
16 - <!-- Todo -->  
17 - <!-- eslint-disable-next-line vue/no-confusing-v-for-v-if -->  
18 - <span v-for="space in scope.row._level" v-if="index === 0" :key="space" class="ms-tree-space"/>  
19 - <span v-if="iconShow(index,scope.row)" class="tree-ctrl" @click="toggleExpanded(scope.$index)"> 11 + <!--{{ scope.$index }}-->
  12 + </template>
  13 + </el-table-column>
  14 + <el-table-column v-for="(column, index) in columns" v-else :key="column.value" :label="column.text"
  15 + :width="column.width">
  16 + <template slot-scope="scope">
  17 + <!-- Todo -->
  18 + <!-- eslint-disable-next-line vue/no-confusing-v-for-v-if -->
  19 + <span v-for="space in scope.row._level" v-if="index === 0" :key="space" class="ms-tree-space"/>
  20 + <span v-if="iconShow(index,scope.row)" class="tree-ctrl" @click="toggleExpanded(scope.$index)">
20 <i v-if="!scope.row._expanded" class="el-icon-plus"/> 21 <i v-if="!scope.row._expanded" class="el-icon-plus"/>
21 <i v-else class="el-icon-minus"/> 22 <i v-else class="el-icon-minus"/>
22 </span> 23 </span>
23 - {{ scope.row[column.value] }}  
24 - </template>  
25 - </el-table-column>  
26 - <slot/>  
27 - </el-table> 24 + {{ scope.row[column.value] }}
  25 + </template>
  26 + </el-table-column>
  27 + <slot/>
  28 + </el-table>
28 </template> 29 </template>
29 30
30 <script> 31 <script>
31 -/**  
32 - Auth: Lei.j1ang  
33 - Created: 2018/1/19-13:59  
34 -*/  
35 -import treeToArray from './eval.js'  
36 -export default {  
37 - name: 'TreeTable',  
38 - props: {  
39 - /* eslint-disable */  
40 - data: {  
41 - type: [Array, Object],  
42 - required: true  
43 - },  
44 - columns: {  
45 - type: Array,  
46 - default: () => []  
47 - },  
48 - evalFunc: Function,  
49 - evalArgs: Array,  
50 - expandAll: {  
51 - type: Boolean,  
52 - default: true  
53 - }  
54 - },  
55 - computed: {  
56 - // 格式化数据源  
57 - formatData: function() {  
58 - let tmp  
59 - if (!Array.isArray(this.data)) {  
60 - tmp = [this.data]  
61 - } else {  
62 - tmp = this.data  
63 - }  
64 - const func = this.evalFunc || treeToArray  
65 - const args = this.evalArgs ? Array.concat([tmp, this.expandAll], this.evalArgs) : [tmp, this.expandAll]  
66 - return func.apply(null, args)  
67 - }  
68 - },  
69 - methods: {  
70 - showRow: function(row) {  
71 - this.data  
72 - const show = (row.parent ? (row.parent._expanded && row.parent._show) : true) 32 + /**
  33 + Auth: Lei.j1ang
  34 + Created: 2018/1/19-13:59
  35 + */
  36 + import treeToArray from './eval.js'
  37 +
  38 + export default {
  39 + name: 'TreeTable',
  40 + props: {
  41 + /* eslint-disable */
  42 + data: {
  43 + type: [Array, Object],
  44 + required: true
  45 + },
  46 + columns: {
  47 + type: Array,
  48 + default: () => []
  49 + },
  50 + evalFunc: Function,
  51 + evalArgs: Array,
  52 + expandAll: {
  53 + type: Boolean,
  54 + default: true
  55 + }
  56 + },
  57 + computed: {
  58 + // 格式化数据源
  59 + formatData: function () {
  60 + let tmp
  61 + if (!Array.isArray(this.data)) {
  62 + tmp = [this.data]
  63 + } else {
  64 + tmp = this.data
  65 + }
  66 + const func = this.evalFunc || treeToArray
  67 + const args = this.evalArgs ? Array.concat([tmp, this.expandAll], this.evalArgs) : [tmp, this.expandAll]
  68 + return func.apply(null, args)
  69 + }
  70 + },
  71 + methods: {
  72 + showRow: function (row) {
  73 + this.data
  74 + const show = (row.parent ? (row.parent._expanded && row.parent._show) : true)
73 // const show = (row.row.parent ? (row.row.parent._expanded && row.row.parent._show) : true) 75 // const show = (row.row.parent ? (row.row.parent._expanded && row.row.parent._show) : true)
74 // row.row._show = show 76 // row.row._show = show
75 - row._show = show  
76 - return show ? 'animation:treeTableShow 1s;-webkit-animation:treeTableShow 1s;' : 'display:none;'  
77 - },  
78 - // 切换下级是否展开  
79 - toggleExpanded: function(trIndex) {  
80 - const record = this.formatData[trIndex]  
81 - record._expanded = !record._expanded  
82 - },  
83 - // 图标显示  
84 - iconShow(index, record) {  
85 - return (index === 0 && record.children && record.children.length > 0) 77 + row._show = show
  78 + return show ? 'animation:treeTableShow 1s;-webkit-animation:treeTableShow 1s;' : 'display:none;'
  79 + },
  80 + // 切换下级是否展开
  81 + toggleExpanded: function (trIndex) {
  82 + const record = this.formatData[trIndex]
  83 + record._expanded = !record._expanded
  84 + },
  85 + // 图标显示
  86 + iconShow(index, record) {
  87 + return (index === 0 && record.children && record.children.length > 0)
  88 + }
  89 + }
86 } 90 }
87 - }  
88 -}  
89 </script> 91 </script>
90 <style rel="stylesheet/css"> 92 <style rel="stylesheet/css">
91 - @keyframes treeTableShow {  
92 - from {opacity: 0;}  
93 - to {opacity: 1;}  
94 - }  
95 - @-webkit-keyframes treeTableShow {  
96 - from {opacity: 0;}  
97 - to {opacity: 1;}  
98 - } 93 + @keyframes treeTableShow {
  94 + from {
  95 + opacity: 0;
  96 + }
  97 + to {
  98 + opacity: 1;
  99 + }
  100 + }
  101 +
  102 + @-webkit-keyframes treeTableShow {
  103 + from {
  104 + opacity: 0;
  105 + }
  106 + to {
  107 + opacity: 1;
  108 + }
  109 + }
99 </style> 110 </style>
100 111
101 <style lang="scss" rel="stylesheet/scss" scoped> 112 <style lang="scss" rel="stylesheet/scss" scoped>
102 - $color-blue: #2196F3;  
103 - $space-width: 18px;  
104 - .ms-tree-space {  
105 - position: relative;  
106 - top: 1px;  
107 - display: inline-block;  
108 - font-style: normal;  
109 - font-weight: 400;  
110 - line-height: 1;  
111 - width: $space-width;  
112 - height: 14px;  
113 - &::before {  
114 - content: "" 113 + $color-blue: #2196F3;
  114 + $space-width: 18px;
  115 + .ms-tree-space {
  116 + position: relative;
  117 + top: 1px;
  118 + display: inline-block;
  119 + font-style: normal;
  120 + font-weight: 400;
  121 + line-height: 1;
  122 + width: $space-width;
  123 + height: 14px;
  124 +
  125 + &::before {
  126 + content: ""
  127 + }
  128 + }
  129 +
  130 + .processContainer {
  131 + width: 100%;
  132 + height: 100%;
115 } 133 }
116 - }  
117 - .processContainer{  
118 - width: 100%;  
119 - height: 100%;  
120 - }  
121 - table td {  
122 - line-height: 26px;  
123 - }  
124 134
125 - .tree-ctrl{  
126 - position: relative;  
127 - cursor: pointer;  
128 - color: $color-blue;  
129 - margin-left: -$space-width;  
130 - } 135 + table td {
  136 + line-height: 26px;
  137 + }
  138 +
  139 + .tree-ctrl {
  140 + position: relative;
  141 + cursor: pointer;
  142 + color: $color-blue;
  143 + margin-left: -$space-width;
  144 + }
131 </style> 145 </style>
1 // Inspired by https://github.com/Inndy/vue-clipboard2 1 // Inspired by https://github.com/Inndy/vue-clipboard2
2 const Clipboard = require('clipboard') 2 const Clipboard = require('clipboard')
3 if (!Clipboard) { 3 if (!Clipboard) {
4 - throw new Error('you should npm install `clipboard` --save at first ') 4 + throw new Error('you should npm install `clipboard` --save at first ')
5 } 5 }
6 6
7 export default { 7 export default {
8 - bind(el, binding) {  
9 - if (binding.arg === 'success') {  
10 - el._v_clipboard_success = binding.value  
11 - } else if (binding.arg === 'error') {  
12 - el._v_clipboard_error = binding.value  
13 - } else {  
14 - const clipboard = new Clipboard(el, {  
15 - text() { return binding.value },  
16 - action() { return binding.arg === 'cut' ? 'cut' : 'copy' }  
17 - })  
18 - clipboard.on('success', e => {  
19 - const callback = el._v_clipboard_success  
20 - callback && callback(e) // eslint-disable-line  
21 - })  
22 - clipboard.on('error', e => {  
23 - const callback = el._v_clipboard_error  
24 - callback && callback(e) // eslint-disable-line  
25 - })  
26 - el._v_clipboard = clipboard 8 + bind(el, binding) {
  9 + if (binding.arg === 'success') {
  10 + el._v_clipboard_success = binding.value
  11 + } else if (binding.arg === 'error') {
  12 + el._v_clipboard_error = binding.value
  13 + } else {
  14 + const clipboard = new Clipboard(el, {
  15 + text() {
  16 + return binding.value
  17 + },
  18 + action() {
  19 + return binding.arg === 'cut' ? 'cut' : 'copy'
  20 + }
  21 + })
  22 + clipboard.on('success', e => {
  23 + const callback = el._v_clipboard_success
  24 + callback && callback(e) // eslint-disable-line
  25 + })
  26 + clipboard.on('error', e => {
  27 + const callback = el._v_clipboard_error
  28 + callback && callback(e) // eslint-disable-line
  29 + })
  30 + el._v_clipboard = clipboard
  31 + }
  32 + },
  33 + update(el, binding) {
  34 + if (binding.arg === 'success') {
  35 + el._v_clipboard_success = binding.value
  36 + } else if (binding.arg === 'error') {
  37 + el._v_clipboard_error = binding.value
  38 + } else {
  39 + el._v_clipboard.text = function () {
  40 + return binding.value
  41 + }
  42 + el._v_clipboard.action = function () {
  43 + return binding.arg === 'cut' ? 'cut' : 'copy'
  44 + }
  45 + }
  46 + },
  47 + unbind(el, binding) {
  48 + if (binding.arg === 'success') {
  49 + delete el._v_clipboard_success
  50 + } else if (binding.arg === 'error') {
  51 + delete el._v_clipboard_error
  52 + } else {
  53 + el._v_clipboard.destroy()
  54 + delete el._v_clipboard
  55 + }
27 } 56 }
28 - },  
29 - update(el, binding) {  
30 - if (binding.arg === 'success') {  
31 - el._v_clipboard_success = binding.value  
32 - } else if (binding.arg === 'error') {  
33 - el._v_clipboard_error = binding.value  
34 - } else {  
35 - el._v_clipboard.text = function() { return binding.value }  
36 - el._v_clipboard.action = function() { return binding.arg === 'cut' ? 'cut' : 'copy' }  
37 - }  
38 - },  
39 - unbind(el, binding) {  
40 - if (binding.arg === 'success') {  
41 - delete el._v_clipboard_success  
42 - } else if (binding.arg === 'error') {  
43 - delete el._v_clipboard_error  
44 - } else {  
45 - el._v_clipboard.destroy()  
46 - delete el._v_clipboard  
47 - }  
48 - }  
49 } 57 }
1 import Clipboard from './clipboard' 1 import Clipboard from './clipboard'
2 2
3 -const install = function(Vue) {  
4 - Vue.directive('Clipboard', Clipboard) 3 +const install = function (Vue) {
  4 + Vue.directive('Clipboard', Clipboard)
5 } 5 }
6 6
7 if (window.Vue) { 7 if (window.Vue) {
8 - window.clipboard = Clipboard  
9 - Vue.use(install); // eslint-disable-line 8 + window.clipboard = Clipboard
  9 + Vue.use(install); // eslint-disable-line
10 } 10 }
11 11
12 Clipboard.install = install 12 Clipboard.install = install
1 -export default{  
2 - bind(el, binding, vnode) {  
3 - const dialogHeaderEl = el.querySelector('.el-dialog__header')  
4 - const dragDom = el.querySelector('.el-dialog')  
5 - dialogHeaderEl.style.cssText += ';cursor:move;'  
6 - dragDom.style.cssText += ';top:0px;' 1 +export default {
  2 + bind(el, binding, vnode) {
  3 + const dialogHeaderEl = el.querySelector('.el-dialog__header')
  4 + const dragDom = el.querySelector('.el-dialog')
  5 + dialogHeaderEl.style.cssText += ';cursor:move;'
  6 + dragDom.style.cssText += ';top:0px;'
7 7
8 - // 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null);  
9 - const getStyle = (function() {  
10 - if (window.document.currentStyle) {  
11 - return (dom, attr) => dom.currentStyle[attr]  
12 - } else {  
13 - return (dom, attr) => getComputedStyle(dom, false)[attr]  
14 - }  
15 - })() 8 + // 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null);
  9 + const getStyle = (function () {
  10 + if (window.document.currentStyle) {
  11 + return (dom, attr) => dom.currentStyle[attr]
  12 + } else {
  13 + return (dom, attr) => getComputedStyle(dom, false)[attr]
  14 + }
  15 + })()
16 16
17 - dialogHeaderEl.onmousedown = (e) => {  
18 - // 鼠标按下,计算当前元素距离可视区的距离  
19 - const disX = e.clientX - dialogHeaderEl.offsetLeft  
20 - const disY = e.clientY - dialogHeaderEl.offsetTop 17 + dialogHeaderEl.onmousedown = (e) => {
  18 + // 鼠标按下,计算当前元素距离可视区的距离
  19 + const disX = e.clientX - dialogHeaderEl.offsetLeft
  20 + const disY = e.clientY - dialogHeaderEl.offsetTop
21 21
22 - const dragDomWidth = dragDom.offsetWidth  
23 - const dragDomHeight = dragDom.offsetHeight 22 + const dragDomWidth = dragDom.offsetWidth
  23 + const dragDomHeight = dragDom.offsetHeight
24 24
25 - const screenWidth = document.body.clientWidth  
26 - const screenHeight = document.body.clientHeight 25 + const screenWidth = document.body.clientWidth
  26 + const screenHeight = document.body.clientHeight
27 27
28 - const minDragDomLeft = dragDom.offsetLeft  
29 - const maxDragDomLeft = screenWidth - dragDom.offsetLeft - dragDomWidth 28 + const minDragDomLeft = dragDom.offsetLeft
  29 + const maxDragDomLeft = screenWidth - dragDom.offsetLeft - dragDomWidth
30 30
31 - const minDragDomTop = dragDom.offsetTop  
32 - const maxDragDomTop = screenHeight - dragDom.offsetTop - dragDomHeight 31 + const minDragDomTop = dragDom.offsetTop
  32 + const maxDragDomTop = screenHeight - dragDom.offsetTop - dragDomHeight
33 33
34 - // 获取到的值带px 正则匹配替换  
35 - let styL = getStyle(dragDom, 'left')  
36 - let styT = getStyle(dragDom, 'top') 34 + // 获取到的值带px 正则匹配替换
  35 + let styL = getStyle(dragDom, 'left')
  36 + let styT = getStyle(dragDom, 'top')
37 37
38 - if (styL.includes('%')) {  
39 - styL = +document.body.clientWidth * (+styL.replace(/\%/g, '') / 100)  
40 - styT = +document.body.clientHeight * (+styT.replace(/\%/g, '') / 100)  
41 - } else {  
42 - styL = +styL.replace(/\px/g, '')  
43 - styT = +styT.replace(/\px/g, '')  
44 - } 38 + if (styL.includes('%')) {
  39 + styL = +document.body.clientWidth * (+styL.replace(/\%/g, '') / 100)
  40 + styT = +document.body.clientHeight * (+styT.replace(/\%/g, '') / 100)
  41 + } else {
  42 + styL = +styL.replace(/\px/g, '')
  43 + styT = +styT.replace(/\px/g, '')
  44 + }
45 45
46 - document.onmousemove = function(e) {  
47 - // 通过事件委托,计算移动的距离  
48 - let left = e.clientX - disX  
49 - let top = e.clientY - disY 46 + document.onmousemove = function (e) {
  47 + // 通过事件委托,计算移动的距离
  48 + let left = e.clientX - disX
  49 + let top = e.clientY - disY
50 50
51 - // 边界处理  
52 - if (-(left) > minDragDomLeft) {  
53 - left = -minDragDomLeft  
54 - } else if (left > maxDragDomLeft) {  
55 - left = maxDragDomLeft  
56 - } 51 + // 边界处理
  52 + if (-(left) > minDragDomLeft) {
  53 + left = -minDragDomLeft
  54 + } else if (left > maxDragDomLeft) {
  55 + left = maxDragDomLeft
  56 + }
57 57
58 - if (-(top) > minDragDomTop) {  
59 - top = -minDragDomTop  
60 - } else if (top > maxDragDomTop) {  
61 - top = maxDragDomTop  
62 - } 58 + if (-(top) > minDragDomTop) {
  59 + top = -minDragDomTop
  60 + } else if (top > maxDragDomTop) {
  61 + top = maxDragDomTop
  62 + }
63 63
64 - // 移动当前元素  
65 - dragDom.style.cssText += `;left:${left + styL}px;top:${top + styT}px;` 64 + // 移动当前元素
  65 + dragDom.style.cssText += `;left:${left + styL}px;top:${top + styT}px;`
66 66
67 - // emit onDrag event  
68 - vnode.child.$emit('dragDialog')  
69 - } 67 + // emit onDrag event
  68 + vnode.child.$emit('dragDialog')
  69 + }
70 70
71 - document.onmouseup = function(e) {  
72 - document.onmousemove = null  
73 - document.onmouseup = null  
74 - } 71 + document.onmouseup = function (e) {
  72 + document.onmousemove = null
  73 + document.onmouseup = null
  74 + }
  75 + }
75 } 76 }
76 - }  
77 } 77 }
1 import drag from './drag' 1 import drag from './drag'
2 2
3 -const install = function(Vue) {  
4 - Vue.directive('el-drag-dialog', drag) 3 +const install = function (Vue) {
  4 + Vue.directive('el-drag-dialog', drag)
5 } 5 }
6 6
7 if (window.Vue) { 7 if (window.Vue) {
8 - window['el-drag-dialog'] = drag  
9 - Vue.use(install); // eslint-disable-line 8 + window['el-drag-dialog'] = drag
  9 + Vue.use(install); // eslint-disable-line
10 } 10 }
11 11
12 drag.install = install 12 drag.install = install
1 import permission from './permission' 1 import permission from './permission'
2 2
3 -const install = function(Vue) {  
4 - Vue.directive('permission', permission) 3 +const install = function (Vue) {
  4 + Vue.directive('permission', permission)
5 } 5 }
6 6
7 if (window.Vue) { 7 if (window.Vue) {
8 - window['permission'] = permission  
9 - Vue.use(install); // eslint-disable-line 8 + window['permission'] = permission
  9 + Vue.use(install); // eslint-disable-line
10 } 10 }
11 11
12 permission.install = install 12 permission.install = install
1 -  
2 import store from '@/store' 1 import store from '@/store'
3 2
4 -export default{  
5 - inserted(el, binding, vnode) {  
6 - const { value } = binding  
7 - const roles = store.getters && store.getters.roles 3 +export default {
  4 + inserted(el, binding, vnode) {
  5 + const {value} = binding
  6 + const roles = store.getters && store.getters.roles
8 7
9 - if (value && value instanceof Array && value.length > 0) {  
10 - const permissionRoles = value 8 + if (value && value instanceof Array && value.length > 0) {
  9 + const permissionRoles = value
11 10
12 - const hasPermission = roles.some(role => {  
13 - return permissionRoles.includes(role)  
14 - }) 11 + const hasPermission = roles.some(role => {
  12 + return permissionRoles.includes(role)
  13 + })
15 14
16 - if (!hasPermission) {  
17 - el.parentNode && el.parentNode.removeChild(el)  
18 - }  
19 - } else {  
20 - throw new Error(`need roles! Like v-permission="['admin','editor']"`) 15 + if (!hasPermission) {
  16 + el.parentNode && el.parentNode.removeChild(el)
  17 + }
  18 + } else {
  19 + throw new Error(`need roles! Like v-permission="['admin','editor']"`)
  20 + }
21 } 21 }
22 - }  
23 } 22 }
1 const vueSticky = {} 1 const vueSticky = {}
2 let listenAction 2 let listenAction
3 vueSticky.install = Vue => { 3 vueSticky.install = Vue => {
4 - Vue.directive('sticky', {  
5 - inserted(el, binding) {  
6 - const params = binding.value || {}  
7 - const stickyTop = params.stickyTop || 0  
8 - const zIndex = params.zIndex || 1000  
9 - const elStyle = el.style 4 + Vue.directive('sticky', {
  5 + inserted(el, binding) {
  6 + const params = binding.value || {}
  7 + const stickyTop = params.stickyTop || 0
  8 + const zIndex = params.zIndex || 1000
  9 + const elStyle = el.style
10 10
11 - elStyle.position = '-webkit-sticky'  
12 - elStyle.position = 'sticky'  
13 - // if the browser support css sticky(Currently Safari, Firefox and Chrome Canary)  
14 - // if (~elStyle.position.indexOf('sticky')) {  
15 - // elStyle.top = `${stickyTop}px`;  
16 - // elStyle.zIndex = zIndex;  
17 - // return  
18 - // }  
19 - const elHeight = el.getBoundingClientRect().height  
20 - const elWidth = el.getBoundingClientRect().width  
21 - elStyle.cssText = `top: ${stickyTop}px; z-index: ${zIndex}` 11 + elStyle.position = '-webkit-sticky'
  12 + elStyle.position = 'sticky'
  13 + // if the browser support css sticky(Currently Safari, Firefox and Chrome Canary)
  14 + // if (~elStyle.position.indexOf('sticky')) {
  15 + // elStyle.top = `${stickyTop}px`;
  16 + // elStyle.zIndex = zIndex;
  17 + // return
  18 + // }
  19 + const elHeight = el.getBoundingClientRect().height
  20 + const elWidth = el.getBoundingClientRect().width
  21 + elStyle.cssText = `top: ${stickyTop}px; z-index: ${zIndex}`
22 22
23 - const parentElm = el.parentNode || document.documentElement  
24 - const placeholder = document.createElement('div')  
25 - placeholder.style.display = 'none'  
26 - placeholder.style.width = `${elWidth}px`  
27 - placeholder.style.height = `${elHeight}px`  
28 - parentElm.insertBefore(placeholder, el) 23 + const parentElm = el.parentNode || document.documentElement
  24 + const placeholder = document.createElement('div')
  25 + placeholder.style.display = 'none'
  26 + placeholder.style.width = `${elWidth}px`
  27 + placeholder.style.height = `${elHeight}px`
  28 + parentElm.insertBefore(placeholder, el)
29 29
30 - let active = false 30 + let active = false
31 31
32 - const getScroll = (target, top) => {  
33 - const prop = top ? 'pageYOffset' : 'pageXOffset'  
34 - const method = top ? 'scrollTop' : 'scrollLeft'  
35 - let ret = target[prop]  
36 - if (typeof ret !== 'number') {  
37 - ret = window.document.documentElement[method]  
38 - }  
39 - return ret  
40 - } 32 + const getScroll = (target, top) => {
  33 + const prop = top ? 'pageYOffset' : 'pageXOffset'
  34 + const method = top ? 'scrollTop' : 'scrollLeft'
  35 + let ret = target[prop]
  36 + if (typeof ret !== 'number') {
  37 + ret = window.document.documentElement[method]
  38 + }
  39 + return ret
  40 + }
41 41
42 - const sticky = () => {  
43 - if (active) {  
44 - return  
45 - }  
46 - if (!elStyle.height) {  
47 - elStyle.height = `${el.offsetHeight}px`  
48 - } 42 + const sticky = () => {
  43 + if (active) {
  44 + return
  45 + }
  46 + if (!elStyle.height) {
  47 + elStyle.height = `${el.offsetHeight}px`
  48 + }
49 49
50 - elStyle.position = 'fixed'  
51 - elStyle.width = `${elWidth}px`  
52 - placeholder.style.display = 'inline-block'  
53 - active = true  
54 - } 50 + elStyle.position = 'fixed'
  51 + elStyle.width = `${elWidth}px`
  52 + placeholder.style.display = 'inline-block'
  53 + active = true
  54 + }
55 55
56 - const reset = () => {  
57 - if (!active) {  
58 - return  
59 - } 56 + const reset = () => {
  57 + if (!active) {
  58 + return
  59 + }
60 60
61 - elStyle.position = ''  
62 - placeholder.style.display = 'none'  
63 - active = false  
64 - } 61 + elStyle.position = ''
  62 + placeholder.style.display = 'none'
  63 + active = false
  64 + }
65 65
66 - const check = () => {  
67 - const scrollTop = getScroll(window, true)  
68 - const offsetTop = el.getBoundingClientRect().top  
69 - if (offsetTop < stickyTop) {  
70 - sticky()  
71 - } else {  
72 - if (scrollTop < elHeight + stickyTop) {  
73 - reset()  
74 - }  
75 - }  
76 - }  
77 - listenAction = () => {  
78 - check()  
79 - } 66 + const check = () => {
  67 + const scrollTop = getScroll(window, true)
  68 + const offsetTop = el.getBoundingClientRect().top
  69 + if (offsetTop < stickyTop) {
  70 + sticky()
  71 + } else {
  72 + if (scrollTop < elHeight + stickyTop) {
  73 + reset()
  74 + }
  75 + }
  76 + }
  77 + listenAction = () => {
  78 + check()
  79 + }
80 80
81 - window.addEventListener('scroll', listenAction)  
82 - }, 81 + window.addEventListener('scroll', listenAction)
  82 + },
83 83
84 - unbind() {  
85 - window.removeEventListener('scroll', listenAction)  
86 - }  
87 - }) 84 + unbind() {
  85 + window.removeEventListener('scroll', listenAction)
  86 + }
  87 + })
88 } 88 }
89 89
90 export default vueSticky 90 export default vueSticky
1 import waves from './waves' 1 import waves from './waves'
2 2
3 -const install = function(Vue) {  
4 - Vue.directive('waves', waves) 3 +const install = function (Vue) {
  4 + Vue.directive('waves', waves)
5 } 5 }
6 6
7 if (window.Vue) { 7 if (window.Vue) {
8 - window.waves = waves  
9 - Vue.use(install); // eslint-disable-line 8 + window.waves = waves
  9 + Vue.use(install); // eslint-disable-line
10 } 10 }
11 11
12 waves.install = install 12 waves.install = install
1 import './waves.css' 1 import './waves.css'
2 2
3 -export default{  
4 - bind(el, binding) {  
5 - el.addEventListener('click', e => {  
6 - const customOpts = Object.assign({}, binding.value)  
7 - const opts = Object.assign({  
8 - ele: el, // 波纹作用元素  
9 - type: 'hit', // hit 点击位置扩散 center中心点扩展  
10 - color: 'rgba(0, 0, 0, 0.15)' // 波纹颜色  
11 - }, customOpts)  
12 - const target = opts.ele  
13 - if (target) {  
14 - target.style.position = 'relative'  
15 - target.style.overflow = 'hidden'  
16 - const rect = target.getBoundingClientRect()  
17 - let ripple = target.querySelector('.waves-ripple')  
18 - if (!ripple) {  
19 - ripple = document.createElement('span')  
20 - ripple.className = 'waves-ripple'  
21 - ripple.style.height = ripple.style.width = Math.max(rect.width, rect.height) + 'px'  
22 - target.appendChild(ripple)  
23 - } else {  
24 - ripple.className = 'waves-ripple'  
25 - }  
26 - switch (opts.type) {  
27 - case 'center':  
28 - ripple.style.top = (rect.height / 2 - ripple.offsetHeight / 2) + 'px'  
29 - ripple.style.left = (rect.width / 2 - ripple.offsetWidth / 2) + 'px'  
30 - break  
31 - default:  
32 - ripple.style.top = (e.pageY - rect.top - ripple.offsetHeight / 2 - document.documentElement.scrollTop || document.body.scrollTop) + 'px'  
33 - ripple.style.left = (e.pageX - rect.left - ripple.offsetWidth / 2 - document.documentElement.scrollLeft || document.body.scrollLeft) + 'px'  
34 - }  
35 - ripple.style.backgroundColor = opts.color  
36 - ripple.className = 'waves-ripple z-active'  
37 - return false  
38 - }  
39 - }, false)  
40 - } 3 +export default {
  4 + bind(el, binding) {
  5 + el.addEventListener('click', e => {
  6 + const customOpts = Object.assign({}, binding.value)
  7 + const opts = Object.assign({
  8 + ele: el, // 波纹作用元素
  9 + type: 'hit', // hit 点击位置扩散 center中心点扩展
  10 + color: 'rgba(0, 0, 0, 0.15)' // 波纹颜色
  11 + }, customOpts)
  12 + const target = opts.ele
  13 + if (target) {
  14 + target.style.position = 'relative'
  15 + target.style.overflow = 'hidden'
  16 + const rect = target.getBoundingClientRect()
  17 + let ripple = target.querySelector('.waves-ripple')
  18 + if (!ripple) {
  19 + ripple = document.createElement('span')
  20 + ripple.className = 'waves-ripple'
  21 + ripple.style.height = ripple.style.width = Math.max(rect.width, rect.height) + 'px'
  22 + target.appendChild(ripple)
  23 + } else {
  24 + ripple.className = 'waves-ripple'
  25 + }
  26 + switch (opts.type) {
  27 + case 'center':
  28 + ripple.style.top = (rect.height / 2 - ripple.offsetHeight / 2) + 'px'
  29 + ripple.style.left = (rect.width / 2 - ripple.offsetWidth / 2) + 'px'
  30 + break
  31 + default:
  32 + ripple.style.top = (e.pageY - rect.top - ripple.offsetHeight / 2 - document.documentElement.scrollTop || document.body.scrollTop) + 'px'
  33 + ripple.style.left = (e.pageX - rect.left - ripple.offsetWidth / 2 - document.documentElement.scrollLeft || document.body.scrollLeft) + 'px'
  34 + }
  35 + ripple.style.backgroundColor = opts.color
  36 + ripple.className = 'waves-ripple z-active'
  37 + return false
  38 + }
  39 + }, false)
  40 + }
41 } 41 }
42 42
1 export default { 1 export default {
2 - route: {  
3 - dashboard: 'Dashboard',  
4 - introduction: 'Introduction',  
5 - documentation: 'Documentation',  
6 - guide: 'Guide',  
7 - permission: 'Permission',  
8 - pagePermission: 'Page Permission',  
9 - directivePermission: 'Directive Permission',  
10 - icons: 'Icons',  
11 - components: 'Components',  
12 - componentIndex: 'Introduction',  
13 - tinymce: 'Tinymce',  
14 - markdown: 'Markdown',  
15 - jsonEditor: 'JSON Editor',  
16 - dndList: 'Dnd List',  
17 - splitPane: 'SplitPane',  
18 - avatarUpload: 'Avatar Upload',  
19 - dropzone: 'Dropzone',  
20 - sticky: 'Sticky',  
21 - countTo: 'CountTo',  
22 - componentMixin: 'Mixin',  
23 - backToTop: 'BackToTop',  
24 - dragDialog: 'Drag Dialog',  
25 - dragSelect: 'Drag Select',  
26 - dragKanban: 'Drag Kanban',  
27 - charts: 'Charts',  
28 - keyboardChart: 'Keyboard Chart',  
29 - lineChart: 'Line Chart',  
30 - mixChart: 'Mix Chart',  
31 - example: 'Example',  
32 - nested: 'Nested Routes',  
33 - menu1: 'Menu 1',  
34 - 'menu1-1': 'Menu 1-1',  
35 - 'menu1-2': 'Menu 1-2',  
36 - 'menu1-2-1': 'Menu 1-2-1',  
37 - 'menu1-2-2': 'Menu 1-2-2',  
38 - 'menu1-3': 'Menu 1-3',  
39 - menu2: 'Menu 2',  
40 - Table: 'Table',  
41 - dynamicTable: 'Dynamic Table',  
42 - dragTable: 'Drag Table',  
43 - inlineEditTable: 'Inline Edit',  
44 - complexTable: 'Complex Table',  
45 - treeTable: 'Tree Table',  
46 - customTreeTable: 'Custom TreeTable',  
47 - tab: 'Tab',  
48 - form: 'Form',  
49 - createArticle: 'Create Article',  
50 - editArticle: 'Edit Article',  
51 - articleList: 'Article List',  
52 - errorPages: 'Error Pages',  
53 - page401: '401',  
54 - page404: '404',  
55 - errorLog: 'Error Log',  
56 - excel: 'Excel',  
57 - exportExcel: 'Export Excel',  
58 - selectExcel: 'Export Selected',  
59 - uploadExcel: 'Upload Excel',  
60 - zip: 'Zip',  
61 - pdf: 'PDF',  
62 - exportZip: 'Export Zip',  
63 - theme: 'Theme',  
64 - clipboardDemo: 'Clipboard',  
65 - i18n: 'I18n',  
66 - externalLink: 'External Link'  
67 - },  
68 - navbar: {  
69 - logOut: 'Log Out',  
70 - dashboard: 'Dashboard',  
71 - github: 'Github',  
72 - theme: 'Theme',  
73 - size: 'Global Size'  
74 - },  
75 - login: {  
76 - title: 'Login Form',  
77 - logIn: 'Log in',  
78 - username: 'Username',  
79 - password: 'Password',  
80 - any: 'any',  
81 - thirdparty: 'Or connect with',  
82 - thirdpartyTips: 'Can not be simulated on local, so please combine you own business simulation! ! !'  
83 - },  
84 - documentation: {  
85 - documentation: 'Documentation',  
86 - github: 'Github Repository'  
87 - },  
88 - permission: {  
89 - roles: 'Your roles',  
90 - switchRoles: 'Switch roles',  
91 - tips: 'In some cases it is not suitable to use v-permission, such as element Tab component or el-table-column and other asynchronous rendering dom cases which can only be achieved by manually setting the v-if.'  
92 - },  
93 - guide: {  
94 - description: 'The guide page is useful for some people who entered the project for the first time. You can briefly introduce the features of the project. Demo is based on ',  
95 - button: 'Show Guide'  
96 - },  
97 - components: {  
98 - documentation: 'Documentation',  
99 - tinymceTips: 'Rich text editor is a core part of management system, but at the same time is a place with lots of problems. In the process of selecting rich texts, I also walked a lot of detours. The common rich text editors in the market are basically used, and the finally chose Tinymce. See documentation for more detailed rich text editor comparisons and introductions.',  
100 - dropzoneTips: 'Because my business has special needs, and has to upload images to qiniu, so instead of a third party, I chose encapsulate it by myself. It is very simple, you can see the detail code in @/components/Dropzone.',  
101 - stickyTips: 'when the page is scrolled to the preset position will be sticky on the top.',  
102 - backToTopTips1: 'When the page is scrolled to the specified position, the Back to Top button appears in the lower right corner',  
103 - backToTopTips2: 'You can customize the style of the button, show / hide, height of appearance, height of the return. If you need a text prompt, you can use element-ui el-tooltip elements externally',  
104 - imageUploadTips: 'Since I was using only the vue@1 version, and it is not compatible with mockjs at the moment, I modified it myself, and if you are going to use it, it is better to use official version.'  
105 - },  
106 - table: {  
107 - dynamicTips1: 'Fixed header, sorted by header order',  
108 - dynamicTips2: 'Not fixed header, sorted by click order',  
109 - dragTips1: 'The default order',  
110 - dragTips2: 'The after dragging order',  
111 - title: 'Title',  
112 - importance: 'Imp',  
113 - type: 'Type',  
114 - remark: 'Remark',  
115 - search: 'Search',  
116 - add: 'Add',  
117 - export: 'Export',  
118 - reviewer: 'reviewer',  
119 - id: 'ID',  
120 - date: 'Date',  
121 - author: 'Author',  
122 - readings: 'Readings',  
123 - status: 'Status',  
124 - actions: 'Actions',  
125 - edit: 'Edit',  
126 - publish: 'Publish',  
127 - draft: 'Draft',  
128 - delete: 'Delete',  
129 - cancel: 'Cancel',  
130 - confirm: 'Confirm'  
131 - },  
132 - errorLog: {  
133 - tips: 'Please click the bug icon in the upper right corner',  
134 - description: 'Now the management system are basically the form of the spa, it enhances the user experience, but it also increases the possibility of page problems, a small negligence may lead to the entire page deadlock. Fortunately Vue provides a way to catch handling exceptions, where you can handle errors or report exceptions.',  
135 - documentation: 'Document introduction'  
136 - },  
137 - excel: {  
138 - export: 'Export',  
139 - selectedExport: 'Export Selected Items',  
140 - placeholder: 'Please enter the file name(default excel-list)'  
141 - },  
142 - zip: {  
143 - export: 'Export',  
144 - placeholder: 'Please enter the file name(default file)'  
145 - },  
146 - pdf: {  
147 - tips: 'Here we use window.print() to implement the feature of downloading pdf.'  
148 - },  
149 - theme: {  
150 - change: 'Change Theme',  
151 - documentation: 'Theme documentation',  
152 - tips: 'Tips: It is different from the theme-pick on the navbar is two different skinning methods, each with different application scenarios. Refer to the documentation for details.'  
153 - },  
154 - tagsView: {  
155 - refresh: 'Refresh',  
156 - close: 'Close',  
157 - closeOthers: 'Close Others',  
158 - closeAll: 'Close All'  
159 - } 2 + route: {
  3 + dashboard: 'Dashboard',
  4 + introduction: 'Introduction',
  5 + documentation: 'Documentation',
  6 + guide: 'Guide',
  7 + permission: 'Permission',
  8 + pagePermission: 'Page Permission',
  9 + directivePermission: 'Directive Permission',
  10 + icons: 'Icons',
  11 + components: 'Components',
  12 + componentIndex: 'Introduction',
  13 + tinymce: 'Tinymce',
  14 + markdown: 'Markdown',
  15 + jsonEditor: 'JSON Editor',
  16 + dndList: 'Dnd List',
  17 + splitPane: 'SplitPane',
  18 + avatarUpload: 'Avatar Upload',
  19 + dropzone: 'Dropzone',
  20 + sticky: 'Sticky',
  21 + countTo: 'CountTo',
  22 + componentMixin: 'Mixin',
  23 + backToTop: 'BackToTop',
  24 + dragDialog: 'Drag Dialog',
  25 + dragSelect: 'Drag Select',
  26 + dragKanban: 'Drag Kanban',
  27 + charts: 'Charts',
  28 + keyboardChart: 'Keyboard Chart',
  29 + lineChart: 'Line Chart',
  30 + mixChart: 'Mix Chart',
  31 + example: 'Example',
  32 + nested: 'Nested Routes',
  33 + menu1: 'Menu 1',
  34 + 'menu1-1': 'Menu 1-1',
  35 + 'menu1-2': 'Menu 1-2',
  36 + 'menu1-2-1': 'Menu 1-2-1',
  37 + 'menu1-2-2': 'Menu 1-2-2',
  38 + 'menu1-3': 'Menu 1-3',
  39 + menu2: 'Menu 2',
  40 + Table: 'Table',
  41 + dynamicTable: 'Dynamic Table',
  42 + dragTable: 'Drag Table',
  43 + inlineEditTable: 'Inline Edit',
  44 + complexTable: 'Complex Table',
  45 + treeTable: 'Tree Table',
  46 + customTreeTable: 'Custom TreeTable',
  47 + tab: 'Tab',
  48 + form: 'Form',
  49 + createArticle: 'Create Article',
  50 + editArticle: 'Edit Article',
  51 + articleList: 'Article List',
  52 + errorPages: 'Error Pages',
  53 + page401: '401',
  54 + page404: '404',
  55 + errorLog: 'Error Log',
  56 + excel: 'Excel',
  57 + exportExcel: 'Export Excel',
  58 + selectExcel: 'Export Selected',
  59 + uploadExcel: 'Upload Excel',
  60 + zip: 'Zip',
  61 + pdf: 'PDF',
  62 + exportZip: 'Export Zip',
  63 + theme: 'Theme',
  64 + clipboardDemo: 'Clipboard',
  65 + i18n: 'I18n',
  66 + externalLink: 'External Link'
  67 + },
  68 + navbar: {
  69 + logOut: 'Log Out',
  70 + dashboard: 'Dashboard',
  71 + github: 'Github',
  72 + theme: 'Theme',
  73 + size: 'Global Size'
  74 + },
  75 + login: {
  76 + title: 'Login Form',
  77 + logIn: 'Log in',
  78 + username: 'Username',
  79 + password: 'Password',
  80 + any: 'any',
  81 + thirdparty: 'Or connect with',
  82 + thirdpartyTips: 'Can not be simulated on local, so please combine you own business simulation! ! !'
  83 + },
  84 + documentation: {
  85 + documentation: 'Documentation',
  86 + github: 'Github Repository'
  87 + },
  88 + permission: {
  89 + roles: 'Your roles',
  90 + switchRoles: 'Switch roles',
  91 + tips: 'In some cases it is not suitable to use v-permission, such as element Tab component or el-table-column and other asynchronous rendering dom cases which can only be achieved by manually setting the v-if.'
  92 + },
  93 + guide: {
  94 + description: 'The guide page is useful for some people who entered the project for the first time. You can briefly introduce the features of the project. Demo is based on ',
  95 + button: 'Show Guide'
  96 + },
  97 + components: {
  98 + documentation: 'Documentation',
  99 + tinymceTips: 'Rich text editor is a core part of management system, but at the same time is a place with lots of problems. In the process of selecting rich texts, I also walked a lot of detours. The common rich text editors in the market are basically used, and the finally chose Tinymce. See documentation for more detailed rich text editor comparisons and introductions.',
  100 + dropzoneTips: 'Because my business has special needs, and has to upload images to qiniu, so instead of a third party, I chose encapsulate it by myself. It is very simple, you can see the detail code in @/components/Dropzone.',
  101 + stickyTips: 'when the page is scrolled to the preset position will be sticky on the top.',
  102 + backToTopTips1: 'When the page is scrolled to the specified position, the Back to Top button appears in the lower right corner',
  103 + backToTopTips2: 'You can customize the style of the button, show / hide, height of appearance, height of the return. If you need a text prompt, you can use element-ui el-tooltip elements externally',
  104 + imageUploadTips: 'Since I was using only the vue@1 version, and it is not compatible with mockjs at the moment, I modified it myself, and if you are going to use it, it is better to use official version.'
  105 + },
  106 + table: {
  107 + dynamicTips1: 'Fixed header, sorted by header order',
  108 + dynamicTips2: 'Not fixed header, sorted by click order',
  109 + dragTips1: 'The default order',
  110 + dragTips2: 'The after dragging order',
  111 + title: 'Title',
  112 + importance: 'Imp',
  113 + type: 'Type',
  114 + remark: 'Remark',
  115 + search: 'Search',
  116 + add: 'Add',
  117 + export: 'Export',
  118 + reviewer: 'reviewer',
  119 + id: 'ID',
  120 + date: 'Date',
  121 + author: 'Author',
  122 + readings: 'Readings',
  123 + status: 'Status',
  124 + actions: 'Actions',
  125 + edit: 'Edit',
  126 + publish: 'Publish',
  127 + draft: 'Draft',
  128 + delete: 'Delete',
  129 + cancel: 'Cancel',
  130 + confirm: 'Confirm'
  131 + },
  132 + errorLog: {
  133 + tips: 'Please click the bug icon in the upper right corner',
  134 + description: 'Now the management system are basically the form of the spa, it enhances the user experience, but it also increases the possibility of page problems, a small negligence may lead to the entire page deadlock. Fortunately Vue provides a way to catch handling exceptions, where you can handle errors or report exceptions.',
  135 + documentation: 'Document introduction'
  136 + },
  137 + excel: {
  138 + export: 'Export',
  139 + selectedExport: 'Export Selected Items',
  140 + placeholder: 'Please enter the file name(default excel-list)'
  141 + },
  142 + zip: {
  143 + export: 'Export',
  144 + placeholder: 'Please enter the file name(default file)'
  145 + },
  146 + pdf: {
  147 + tips: 'Here we use window.print() to implement the feature of downloading pdf.'
  148 + },
  149 + theme: {
  150 + change: 'Change Theme',
  151 + documentation: 'Theme documentation',
  152 + tips: 'Tips: It is different from the theme-pick on the navbar is two different skinning methods, each with different application scenarios. Refer to the documentation for details.'
  153 + },
  154 + tagsView: {
  155 + refresh: 'Refresh',
  156 + close: 'Close',
  157 + closeOthers: 'Close Others',
  158 + closeAll: 'Close All'
  159 + }
160 } 160 }
1 export default { 1 export default {
2 - route: {  
3 - dashboard: 'Panel de control',  
4 - introduction: 'Introducción',  
5 - documentation: 'Documentación',  
6 - guide: 'Guía',  
7 - permission: 'Permisos',  
8 - pagePermission: 'Permisos de la página',  
9 - directivePermission: 'Permisos de la directiva',  
10 - icons: 'Iconos',  
11 - components: 'Componentes',  
12 - componentIndex: 'Introducción',  
13 - tinymce: 'Tinymce',  
14 - markdown: 'Markdown',  
15 - jsonEditor: 'Editor JSON',  
16 - dndList: 'Lista Dnd',  
17 - splitPane: 'Panel dividido',  
18 - avatarUpload: 'Subir avatar',  
19 - dropzone: 'Subir ficheros',  
20 - sticky: 'Sticky',  
21 - countTo: 'CountTo',  
22 - componentMixin: 'Mixin',  
23 - backToTop: 'Ir arriba',  
24 - dragDialog: 'Drag Dialog',  
25 - dragSelect: 'Drag Select',  
26 - dragKanban: 'Drag Kanban',  
27 - charts: 'Gráficos',  
28 - keyboardChart: 'Keyboard Chart',  
29 - lineChart: 'Gráfico de líneas',  
30 - mixChart: 'Mix Chart',  
31 - example: 'Ejemplo',  
32 - nested: 'Rutas anidadass',  
33 - menu1: 'Menu 1',  
34 - 'menu1-1': 'Menu 1-1',  
35 - 'menu1-2': 'Menu 1-2',  
36 - 'menu1-2-1': 'Menu 1-2-1',  
37 - 'menu1-2-2': 'Menu 1-2-2',  
38 - 'menu1-3': 'Menu 1-3',  
39 - menu2: 'Menu 2',  
40 - Table: 'Tabla',  
41 - dynamicTable: 'Tabla dinámica',  
42 - dragTable: 'Arrastrar tabla',  
43 - inlineEditTable: 'Editor',  
44 - complexTable: 'Complex Table',  
45 - treeTable: 'Tree Table',  
46 - customTreeTable: 'Custom TreeTable',  
47 - tab: 'Pestaña',  
48 - form: 'Formulario',  
49 - createArticle: 'Crear artículo',  
50 - editArticle: 'Editar artículo',  
51 - articleList: 'Listado de artículos',  
52 - errorPages: 'Páginas de error',  
53 - page401: '401',  
54 - page404: '404',  
55 - errorLog: 'Registro de errores',  
56 - excel: 'Excel',  
57 - exportExcel: 'Exportar a Excel',  
58 - selectExcel: 'Export seleccionado',  
59 - uploadExcel: 'Subir Excel',  
60 - zip: 'Zip',  
61 - pdf: 'PDF',  
62 - exportZip: 'Exportar a Zip',  
63 - theme: 'Tema',  
64 - clipboardDemo: 'Clipboard',  
65 - i18n: 'I18n',  
66 - externalLink: 'Enlace externo'  
67 - },  
68 - navbar: {  
69 - logOut: 'Salir',  
70 - dashboard: 'Panel de control',  
71 - github: 'Github',  
72 - theme: 'Tema',  
73 - size: 'Tamaño global'  
74 - },  
75 - login: {  
76 - title: 'Formulario de acceso',  
77 - logIn: 'Acceso',  
78 - username: 'Usuario',  
79 - password: 'Contraseña',  
80 - any: 'nada',  
81 - thirdparty: 'Conectar con',  
82 - thirdpartyTips: 'No se puede simular en local, así que combine su propia simulación de negocios. ! !'  
83 - },  
84 - documentation: {  
85 - documentation: 'Documentación',  
86 - github: 'Repositorio Github'  
87 - },  
88 - permission: {  
89 - roles: 'Tus permisos',  
90 - switchRoles: 'Cambiar permisos',  
91 - tips: 'In some cases it is not suitable to use v-permission, such as element Tab component or el-table-column and other asynchronous rendering dom cases which can only be achieved by manually setting the v-if.'  
92 - },  
93 - guide: {  
94 - description: 'The guide page is useful for some people who entered the project for the first time. You can briefly introduce the features of the project. Demo is based on ',  
95 - button: 'Ver guía'  
96 - },  
97 - components: {  
98 - documentation: 'Documentación',  
99 - tinymceTips: 'Rich text editor is a core part of management system, but at the same time is a place with lots of problems. In the process of selecting rich texts, I also walked a lot of detours. The common rich text editors in the market are basically used, and the finally chose Tinymce. See documentation for more detailed rich text editor comparisons and introductions.',  
100 - dropzoneTips: 'Because my business has special needs, and has to upload images to qiniu, so instead of a third party, I chose encapsulate it by myself. It is very simple, you can see the detail code in @/components/Dropzone.',  
101 - stickyTips: 'when the page is scrolled to the preset position will be sticky on the top.',  
102 - backToTopTips1: 'When the page is scrolled to the specified position, the Back to Top button appears in the lower right corner',  
103 - backToTopTips2: 'You can customize the style of the button, show / hide, height of appearance, height of the return. If you need a text prompt, you can use element-ui el-tooltip elements externally',  
104 - imageUploadTips: 'Since I was using only the vue@1 version, and it is not compatible with mockjs at the moment, I modified it myself, and if you are going to use it, it is better to use official version.'  
105 - },  
106 - table: {  
107 - dynamicTips1: 'Fixed header, sorted by header order',  
108 - dynamicTips2: 'Not fixed header, sorted by click order',  
109 - dragTips1: 'Orden por defecto',  
110 - dragTips2: 'The after dragging order',  
111 - title: 'Título',  
112 - importance: 'Importancia',  
113 - type: 'Tipo',  
114 - remark: 'Remark',  
115 - search: 'Buscar',  
116 - add: 'Añadir',  
117 - export: 'Exportar',  
118 - reviewer: 'reviewer',  
119 - id: 'ID',  
120 - date: 'Fecha',  
121 - author: 'Autor',  
122 - readings: 'Lector',  
123 - status: 'Estado',  
124 - actions: 'Acciones',  
125 - edit: 'Editar',  
126 - publish: 'Publicar',  
127 - draft: 'Draft',  
128 - delete: 'Eliminar',  
129 - cancel: 'Cancelar',  
130 - confirm: 'Confirmar'  
131 - },  
132 - errorLog: {  
133 - tips: 'Please click the bug icon in the upper right corner',  
134 - description: 'Now the management system are basically the form of the spa, it enhances the user experience, but it also increases the possibility of page problems, a small negligence may lead to the entire page deadlock. Fortunately Vue provides a way to catch handling exceptions, where you can handle errors or report exceptions.',  
135 - documentation: 'Documento de introducción'  
136 - },  
137 - excel: {  
138 - export: 'Exportar',  
139 - selectedExport: 'Exportar seleccionados',  
140 - placeholder: 'Por favor escribe un nombre de fichero'  
141 - },  
142 - zip: {  
143 - export: 'Exportar',  
144 - placeholder: 'Por favor escribe un nombre de fichero'  
145 - },  
146 - pdf: {  
147 - tips: 'Here we use window.print() to implement the feature of downloading pdf.'  
148 - },  
149 - theme: {  
150 - change: 'Cambiar tema',  
151 - documentation: 'Documentación del tema',  
152 - tips: 'Tips: It is different from the theme-pick on the navbar is two different skinning methods, each with different application scenarios. Refer to the documentation for details.'  
153 - },  
154 - tagsView: {  
155 - refresh: 'Actualizar',  
156 - close: 'Cerrar',  
157 - closeOthers: 'Cerrar otros',  
158 - closeAll: 'Cerrar todos'  
159 - } 2 + route: {
  3 + dashboard: 'Panel de control',
  4 + introduction: 'Introducción',
  5 + documentation: 'Documentación',
  6 + guide: 'Guía',
  7 + permission: 'Permisos',
  8 + pagePermission: 'Permisos de la página',
  9 + directivePermission: 'Permisos de la directiva',
  10 + icons: 'Iconos',
  11 + components: 'Componentes',
  12 + componentIndex: 'Introducción',
  13 + tinymce: 'Tinymce',
  14 + markdown: 'Markdown',
  15 + jsonEditor: 'Editor JSON',
  16 + dndList: 'Lista Dnd',
  17 + splitPane: 'Panel dividido',
  18 + avatarUpload: 'Subir avatar',
  19 + dropzone: 'Subir ficheros',
  20 + sticky: 'Sticky',
  21 + countTo: 'CountTo',
  22 + componentMixin: 'Mixin',
  23 + backToTop: 'Ir arriba',
  24 + dragDialog: 'Drag Dialog',
  25 + dragSelect: 'Drag Select',
  26 + dragKanban: 'Drag Kanban',
  27 + charts: 'Gráficos',
  28 + keyboardChart: 'Keyboard Chart',
  29 + lineChart: 'Gráfico de líneas',
  30 + mixChart: 'Mix Chart',
  31 + example: 'Ejemplo',
  32 + nested: 'Rutas anidadass',
  33 + menu1: 'Menu 1',
  34 + 'menu1-1': 'Menu 1-1',
  35 + 'menu1-2': 'Menu 1-2',
  36 + 'menu1-2-1': 'Menu 1-2-1',
  37 + 'menu1-2-2': 'Menu 1-2-2',
  38 + 'menu1-3': 'Menu 1-3',
  39 + menu2: 'Menu 2',
  40 + Table: 'Tabla',
  41 + dynamicTable: 'Tabla dinámica',
  42 + dragTable: 'Arrastrar tabla',
  43 + inlineEditTable: 'Editor',
  44 + complexTable: 'Complex Table',
  45 + treeTable: 'Tree Table',
  46 + customTreeTable: 'Custom TreeTable',
  47 + tab: 'Pestaña',
  48 + form: 'Formulario',
  49 + createArticle: 'Crear artículo',
  50 + editArticle: 'Editar artículo',
  51 + articleList: 'Listado de artículos',
  52 + errorPages: 'Páginas de error',
  53 + page401: '401',
  54 + page404: '404',
  55 + errorLog: 'Registro de errores',
  56 + excel: 'Excel',
  57 + exportExcel: 'Exportar a Excel',
  58 + selectExcel: 'Export seleccionado',
  59 + uploadExcel: 'Subir Excel',
  60 + zip: 'Zip',
  61 + pdf: 'PDF',
  62 + exportZip: 'Exportar a Zip',
  63 + theme: 'Tema',
  64 + clipboardDemo: 'Clipboard',
  65 + i18n: 'I18n',
  66 + externalLink: 'Enlace externo'
  67 + },
  68 + navbar: {
  69 + logOut: 'Salir',
  70 + dashboard: 'Panel de control',
  71 + github: 'Github',
  72 + theme: 'Tema',
  73 + size: 'Tamaño global'
  74 + },
  75 + login: {
  76 + title: 'Formulario de acceso',
  77 + logIn: 'Acceso',
  78 + username: 'Usuario',
  79 + password: 'Contraseña',
  80 + any: 'nada',
  81 + thirdparty: 'Conectar con',
  82 + thirdpartyTips: 'No se puede simular en local, así que combine su propia simulación de negocios. ! !'
  83 + },
  84 + documentation: {
  85 + documentation: 'Documentación',
  86 + github: 'Repositorio Github'
  87 + },
  88 + permission: {
  89 + roles: 'Tus permisos',
  90 + switchRoles: 'Cambiar permisos',
  91 + tips: 'In some cases it is not suitable to use v-permission, such as element Tab component or el-table-column and other asynchronous rendering dom cases which can only be achieved by manually setting the v-if.'
  92 + },
  93 + guide: {
  94 + description: 'The guide page is useful for some people who entered the project for the first time. You can briefly introduce the features of the project. Demo is based on ',
  95 + button: 'Ver guía'
  96 + },
  97 + components: {
  98 + documentation: 'Documentación',
  99 + tinymceTips: 'Rich text editor is a core part of management system, but at the same time is a place with lots of problems. In the process of selecting rich texts, I also walked a lot of detours. The common rich text editors in the market are basically used, and the finally chose Tinymce. See documentation for more detailed rich text editor comparisons and introductions.',
  100 + dropzoneTips: 'Because my business has special needs, and has to upload images to qiniu, so instead of a third party, I chose encapsulate it by myself. It is very simple, you can see the detail code in @/components/Dropzone.',
  101 + stickyTips: 'when the page is scrolled to the preset position will be sticky on the top.',
  102 + backToTopTips1: 'When the page is scrolled to the specified position, the Back to Top button appears in the lower right corner',
  103 + backToTopTips2: 'You can customize the style of the button, show / hide, height of appearance, height of the return. If you need a text prompt, you can use element-ui el-tooltip elements externally',
  104 + imageUploadTips: 'Since I was using only the vue@1 version, and it is not compatible with mockjs at the moment, I modified it myself, and if you are going to use it, it is better to use official version.'
  105 + },
  106 + table: {
  107 + dynamicTips1: 'Fixed header, sorted by header order',
  108 + dynamicTips2: 'Not fixed header, sorted by click order',
  109 + dragTips1: 'Orden por defecto',
  110 + dragTips2: 'The after dragging order',
  111 + title: 'Título',
  112 + importance: 'Importancia',
  113 + type: 'Tipo',
  114 + remark: 'Remark',
  115 + search: 'Buscar',
  116 + add: 'Añadir',
  117 + export: 'Exportar',
  118 + reviewer: 'reviewer',
  119 + id: 'ID',
  120 + date: 'Fecha',
  121 + author: 'Autor',
  122 + readings: 'Lector',
  123 + status: 'Estado',
  124 + actions: 'Acciones',
  125 + edit: 'Editar',
  126 + publish: 'Publicar',
  127 + draft: 'Draft',
  128 + delete: 'Eliminar',
  129 + cancel: 'Cancelar',
  130 + confirm: 'Confirmar'
  131 + },
  132 + errorLog: {
  133 + tips: 'Please click the bug icon in the upper right corner',
  134 + description: 'Now the management system are basically the form of the spa, it enhances the user experience, but it also increases the possibility of page problems, a small negligence may lead to the entire page deadlock. Fortunately Vue provides a way to catch handling exceptions, where you can handle errors or report exceptions.',
  135 + documentation: 'Documento de introducción'
  136 + },
  137 + excel: {
  138 + export: 'Exportar',
  139 + selectedExport: 'Exportar seleccionados',
  140 + placeholder: 'Por favor escribe un nombre de fichero'
  141 + },
  142 + zip: {
  143 + export: 'Exportar',
  144 + placeholder: 'Por favor escribe un nombre de fichero'
  145 + },
  146 + pdf: {
  147 + tips: 'Here we use window.print() to implement the feature of downloading pdf.'
  148 + },
  149 + theme: {
  150 + change: 'Cambiar tema',
  151 + documentation: 'Documentación del tema',
  152 + tips: 'Tips: It is different from the theme-pick on the navbar is two different skinning methods, each with different application scenarios. Refer to the documentation for details.'
  153 + },
  154 + tagsView: {
  155 + refresh: 'Actualizar',
  156 + close: 'Cerrar',
  157 + closeOthers: 'Cerrar otros',
  158 + closeAll: 'Cerrar todos'
  159 + }
160 } 160 }
@@ -11,26 +11,26 @@ import esLocale from './es' @@ -11,26 +11,26 @@ import esLocale from './es'
11 Vue.use(VueI18n) 11 Vue.use(VueI18n)
12 12
13 const messages = { 13 const messages = {
14 - en: {  
15 - ...enLocale,  
16 - ...elementEnLocale  
17 - },  
18 - zh: {  
19 - ...zhLocale,  
20 - ...elementZhLocale  
21 - },  
22 - es: {  
23 - ...esLocale,  
24 - ...elementEsLocale  
25 - } 14 + en: {
  15 + ...enLocale,
  16 + ...elementEnLocale
  17 + },
  18 + zh: {
  19 + ...zhLocale,
  20 + ...elementZhLocale
  21 + },
  22 + es: {
  23 + ...esLocale,
  24 + ...elementEsLocale
  25 + }
26 } 26 }
27 27
28 const i18n = new VueI18n({ 28 const i18n = new VueI18n({
29 - // set locale  
30 - // options: en | zh | es  
31 - locale: Cookies.get('language') || 'en',  
32 - // set locale messages  
33 - messages 29 + // set locale
  30 + // options: en | zh | es
  31 + locale: Cookies.get('language') || 'en',
  32 + // set locale messages
  33 + messages
34 }) 34 })
35 35
36 export default i18n 36 export default i18n