├── DemoWebManage ├── .babelrc ├── .editorconfig ├── .gitignore ├── .postcssrc.js ├── README.md ├── build │ ├── build.js │ ├── check-versions.js │ ├── logo.png │ ├── utils.js │ ├── vue-loader.conf.js │ ├── webpack.base.conf.js │ ├── webpack.dev.conf.js │ └── webpack.prod.conf.js ├── config.scss ├── config │ ├── dev.env.js │ ├── index.js │ └── prod.env.js ├── index.html ├── package-lock.json ├── package.json ├── src │ ├── App.vue │ ├── assets │ │ ├── loginBg.jpg │ │ └── logo.jpg │ ├── common │ │ ├── global.js │ │ ├── https.js │ │ ├── router.js │ │ ├── style │ │ │ └── global.scss │ │ ├── u-charts.min.js │ │ └── vuex.js │ ├── main.js │ └── pages │ │ ├── Admin │ │ ├── ExamplePage.vue │ │ ├── HomeDefault.vue │ │ ├── ModuleOne.vue │ │ ├── ModuleTwo.vue │ │ └── UserManage.vue │ │ ├── Home.vue │ │ └── Login.vue └── static │ └── .gitkeep └── TestProject ├── Readme.txt └── listScroll.html /DemoWebManage/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["env", { 4 | "modules": false, 5 | "targets": { 6 | "browsers": ["> 1%", "last 2 versions", "not ie <= 8"] 7 | } 8 | }], 9 | "stage-2" 10 | ], 11 | "plugins": ["transform-vue-jsx", "transform-runtime"] 12 | } 13 | -------------------------------------------------------------------------------- /DemoWebManage/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /DemoWebManage/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | /dist/ 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Editor directories and files 9 | .idea 10 | .vscode 11 | *.suo 12 | *.ntvs* 13 | *.njsproj 14 | *.sln 15 | -------------------------------------------------------------------------------- /DemoWebManage/.postcssrc.js: -------------------------------------------------------------------------------- 1 | // https://github.com/michael-ciniawsky/postcss-load-config 2 | 3 | module.exports = { 4 | "plugins": { 5 | "postcss-import": {}, 6 | "postcss-url": {}, 7 | // to edit target browsers: use "browserslist" field in package.json 8 | "autoprefixer": {} 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /DemoWebManage/README.md: -------------------------------------------------------------------------------- 1 | #webManage 2 | 3 | > Web管理系统实示例Demo 4 | 5 | 拿到项目先 npm install 6 | 然后在运行 npm run dev 7 | ## Build Setup 8 | 9 | ``` bash 10 | # install dependencies 11 | npm install 12 | 13 | # serve with hot reload at localhost:8080 14 | npm run dev 15 | 16 | # build for production with minification 17 | npm run build 18 | 19 | # build for production and view the bundle analyzer report 20 | npm run build --report 21 | ``` 22 | 23 | ## Git 贡献提交规范 24 | 25 | - 参考 [vue](https://github.com/vuejs/vue/blob/dev/.github/COMMIT_CONVENTION.md) 规范 26 | - `feat` 增加新功能 27 | - `fix` 修复问题/BUG 28 | - `style` 代码风格相关无影响运行结果的 29 | - `perf` 优化/性能提升 30 | - `refactor` 重构 31 | - `revert` 撤销修改 32 | - `test` 测试相关 33 | - `docs` 文档/注释 34 | - `chore` 依赖更新/脚手架配置修改等 35 | - `workflow` 工作流改进 36 | - `ci` 持续集成 37 | - `types` 类型定义文件更改 38 | - `wip` 开发中 39 | 40 | 41 | For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader). 42 | -------------------------------------------------------------------------------- /DemoWebManage/build/build.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | require('./check-versions')() 3 | 4 | process.env.NODE_ENV = 'production' 5 | 6 | const ora = require('ora') 7 | const rm = require('rimraf') 8 | const path = require('path') 9 | const chalk = require('chalk') 10 | const webpack = require('webpack') 11 | const config = require('../config') 12 | const webpackConfig = require('./webpack.prod.conf') 13 | 14 | const spinner = ora('building for production...') 15 | spinner.start() 16 | 17 | rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => { 18 | if (err) throw err 19 | webpack(webpackConfig, (err, stats) => { 20 | spinner.stop() 21 | if (err) throw err 22 | process.stdout.write(stats.toString({ 23 | colors: true, 24 | modules: false, 25 | children: false, // If you are using ts-loader, setting this to true will make TypeScript errors show up during build. 26 | chunks: false, 27 | chunkModules: false 28 | }) + '\n\n') 29 | 30 | if (stats.hasErrors()) { 31 | console.log(chalk.red(' Build failed with errors.\n')) 32 | process.exit(1) 33 | } 34 | 35 | console.log(chalk.cyan(' Build complete.\n')) 36 | console.log(chalk.yellow( 37 | ' Tip: built files are meant to be served over an HTTP server.\n' + 38 | ' Opening index.html over file:// won\'t work.\n' 39 | )) 40 | }) 41 | }) 42 | -------------------------------------------------------------------------------- /DemoWebManage/build/check-versions.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const chalk = require('chalk') 3 | const semver = require('semver') 4 | const packageConfig = require('../package.json') 5 | const shell = require('shelljs') 6 | 7 | function exec (cmd) { 8 | return require('child_process').execSync(cmd).toString().trim() 9 | } 10 | 11 | const versionRequirements = [ 12 | { 13 | name: 'node', 14 | currentVersion: semver.clean(process.version), 15 | versionRequirement: packageConfig.engines.node 16 | } 17 | ] 18 | 19 | if (shell.which('npm')) { 20 | versionRequirements.push({ 21 | name: 'npm', 22 | currentVersion: exec('npm --version'), 23 | versionRequirement: packageConfig.engines.npm 24 | }) 25 | } 26 | 27 | module.exports = function () { 28 | const warnings = [] 29 | 30 | for (let i = 0; i < versionRequirements.length; i++) { 31 | const mod = versionRequirements[i] 32 | 33 | if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) { 34 | warnings.push(mod.name + ': ' + 35 | chalk.red(mod.currentVersion) + ' should be ' + 36 | chalk.green(mod.versionRequirement) 37 | ) 38 | } 39 | } 40 | 41 | if (warnings.length) { 42 | console.log('') 43 | console.log(chalk.yellow('To use this template, you must update following to modules:')) 44 | console.log() 45 | 46 | for (let i = 0; i < warnings.length; i++) { 47 | const warning = warnings[i] 48 | console.log(' ' + warning) 49 | } 50 | 51 | console.log() 52 | process.exit(1) 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /DemoWebManage/build/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoneXuu/DemoProject/2430a31727c65d74465b27691e91d20a5074fc53/DemoWebManage/build/logo.png -------------------------------------------------------------------------------- /DemoWebManage/build/utils.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const path = require('path') 3 | const config = require('../config') 4 | const ExtractTextPlugin = require('extract-text-webpack-plugin') 5 | const packageConfig = require('../package.json') 6 | 7 | exports.assetsPath = function (_path) { 8 | const assetsSubDirectory = process.env.NODE_ENV === 'production' 9 | ? config.build.assetsSubDirectory 10 | : config.dev.assetsSubDirectory 11 | 12 | return path.posix.join(assetsSubDirectory, _path) 13 | } 14 | 15 | exports.cssLoaders = function (options) { 16 | options = options || {} 17 | 18 | const cssLoader = { 19 | loader: 'css-loader', 20 | options: { 21 | sourceMap: options.sourceMap 22 | } 23 | } 24 | 25 | const postcssLoader = { 26 | loader: 'postcss-loader', 27 | options: { 28 | sourceMap: options.sourceMap 29 | } 30 | } 31 | 32 | // generate loader string to be used with extract text plugin 33 | function generateLoaders (loader, loaderOptions) { 34 | const loaders = options.usePostCSS ? [cssLoader, postcssLoader] : [cssLoader] 35 | 36 | if (loader) { 37 | loaders.push({ 38 | loader: loader + '-loader', 39 | options: Object.assign({}, loaderOptions, { 40 | sourceMap: options.sourceMap 41 | }) 42 | }) 43 | } 44 | 45 | // Extract CSS when that option is specified 46 | // (which is the case during production build) 47 | if (options.extract) { 48 | return ExtractTextPlugin.extract({ 49 | use: loaders, 50 | fallback: 'vue-style-loader' 51 | }) 52 | } else { 53 | return ['vue-style-loader'].concat(loaders) 54 | } 55 | } 56 | 57 | // https://vue-loader.vuejs.org/en/configurations/extract-css.html 58 | return { 59 | css: generateLoaders(), 60 | postcss: generateLoaders(), 61 | less: generateLoaders('less'), 62 | sass: generateLoaders('sass', { indentedSyntax: true }), 63 | scss: generateLoaders('sass').concat({ 64 | loader: 'sass-resources-loader', 65 | options: { 66 | resources: path.resolve(__dirname, '../config.scss') 67 | } 68 | } 69 | ), 70 | stylus: generateLoaders('stylus'), 71 | styl: generateLoaders('stylus') 72 | } 73 | } 74 | 75 | // Generate loaders for standalone style files (outside of .vue) 76 | exports.styleLoaders = function (options) { 77 | const output = [] 78 | const loaders = exports.cssLoaders(options) 79 | 80 | for (const extension in loaders) { 81 | const loader = loaders[extension] 82 | output.push({ 83 | test: new RegExp('\\.' + extension + '$'), 84 | use: loader 85 | }) 86 | } 87 | 88 | return output 89 | } 90 | 91 | exports.createNotifierCallback = () => { 92 | const notifier = require('node-notifier') 93 | 94 | return (severity, errors) => { 95 | if (severity !== 'error') return 96 | 97 | const error = errors[0] 98 | const filename = error.file && error.file.split('!').pop() 99 | 100 | notifier.notify({ 101 | title: packageConfig.name, 102 | message: severity + ': ' + error.name, 103 | subtitle: filename || '', 104 | icon: path.join(__dirname, 'logo.png') 105 | }) 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /DemoWebManage/build/vue-loader.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const utils = require('./utils') 3 | const config = require('../config') 4 | const isProduction = process.env.NODE_ENV === 'production' 5 | const sourceMapEnabled = isProduction 6 | ? config.build.productionSourceMap 7 | : config.dev.cssSourceMap 8 | 9 | module.exports = { 10 | loaders: utils.cssLoaders({ 11 | sourceMap: sourceMapEnabled, 12 | extract: isProduction 13 | }), 14 | cssSourceMap: sourceMapEnabled, 15 | cacheBusting: config.dev.cacheBusting, 16 | transformToRequire: { 17 | video: ['src', 'poster'], 18 | source: 'src', 19 | img: 'src', 20 | image: 'xlink:href' 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /DemoWebManage/build/webpack.base.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const path = require('path') 3 | const utils = require('./utils') 4 | const config = require('../config') 5 | const vueLoaderConfig = require('./vue-loader.conf') 6 | 7 | function resolve (dir) { 8 | return path.join(__dirname, '..', dir) 9 | } 10 | 11 | 12 | 13 | module.exports = { 14 | context: path.resolve(__dirname, '../'), 15 | entry: { 16 | app: './src/main.js' 17 | }, 18 | output: { 19 | path: config.build.assetsRoot, 20 | filename: '[name].js', 21 | publicPath: process.env.NODE_ENV === 'production' 22 | ? config.build.assetsPublicPath 23 | : config.dev.assetsPublicPath 24 | }, 25 | resolve: { 26 | extensions: ['.js', '.vue', '.json'], 27 | alias: { 28 | 'vue$': 'vue/dist/vue.esm.js', 29 | '@': resolve('src'), 30 | } 31 | }, 32 | module: { 33 | rules: [ 34 | { 35 | test: /\.vue$/, 36 | loader: 'vue-loader', 37 | options: vueLoaderConfig 38 | }, 39 | { 40 | test: /\.js$/, 41 | loader: 'babel-loader', 42 | include: [resolve('src'), resolve('test'), resolve('node_modules/webpack-dev-server/client')] 43 | }, 44 | { 45 | test: /\.(png|jpe?g|gif|svg)(\?.*)?$/, 46 | loader: 'url-loader', 47 | options: { 48 | limit: 10000, 49 | name: utils.assetsPath('img/[name].[hash:7].[ext]') 50 | } 51 | }, 52 | { 53 | test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/, 54 | loader: 'url-loader', 55 | options: { 56 | limit: 10000, 57 | name: utils.assetsPath('media/[name].[hash:7].[ext]') 58 | } 59 | }, 60 | { 61 | test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/, 62 | loader: 'url-loader', 63 | options: { 64 | limit: 10000, 65 | name: utils.assetsPath('fonts/[name].[hash:7].[ext]') 66 | } 67 | } 68 | ] 69 | }, 70 | node: { 71 | // prevent webpack from injecting useless setImmediate polyfill because Vue 72 | // source contains it (although only uses it if it's native). 73 | setImmediate: false, 74 | // prevent webpack from injecting mocks to Node native modules 75 | // that does not make sense for the client 76 | dgram: 'empty', 77 | fs: 'empty', 78 | net: 'empty', 79 | tls: 'empty', 80 | child_process: 'empty' 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /DemoWebManage/build/webpack.dev.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const utils = require('./utils') 3 | const webpack = require('webpack') 4 | const config = require('../config') 5 | const merge = require('webpack-merge') 6 | const path = require('path') 7 | const baseWebpackConfig = require('./webpack.base.conf') 8 | const CopyWebpackPlugin = require('copy-webpack-plugin') 9 | const HtmlWebpackPlugin = require('html-webpack-plugin') 10 | const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin') 11 | const portfinder = require('portfinder') 12 | 13 | const HOST = process.env.HOST 14 | const PORT = process.env.PORT && Number(process.env.PORT) 15 | 16 | const devWebpackConfig = merge(baseWebpackConfig, { 17 | module: { 18 | rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap, usePostCSS: true }) 19 | }, 20 | // cheap-module-eval-source-map is faster for development 21 | devtool: config.dev.devtool, 22 | 23 | // these devServer options should be customized in /config/index.js 24 | devServer: { 25 | clientLogLevel: 'warning', 26 | historyApiFallback: { 27 | rewrites: [ 28 | { from: /.*/, to: path.posix.join(config.dev.assetsPublicPath, 'index.html') }, 29 | ], 30 | }, 31 | hot: true, 32 | contentBase: false, // since we use CopyWebpackPlugin. 33 | compress: true, 34 | host: HOST || config.dev.host, 35 | port: PORT || config.dev.port, 36 | open: config.dev.autoOpenBrowser, 37 | overlay: config.dev.errorOverlay 38 | ? { warnings: false, errors: true } 39 | : false, 40 | publicPath: config.dev.assetsPublicPath, 41 | proxy: config.dev.proxyTable, 42 | quiet: true, // necessary for FriendlyErrorsPlugin 43 | watchOptions: { 44 | poll: config.dev.poll, 45 | } 46 | }, 47 | plugins: [ 48 | new webpack.DefinePlugin({ 49 | 'process.env': require('../config/dev.env') 50 | }), 51 | new webpack.HotModuleReplacementPlugin(), 52 | new webpack.NamedModulesPlugin(), // HMR shows correct file names in console on update. 53 | new webpack.NoEmitOnErrorsPlugin(), 54 | // https://github.com/ampedandwired/html-webpack-plugin 55 | new HtmlWebpackPlugin({ 56 | filename: 'index.html', 57 | template: 'index.html', 58 | inject: true 59 | }), 60 | // copy custom static assets 61 | new CopyWebpackPlugin([ 62 | { 63 | from: path.resolve(__dirname, '../static'), 64 | to: config.dev.assetsSubDirectory, 65 | ignore: ['.*'] 66 | } 67 | ]) 68 | ] 69 | }) 70 | 71 | module.exports = new Promise((resolve, reject) => { 72 | portfinder.basePort = process.env.PORT || config.dev.port 73 | portfinder.getPort((err, port) => { 74 | if (err) { 75 | reject(err) 76 | } else { 77 | // publish the new Port, necessary for e2e tests 78 | process.env.PORT = port 79 | // add port to devServer config 80 | devWebpackConfig.devServer.port = port 81 | 82 | // Add FriendlyErrorsPlugin 83 | devWebpackConfig.plugins.push(new FriendlyErrorsPlugin({ 84 | compilationSuccessInfo: { 85 | messages: [`Your application is running here: http://${devWebpackConfig.devServer.host}:${port}`], 86 | }, 87 | onErrors: config.dev.notifyOnErrors 88 | ? utils.createNotifierCallback() 89 | : undefined 90 | })) 91 | 92 | resolve(devWebpackConfig) 93 | } 94 | }) 95 | }) 96 | -------------------------------------------------------------------------------- /DemoWebManage/build/webpack.prod.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const path = require('path') 3 | const utils = require('./utils') 4 | const webpack = require('webpack') 5 | const config = require('../config') 6 | const merge = require('webpack-merge') 7 | const baseWebpackConfig = require('./webpack.base.conf') 8 | const CopyWebpackPlugin = require('copy-webpack-plugin') 9 | const HtmlWebpackPlugin = require('html-webpack-plugin') 10 | const ExtractTextPlugin = require('extract-text-webpack-plugin') 11 | const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin') 12 | const UglifyJsPlugin = require('uglifyjs-webpack-plugin') 13 | 14 | const env = require('../config/prod.env') 15 | 16 | const webpackConfig = merge(baseWebpackConfig, { 17 | module: { 18 | rules: utils.styleLoaders({ 19 | sourceMap: config.build.productionSourceMap, 20 | extract: true, 21 | usePostCSS: true 22 | }) 23 | }, 24 | devtool: config.build.productionSourceMap ? config.build.devtool : false, 25 | output: { 26 | path: config.build.assetsRoot, 27 | filename: utils.assetsPath('js/[name].[chunkhash].js'), 28 | chunkFilename: utils.assetsPath('js/[id].[chunkhash].js') 29 | }, 30 | plugins: [ 31 | // http://vuejs.github.io/vue-loader/en/workflow/production.html 32 | new webpack.DefinePlugin({ 33 | 'process.env': env 34 | }), 35 | new UglifyJsPlugin({ 36 | uglifyOptions: { 37 | compress: { 38 | warnings: false 39 | } 40 | }, 41 | sourceMap: config.build.productionSourceMap, 42 | parallel: true 43 | }), 44 | // extract css into its own file 45 | new ExtractTextPlugin({ 46 | filename: utils.assetsPath('css/[name].[contenthash].css'), 47 | // Setting the following option to `false` will not extract CSS from codesplit chunks. 48 | // Their CSS will instead be inserted dynamically with style-loader when the codesplit chunk has been loaded by webpack. 49 | // It's currently set to `true` because we are seeing that sourcemaps are included in the codesplit bundle as well when it's `false`, 50 | // increasing file size: https://github.com/vuejs-templates/webpack/issues/1110 51 | allChunks: true, 52 | }), 53 | // Compress extracted CSS. We are using this plugin so that possible 54 | // duplicated CSS from different components can be deduped. 55 | new OptimizeCSSPlugin({ 56 | cssProcessorOptions: config.build.productionSourceMap 57 | ? { safe: true, map: { inline: false } } 58 | : { safe: true } 59 | }), 60 | // generate dist index.html with correct asset hash for caching. 61 | // you can customize output by editing /index.html 62 | // see https://github.com/ampedandwired/html-webpack-plugin 63 | new HtmlWebpackPlugin({ 64 | filename: config.build.index, 65 | template: 'index.html', 66 | inject: true, 67 | minify: { 68 | removeComments: true, 69 | collapseWhitespace: true, 70 | removeAttributeQuotes: true 71 | // more options: 72 | // https://github.com/kangax/html-minifier#options-quick-reference 73 | }, 74 | // necessary to consistently work with multiple chunks via CommonsChunkPlugin 75 | chunksSortMode: 'dependency' 76 | }), 77 | // keep module.id stable when vendor modules does not change 78 | new webpack.HashedModuleIdsPlugin(), 79 | // enable scope hoisting 80 | new webpack.optimize.ModuleConcatenationPlugin(), 81 | // split vendor js into its own file 82 | new webpack.optimize.CommonsChunkPlugin({ 83 | name: 'vendor', 84 | minChunks (module) { 85 | // any required modules inside node_modules are extracted to vendor 86 | return ( 87 | module.resource && 88 | /\.js$/.test(module.resource) && 89 | module.resource.indexOf( 90 | path.join(__dirname, '../node_modules') 91 | ) === 0 92 | ) 93 | } 94 | }), 95 | // extract webpack runtime and module manifest to its own file in order to 96 | // prevent vendor hash from being updated whenever app bundle is updated 97 | new webpack.optimize.CommonsChunkPlugin({ 98 | name: 'manifest', 99 | minChunks: Infinity 100 | }), 101 | // This instance extracts shared chunks from code splitted chunks and bundles them 102 | // in a separate chunk, similar to the vendor chunk 103 | // see: https://webpack.js.org/plugins/commons-chunk-plugin/#extra-async-commons-chunk 104 | new webpack.optimize.CommonsChunkPlugin({ 105 | name: 'app', 106 | async: 'vendor-async', 107 | children: true, 108 | minChunks: 3 109 | }), 110 | 111 | // copy custom static assets 112 | new CopyWebpackPlugin([ 113 | { 114 | from: path.resolve(__dirname, '../static'), 115 | to: config.build.assetsSubDirectory, 116 | ignore: ['.*'] 117 | } 118 | ]) 119 | ] 120 | }) 121 | 122 | if (config.build.productionGzip) { 123 | const CompressionWebpackPlugin = require('compression-webpack-plugin') 124 | 125 | webpackConfig.plugins.push( 126 | new CompressionWebpackPlugin({ 127 | asset: '[path].gz[query]', 128 | algorithm: 'gzip', 129 | test: new RegExp( 130 | '\\.(' + 131 | config.build.productionGzipExtensions.join('|') + 132 | ')$' 133 | ), 134 | threshold: 10240, 135 | minRatio: 0.8 136 | }) 137 | ) 138 | } 139 | 140 | if (config.build.bundleAnalyzerReport) { 141 | const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin 142 | webpackConfig.plugins.push(new BundleAnalyzerPlugin()) 143 | } 144 | 145 | module.exports = webpackConfig 146 | -------------------------------------------------------------------------------- /DemoWebManage/config.scss: -------------------------------------------------------------------------------- 1 | 2 | /* 行为相关颜色 */ 3 | $colTheme: #642fb5; 4 | // $colThemeOp: #642fb5; 5 | $colYellow: #f0ad4e; 6 | $colPaleGreen: #4cd964; 7 | $colBlue: #4e9ef0; 8 | $colGreen: #1aad19; 9 | $colBlack: #333333; 10 | $colRed: #dd524d; 11 | $colWhite: #ffffff; 12 | $colGray:#adadad;//辅助灰色,如加载更多的提示信息 13 | $colGrey:#c0c0c0; 14 | $colGolden:#ffc000; 15 | 16 | /* 背景颜色 */ 17 | $bgWhite:#ffffff !default; 18 | $bgGray:#f3f3f3; 19 | $bgBlack:#444444; 20 | $bgMask:rgba(0, 0, 0, 0.4);//遮罩颜色 21 | 22 | /* 文字*/ 23 | $fontSM:10px; 24 | $fontBS:13px; 25 | $fontLG:16px; 26 | $fontXL:20px; 27 | $lineHeightSM:16px; 28 | $lineHeightBS:26px; 29 | $lineHeightLG:36px; 30 | 31 | /* 图片尺寸 */ 32 | $imgSM:30px; 33 | $imgBS:50px; 34 | $imgLG:80px; 35 | 36 | /* Border Radius */ 37 | $radiusSM: 5px; 38 | $radiusBS: 10px; 39 | $radiusLG: 20px; 40 | $radiusRound: 50%; 41 | 42 | /* 边框颜色 */ 43 | $colBorder:#c8c7cc; 44 | 45 | /* 水平间距 */ 46 | $marginSM: 5px; 47 | $marginBS: 10px; 48 | $marginLG: 20px; 49 | $marginXL: 30px; 50 | 51 | 52 | @mixin bgWhite(){ 53 | background-color:$bgWhite; 54 | color:$colBlack; 55 | [data-theme="1"] & { 56 | background-color:$colBlack; 57 | color:$colWhite; 58 | } 59 | // [data-theme="2"] & { 60 | // background-color:$bgWhite; 61 | // color:$colBlack; 62 | // } 63 | } 64 | @mixin bgTheme(){ 65 | background-color: $colTheme; 66 | color:$colWhite; 67 | [data-theme="1"] & { 68 | background-color:$colBlue; 69 | color:$colWhite; 70 | } 71 | [data-theme="2"] & { 72 | background-color:$colYellow; 73 | color:$colWhite; 74 | } 75 | } 76 | @mixin colTheme(){ 77 | color:$colTheme; 78 | [data-theme="1"] & { 79 | color:$colBlue; 80 | } 81 | [data-theme="2"] & { 82 | color:$colYellow; 83 | } 84 | } 85 | 86 | @mixin pageBg(){ 87 | background-color:$bgGray; 88 | color:$colBlack; 89 | [data-theme="1"] & { 90 | background-color:$bgBlack; 91 | color:$colWhite; 92 | } 93 | [data-theme="2"] & { 94 | background-color:$colPaleGreen; 95 | color:$colWhite; 96 | } 97 | } 98 | .GFlex{ 99 | display: flex; 100 | justify-content: center; 101 | align-items: center; 102 | align-content: center; 103 | flex-wrap: wrap; 104 | } 105 | -------------------------------------------------------------------------------- /DemoWebManage/config/dev.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const merge = require('webpack-merge') 3 | const prodEnv = require('./prod.env') 4 | 5 | module.exports = merge(prodEnv, { 6 | NODE_ENV: '"development"' 7 | }) 8 | -------------------------------------------------------------------------------- /DemoWebManage/config/index.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | // Template version: 1.3.1 3 | // see http://vuejs-templates.github.io/webpack for documentation. 4 | 5 | const path = require('path') 6 | 7 | module.exports = { 8 | dev: { 9 | 10 | // Paths 11 | assetsSubDirectory: 'static', 12 | assetsPublicPath: '/', 13 | proxyTable: {}, 14 | 15 | // Various Dev Server settings 16 | host: 'localhost', // can be overwritten by process.env.HOST 17 | port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined 18 | autoOpenBrowser: true, 19 | errorOverlay: true, 20 | notifyOnErrors: true, 21 | poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions- 22 | 23 | 24 | /** 25 | * Source Maps 26 | */ 27 | 28 | // https://webpack.js.org/configuration/devtool/#development 29 | devtool: 'cheap-module-eval-source-map', 30 | 31 | // If you have problems debugging vue-files in devtools, 32 | // set this to false - it *may* help 33 | // https://vue-loader.vuejs.org/en/options.html#cachebusting 34 | cacheBusting: true, 35 | 36 | cssSourceMap: true 37 | }, 38 | 39 | build: { 40 | // Template for index.html 41 | index: path.resolve(__dirname, '../dist/index.html'), 42 | 43 | // Paths 44 | assetsRoot: path.resolve(__dirname, '../dist'), 45 | assetsSubDirectory: 'static', 46 | assetsPublicPath: '/', 47 | 48 | /** 49 | * Source Maps 50 | */ 51 | 52 | productionSourceMap: true, 53 | // https://webpack.js.org/configuration/devtool/#production 54 | devtool: '#source-map', 55 | 56 | // Gzip off by default as many popular static hosts such as 57 | // Surge or Netlify already gzip all static assets for you. 58 | // Before setting to `true`, make sure to: 59 | // npm install --save-dev compression-webpack-plugin 60 | productionGzip: false, 61 | productionGzipExtensions: ['js', 'css'], 62 | 63 | // Run the build command with an extra argument to 64 | // View the bundle analyzer report after build finishes: 65 | // `npm run build --report` 66 | // Set to `true` or `false` to always turn it on or off 67 | bundleAnalyzerReport: process.env.npm_config_report 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /DemoWebManage/config/prod.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | module.exports = { 3 | NODE_ENV: '"production"' 4 | } 5 | -------------------------------------------------------------------------------- /DemoWebManage/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 腾云检验 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /DemoWebManage/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "webManage", 3 | "version": "1.0.0", 4 | "description": "Web管理系统", 5 | "author": "JoneXuu ", 6 | "private": true, 7 | "scripts": { 8 | "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", 9 | "start": "npm run dev", 10 | "build": "node build/build.js" 11 | }, 12 | "dependencies": { 13 | "ant-design-vue": "^1.6.4", 14 | "axios": "^0.19.2", 15 | "moment": "^2.27.0", 16 | "node-sass": "^4.14.1", 17 | "sass-loader": "^7.3.1", 18 | "sass-resources-loader": "^2.0.3", 19 | "vue": "^2.5.2", 20 | "vue-router": "^3.0.1", 21 | "vuex": "^3.5.1" 22 | }, 23 | "devDependencies": { 24 | "autoprefixer": "^7.1.2", 25 | "babel-core": "^6.22.1", 26 | "babel-helper-vue-jsx-merge-props": "^2.0.3", 27 | "babel-loader": "^7.1.1", 28 | "babel-plugin-syntax-jsx": "^6.18.0", 29 | "babel-plugin-transform-runtime": "^6.22.0", 30 | "babel-plugin-transform-vue-jsx": "^3.5.0", 31 | "babel-preset-env": "^1.3.2", 32 | "babel-preset-stage-2": "^6.22.0", 33 | "chalk": "^2.0.1", 34 | "copy-webpack-plugin": "^4.0.1", 35 | "css-loader": "^0.28.0", 36 | "extract-text-webpack-plugin": "^3.0.0", 37 | "file-loader": "^1.1.4", 38 | "friendly-errors-webpack-plugin": "^1.6.1", 39 | "html-webpack-plugin": "^2.30.1", 40 | "node-notifier": "^5.1.2", 41 | "optimize-css-assets-webpack-plugin": "^3.2.0", 42 | "ora": "^1.2.0", 43 | "portfinder": "^1.0.13", 44 | "postcss-import": "^11.0.0", 45 | "postcss-loader": "^2.0.8", 46 | "postcss-url": "^7.2.1", 47 | "rimraf": "^2.6.0", 48 | "semver": "^5.3.0", 49 | "shelljs": "^0.7.6", 50 | "uglifyjs-webpack-plugin": "^1.1.1", 51 | "url-loader": "^0.5.8", 52 | "vue-loader": "^13.3.0", 53 | "vue-style-loader": "^3.0.1", 54 | "vue-template-compiler": "^2.5.2", 55 | "webpack": "^3.6.0", 56 | "webpack-bundle-analyzer": "^2.9.0", 57 | "webpack-dev-server": "^2.9.1", 58 | "webpack-merge": "^4.1.0" 59 | }, 60 | "engines": { 61 | "node": ">= 6.0.0", 62 | "npm": ">= 3.0.0" 63 | }, 64 | "browserslist": [ 65 | "> 1%", 66 | "last 2 versions", 67 | "not ie <= 8" 68 | ] 69 | } 70 | -------------------------------------------------------------------------------- /DemoWebManage/src/App.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 13 | 14 | 24 | -------------------------------------------------------------------------------- /DemoWebManage/src/assets/loginBg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoneXuu/DemoProject/2430a31727c65d74465b27691e91d20a5074fc53/DemoWebManage/src/assets/loginBg.jpg -------------------------------------------------------------------------------- /DemoWebManage/src/assets/logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoneXuu/DemoProject/2430a31727c65d74465b27691e91d20a5074fc53/DemoWebManage/src/assets/logo.jpg -------------------------------------------------------------------------------- /DemoWebManage/src/common/global.js: -------------------------------------------------------------------------------- 1 | 2 | var domain = 'https://www.mxnzp.com/', 3 | fileDomain = domain+'Images/'; 4 | 5 | var defaultImg='this.src="' + require('@/assets/logo.jpg') + '"'; 6 | var uploadUrl=domain+"UploadPhoto.ashx"; 7 | 8 | var hasAction = false; //有操作正在进行 9 | function noAction() { // 10 | if (hasAction) { 11 | return false; 12 | } else { 13 | hasAction = true; 14 | setTimeout(() => { 15 | hasAction = false; 16 | }, 666) 17 | return true; 18 | } 19 | } 20 | 21 | 22 | import { notification } from 'ant-design-vue'//引入 23 | notification.config({//写配置//一些参你也可以配置到动态的,看个人需要 24 | placement: 'topRight', 25 | top: '50px', 26 | duration: 3, 27 | }); 28 | 29 | function toast(tit, type='info', cont='') { 30 | //默认info类型通知,可传success/error/warning/warn/open/close/destroy 31 | notification[type]({ 32 | message: tit, 33 | description: cont, 34 | }); 35 | } 36 | 37 | import moment from 'moment' 38 | var weekStr = ["日", "一", "二", "三", "四", "五", "六"]; 39 | 40 | function formatTime(time, noSuitable = true, isUTC = false) { //获取最佳显示时间 41 | if (time != undefined && moment(time, moment.ISO_8601).isValid()) { //moment.ISO_8601 42 | let utcTime = ''; 43 | if (isUTC) { 44 | utcTime = moment.utc(time).local(); 45 | } else { 46 | utcTime = moment.utc(time).subtract(8, "hours").local(); 47 | } 48 | //console.log("标准",utcTime.format("YYYY-MM-DD HH:mm")) 49 | let sTime = moment(utcTime), 50 | sYear = moment(utcTime).get('year'), 51 | sMonth = moment(utcTime).get('month'), 52 | sDay = moment(utcTime).get('date'), 53 | returnStr = sTime.format("YYYY-MM-DD"); 54 | 55 | if (noSuitable) { 56 | // if (sTime.format("HH:mm") != "00:00") { //有详细时间 57 | // returnStr = sTime.format("YYYY-MM-DD HH:mm"); 58 | // } 59 | // if (sYear == moment().get('year')) { //今年 60 | // returnStr = sTime.format("MM-DD HH:mm"); 61 | // if (sTime.format("HH:mm") == "00:00") { //没有详细时间 62 | // returnStr = sTime.format("MM-DD"); 63 | // } 64 | // } 65 | } else { 66 | if (sYear == moment().get('year')) { //今年 67 | returnStr = sTime.format("MM-DD") 68 | if (sMonth == moment().get('month')) { //今月 69 | if (sDay == moment().get('date')) { //今天 70 | returnStr = sTime.format("HH:mm") 71 | if (returnStr == "00:00") { //没有详细时间 72 | returnStr = sTime.format("MM-DD"); 73 | } else { //有详细时间 74 | if (moment().diff(sTime, 'hours') > 0) { 75 | returnStr = moment().diff(sTime, 'hours') + "小时前"; 76 | } else { 77 | if (moment().diff(sTime, 'minutes') > 0) { 78 | returnStr = moment().diff(sTime, 'minutes') + "分钟前"; 79 | } else { 80 | returnStr = "刚刚" 81 | } 82 | } 83 | } 84 | } else if (sDay == moment().subtract(1, "days").get('date')) { //昨天 85 | returnStr = "昨天"; 86 | } else if (sTime.week() == moment().week()) { //同周 87 | returnStr = "周" + weekStr[sTime.weekday()]; 88 | } else if (sTime.week() == (moment().week() - 1)) { //同周 89 | returnStr = "上周" + weekStr[sTime.weekday()]; 90 | } 91 | } 92 | } 93 | 94 | } 95 | return returnStr; 96 | } else { 97 | return ""; 98 | } 99 | } 100 | 101 | //格式化数字 102 | function formatNumber(value) { 103 | let strValue = '0'; 104 | value = parseFloat(value); 105 | if (isNaN(value)) { 106 | strValue = '0'; 107 | } 108 | if (value >= 10000 * 10000) { 109 | strValue = (value / 10000.0 / 10000.0).toFixed(1) + '亿'; 110 | } else if (value >= 10000) { 111 | strValue = (value / 10000.0).toFixed(1) + '万'; 112 | } else { 113 | strValue = value; 114 | } 115 | return strValue; 116 | } 117 | 118 | //格式化图片 119 | function formatImage(url) { 120 | let result = ''; 121 | if (url == null || url == '') { 122 | result = '/static/image/defaultHead.png'; 123 | } else { 124 | if (url.match(/https?:\/\//g)==null) { 125 | result = fileDomain + url; 126 | } else { 127 | result = url; 128 | } 129 | } 130 | return result; 131 | } 132 | 133 | //格式化图片 134 | function hideMobile(phone) { 135 | let result = '未知号码'; 136 | if (phone) { 137 | let start = phone.substr(0, 3), 138 | end = phone.slice(-4); 139 | result = start + "****" + end; 140 | } 141 | return result; 142 | } 143 | 144 | 145 | function isEmpty(keyArr,obj) { 146 | let reKey=false; 147 | for(let key of keyArr){ 148 | let val=obj[key]; 149 | if(val==''||val==undefined||val==null){ 150 | reKey=key; 151 | break; 152 | } 153 | if(key.indexOf('Telephone')>-1){ 154 | if(!(/^1[3456789]\d{9}$/.test(val))){ 155 | reKey=key; 156 | break; 157 | } 158 | } 159 | } 160 | return reKey; 161 | } 162 | 163 | function formatMinutes(minutes) { 164 | var day = parseInt(Math.floor(minutes / 1440)); 165 | var hour = day > 0? 166 | Math.floor((minutes - day * 1440) / 60): 167 | Math.floor(minutes / 60); 168 | var minute = hour > 0? 169 | Math.floor(minutes - day * 1440 - hour * 60): 170 | minutes; 171 | var time = ""; 172 | if (day > 0) time += day + "天"; 173 | if (hour > 0) time += hour + "小时"; 174 | if (minute > 0) time += minute + "分钟"; 175 | return time; 176 | } 177 | 178 | export default { 179 | domain, 180 | fileDomain, 181 | defaultImg, 182 | uploadUrl, 183 | toast, 184 | hideMobile, 185 | isEmpty, 186 | formatNumber, 187 | formatImage, 188 | formatTime, 189 | formatMinutes 190 | } 191 | 192 | 193 | // //#ifdef APP-PLUS 194 | // plus.runtime.getProperty(plus.runtime.appid, (inf) => { 195 | // let wgtVersion = inf.version; 196 | // common.version = wgtVersion; 197 | // }); 198 | // //#endif 199 | 200 | 201 | // function versionChecked(currentV, currentV2) { 202 | // let oldV = currentV2.split("."); 203 | // let newV = currentV.split("."); 204 | // for (let i = 0; i < oldV.length; i++) { 205 | // let item = +oldV[i]; 206 | // let item2 = +newV[i]; 207 | // if (item != item2) { 208 | // if (item > item2) { 209 | // //旧版大于新版 直接返回false 210 | // return false; //不需要升级 211 | // } else { 212 | // return true; 213 | // } 214 | // } else { 215 | // continue; 216 | // } 217 | // } 218 | // return false; //不需要升级 219 | // } 220 | -------------------------------------------------------------------------------- /DemoWebManage/src/common/https.js: -------------------------------------------------------------------------------- 1 | import Global from './global' 2 | import Store from './vuex' 3 | import axios from 'axios' 4 | import qs from 'qs'; 5 | var isLoading=0; 6 | function showLoading(){ 7 | if(isLoading<=0){ 8 | // Store.state.gLoad=true; 9 | Store.commit('showLoad') 10 | } 11 | isLoading++; 12 | } 13 | 14 | function hideLoading(){ 15 | // Store.state.gLoad=false; 16 | Store.commit('hideLoad') 17 | isLoading--; 18 | } 19 | 20 | function uploadFile(fileOrg, callback) { 21 | showLoading(); 22 | uni.uploadFile({ 23 | url: Global.uploadUrl+"?folder=Image&fileName="+fileOrg, 24 | filePath: fileOrg, 25 | name: "file", 26 | success: (res) => { 27 | if (res.statusCode == 200) { 28 | let obj =JSON.parse(res.data) 29 | // let obj =res.data.replace(/D:\\File\\log_IIS\\/g,''); 30 | callback(obj.data); 31 | }else{ 32 | Global.toast("文件上传失败") 33 | callback(false); 34 | } 35 | }, 36 | fail: (res) => { 37 | // console.log("FileUploadFail"); 38 | callback(false); 39 | }, 40 | complete:(res)=>{ 41 | hideLoading(); 42 | } 43 | }); 44 | } 45 | 46 | function requestHttpCommon(api,sendData,met, callback) { 47 | 48 | if (typeof(sendData) == "object") { 49 | sendData = JSON.stringify(sendData) 50 | } 51 | axios({ 52 | url: Global.domain+"api/"+api, 53 | method:met, 54 | //发送json数据用这个 55 | data: sendData, 56 | header: { 57 | 'Content-Type':'application/json', 58 | // "app_id":"wgnjhlfwlnirjhqg", 59 | // "app_secret":"KzlhN1VWVmFiSFIvK2ZPQ0xGS3hoUT09" 60 | }, 61 | // 发送form-data请求用这个 62 | // data: qs.stringify(RequestContent: sendData), 63 | // header: { 64 | // 'Content-Type':'application/x-www-form-urlencoded' 65 | // }, 66 | timeout:20000, 67 | }).then((res) =>{ 68 | // console.log(res,'httpSuccess'); 69 | if (res.status >= 200&&res.status<300) { 70 | let endResult=res.data; 71 | callback(endResult) 72 | } 73 | else{ 74 | Global.toast("ErrorCode:" + res.statusCode); 75 | callback(res.data); 76 | } 77 | }).catch((error) =>{ 78 | Global.toast("网络连接失败,请稍后再试"); 79 | callback(false); 80 | }) 81 | } 82 | 83 | function postHttp(api, sentData, callback) { 84 | let arrApi=api.split(";"); 85 | let isNeedNotice=true; 86 | if(arrApi.length>1){//api分号后面拼接false就表示不要通知 87 | isNeedNotice=false; 88 | api=arrApi[0]; 89 | }else{ 90 | showLoading(); 91 | } 92 | requestHttpCommon(api, sentData,'POST', function(reDa) { 93 | callback(reDa); 94 | if(isNeedNotice){ 95 | hideLoading(); 96 | } 97 | }); 98 | } 99 | 100 | function getHttp(api, sentData, callback) { 101 | if(typeof(sentData)=="object"){ 102 | let i=0; 103 | for(let key in sentData){ 104 | if(i==0){ 105 | api+="?"; 106 | }else{ 107 | api+="&"; 108 | } 109 | api+=key+"="+sentData[key]; 110 | i++; 111 | } 112 | } 113 | requestHttpCommon(api, sentData,'Get', function(reDa) { 114 | callback(reDa); 115 | }); 116 | } 117 | 118 | 119 | function freeHttp(api, sendData, callback) { 120 | 121 | uni.request({ 122 | url: api, 123 | method:"POST", 124 | data:sendData, 125 | header: { 126 | 'Content-Type':'application/x-www-form-urlencoded' 127 | // 'content-type': 'application/json', 128 | // 'Access-Control-Allow-Origin':'*' 129 | }, 130 | timeout:60000, 131 | fail: (res) => { 132 | Global.toast("网络连接失败,请稍后再试"); 133 | callback(false); 134 | }, 135 | complete: (res) => { 136 | hideLoading(); 137 | }, 138 | success: (res) => { 139 | // console.log(res,'httpSuccess'); 140 | callback(res.data); 141 | } 142 | }); 143 | } 144 | 145 | export default { 146 | // hideLoading, 147 | // showLoading, 148 | postHttp, 149 | getHttp, 150 | freeHttp, 151 | uploadFile, 152 | } 153 | -------------------------------------------------------------------------------- /DemoWebManage/src/common/router.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import VueRouter from 'vue-router' 3 | Vue.use(VueRouter) // 注册vue-router 4 | import store from '@/common/vuex.js' //全局仓储 5 | import Global from '@/common/global.js' //全局封装方法 6 | // const originalPush = VueRouter.prototype.push 7 | // VueRouter.prototype.push = function push(location) { 8 | // return originalPush.call(this, location).catch(err => err) 9 | // } 10 | 11 | const router = new VueRouter({ 12 | mode: 'history', 13 | base: '/Web/', 14 | routes: [{ 15 | path: '/', 16 | name: 'Login', 17 | meta: {title: '登录'},//requireAuth: false 18 | component: (resolve) => require(['@/pages/Login.vue'], resolve), 19 | },{ 20 | path: '/Home', 21 | name: 'Home', 22 | component: (resolve) => require(['@/pages/Home.vue'], resolve), 23 | children: [ 24 | {path: '/',name: 'HomeDefault',meta: {title: '首页',keepAlive: true},component: (resolve) => require(['@/pages/Admin/HomeDefault.vue'], resolve),}, 25 | {path: '/Module1',name: 'Module1',meta: {title: '拖拽示例',keepAlive: true},component: (resolve) => require(['@/pages/Admin/ModuleOne.vue'], resolve),}, 26 | {path: '/Module2',name: 'Module2',meta: {title: '模块2',keepAlive: true},component: (resolve) => require(['@/pages/Admin/ModuleTwo.vue'], resolve),}, 27 | {path: '/ExamplePage',name: 'ExamplePage',meta: {title: '实例页面',keepAlive: true},component: (resolve) => require(['@/pages/Admin/ExamplePage.vue'], resolve),}, 28 | {path: '/UserManage',name: 'UserManage',meta: {title: '用户管理',keepAlive: true},component: (resolve) => require(['@/pages/Admin/UserManage.vue'], resolve),}, 29 | ] 30 | }] 31 | }) 32 | 33 | router.beforeEach((to, from, next) => { 34 | // console.log(to) 35 | if (to.name=='Login') { 36 | next() 37 | }else if (to.meta.title) { 38 | document.title=to.meta.title; 39 | store.commit('pageJump', to) 40 | next() 41 | }else { 42 | //通知一下 43 | console.error('stop to errorPage') 44 | Global.toast('页面路径无效') 45 | } 46 | }); 47 | 48 | 49 | export default router 50 | -------------------------------------------------------------------------------- /DemoWebManage/src/common/style/global.scss: -------------------------------------------------------------------------------- 1 | 2 | 3 | .pageAll{ 4 | scrollbar-width: none; /* Firefox */ 5 | -ms-overflow-style: none; /* IE 10+ */ 6 | .moduleAll{ 7 | .ant-table-thead > tr > th, 8 | .ant-table-tbody > tr > td { 9 | text-align: center; 10 | padding: 4px 8px; 11 | .tableImg{ 12 | width: 30px; 13 | height: 30px; 14 | } 15 | } 16 | .topToolBar{ 17 | display: flex; 18 | align-items: center; 19 | height: 60px; 20 | // padding: 0 10px; 21 | .ant-btn{ 22 | margin: 5px; 23 | } 24 | } 25 | } 26 | // .pgTab{ 27 | // /deep/ .ant-tabs-bar{ 28 | // margin: 0; 29 | // } 30 | // /deep/ .ant-tabs-card-bar, 31 | // /deep/ .ant-tabs-nav-container, 32 | // /deep/ .ant-tabs-tab{ 33 | // height: 28px !important; 34 | // line-height: 28px !important; 35 | // font-size: 12px; 36 | // } 37 | // } 38 | .pgTab{ 39 | :global { 40 | .ant-tabs-bar{ 41 | margin: 0; 42 | } 43 | .ant-tabs-card-bar, 44 | .ant-tabs-tab{ 45 | height: 28px !important; 46 | line-height: 28px !important; 47 | font-size: 12px !important; 48 | } 49 | } 50 | } 51 | } 52 | 53 | 54 | 55 | .wid100{ 56 | width: 100%; 57 | } 58 | 59 | .btn_success{ 60 | background-color: #45cc68; 61 | color: #ffffff; 62 | border-color:#45cc68; 63 | } 64 | .drawerFoot{ 65 | height: 54px; 66 | // position: relative; 67 | .footFixedArea{ 68 | position: absolute; 69 | bottom: 0; 70 | width: 100%; 71 | height: 54px; 72 | border-top: 1px solid #e8e8e8; 73 | padding: 10px 16px; 74 | left: 0; 75 | background-color: #ffffff; 76 | borderRadius: 0 0 4px 4px; 77 | .ant-btn{ 78 | margin-right: 8px; 79 | } 80 | } 81 | 82 | } 83 | // ::-webkit-scrollbar { 84 | // display: none; /* Chrome Safari */ 85 | // // width:0; 86 | // } 87 | /*滚动条整体样式*/ 88 | ::-webkit-scrollbar { 89 | width : 5px; /*高宽分别对应横竖滚动条的尺寸*/ 90 | height: 1px; 91 | } 92 | /*滚动条里面小方块*/ 93 | ::-webkit-scrollbar-thumb { 94 | border-radius: 5px; 95 | box-shadow : inset 0 0 5px rgba(0, 0, 0, 0.2); 96 | background : #bae7ff; 97 | } 98 | /*滚动条里面轨道*/ 99 | ::-webkit-scrollbar-track { 100 | box-shadow : inset 0 0 5px rgba(0, 0, 0, 0.2); 101 | border-radius: 5px; 102 | background : #ededed; 103 | } 104 | -------------------------------------------------------------------------------- /DemoWebManage/src/common/u-charts.min.js: -------------------------------------------------------------------------------- 1 | 'use strict';var config={yAxisWidth:15,yAxisSplit:5,xAxisHeight:15,xAxisLineHeight:15,legendHeight:15,yAxisTitleWidth:15,padding:[10,10,10,10],pixelRatio:1,rotate:!1,columePadding:3,fontSize:13,dataPointShape:["circle","circle","circle","circle"],colors:["#1890ff","#2fc25b","#facc14","#f04864","#8543e0","#90ed7d"],pieChartLinePadding:15,pieChartTextPadding:5,xAxisTextPadding:3,titleColor:"#333333",titleFontSize:20,subtitleColor:"#999999",subtitleFontSize:15,toolTipPadding:3,toolTipBackground:"#000000",toolTipOpacity:.7,toolTipLineHeight:20,radarLabelTextMargin:15,gaugeLabelTextMargin:15};let assign=function(e,...t){function i(e,t){for(let a in t)e[a]=e[a]&&"[object Object]"===e[a].toString()?i(e[a],t[a]):e[a]=t[a];return e}if(null==e)throw new TypeError("Cannot convert undefined or null to object");return!t||0>=t.length?e:(t.forEach(t=>{e=i(e,t)}),e)};var util={toFixed:function(e,t){return t=t||2,this.isFloat(e)&&(e=e.toFixed(t)),e},isFloat:function(e){return 0!=e%1},approximatelyEqual:function(e,t){return 1e-10>Math.abs(e-t)},isSameSign:function(e,t){var i=Math.abs;return i(e)===e&&i(t)===t||i(e)!==e&&i(t)!==t},isSameXCoordinateArea:function(e,t){return this.isSameSign(e.x,t.x)},isCollision:function(e,t){e.end={},e.end.x=e.start.x+e.width,e.end.y=e.start.y-e.height,t.end={},t.end.x=t.start.x+t.width,t.end.y=t.start.y-t.height;var i=t.start.x>e.end.x||t.end.xe.start.y||t.start.yi;)i*=10,a*=10;for(e="upper"===t?Math.ceil(e*a):Math.floor(e*a);0!=e%i;)"upper"===t?e++:e--;return e/a}function calCandleMA(e,t,i,a){let o=[];for(let n,l=0;l=l-n&&(r=n-l,e.event.trigger("scrollRight")),r}function isInAngleRange(e,t,i){function a(e){for(;0>e;)e+=2*o;for(;e>2*o;)e-=2*o;return e}var o=Math.PI;return e=a(e),t=a(t),i=a(i),t>i&&(i+=2*o,e=t&&e<=i}function calRotateTranslate(e,t,i){var a=e,o=i-t,n=a+(i-o-a)/1.4142135623730951;n*=-1;return{transX:n,transY:(i-o)*(1.4142135623730951-1)-(i-o-a)/1.4142135623730951}}function createCurveControlPoints(e,t){function i(e,t){return!!(e[t-1]&&e[t+1])&&(e[t].y>=l(e[t-1].y,e[t+1].y)||e[t].y<=n(e[t-1].y,e[t+1].y))}function o(e,t){return!!(e[t-1]&&e[t+1])&&(e[t].x>=l(e[t-1].x,e[t+1].x)||e[t].x<=n(e[t-1].x,e[t+1].x))}var n=Math.min,l=Math.max,r=.2,a=.2,s=null,d=null,h=null,x=null;if(1>t?(s=e[0].x+(e[1].x-e[0].x)*r,d=e[0].y+(e[1].y-e[0].y)*r):(s=e[t].x+(e[t+1].x-e[t-1].x)*r,d=e[t].y+(e[t+1].y-e[t-1].y)*r),t>e.length-3){var c=e.length-1;h=e[c].x-(e[c].x-e[c-1].x)*a,x=e[c].y-(e[c].y-e[c-1].y)*a}else h=e[t+1].x-(e[t+2].x-e[t].x)*a,x=e[t+1].y-(e[t+2].y-e[t].y)*a;return i(e,t+1)&&(x=e[t+1].y),i(e,t)&&(d=e[t].y),o(e,t+1)&&(h=e[t+1].x),o(e,t)&&(s=e[t].x),(d>=l(e[t].y,e[t+1].y)||d<=n(e[t].y,e[t+1].y))&&(d=e[t].y),(x>=l(e[t].y,e[t+1].y)||x<=n(e[t].y,e[t+1].y))&&(x=e[t+1].y),(s>=l(e[t].x,e[t+1].x)||s<=n(e[t].x,e[t+1].x))&&(s=e[t].x),(h>=l(e[t].x,e[t+1].x)||h<=n(e[t].x,e[t+1].x))&&(h=e[t+1].x),{ctrA:{x:s,y:d},ctrB:{x:h,y:x}}}function convertCoordinateOrigin(e,t,i){return{x:i.x+e,y:i.y-t}}function avoidCollision(e,t){if(t)for(;util.isCollision(e,t);)0e.start.x?e.start.y++:0t.data[1]-t.data[0]?s[1]=r:s[1]=l:(t.data[0]e[o-1][1]&&(s[2]=l),t.data[3]t&&(n=i)})}return n}function findLegendIndex(e,t){let i=-1;if(isInExactLegendArea(e,t.area)){let a=t.points,o=-1;for(let t,n=0,l=a.length;nn[0]&&e.xn[1]&&e.yt.start.x&&e.xt.start.y&&e.y=t.area[3]-10&&e.y>=t.area[0]&&e.y<=t.height-t.area[2]}function findRadarChartCurrentIndex(e,t,i){var a=Math.PI,o=2*a/i,n=-1;if(isInExactPieChartArea(e,t.center,t.radius)){var l=function(e){return 0>e&&(e+=2*a),e>2*a&&(e-=2*a),e},r=Math.atan2(t.center.y-e.y,e.x-t.center.x);r=-1*r,0>r&&(r+=2*a);var s=t.angleList.map(function(e){return e=l(-1*e),e});s.forEach(function(e,t){var i=l(e-o/2),s=l(e+o/2);s=i&&r<=s||r+2*a>=i&&r+2*a<=s)&&(n=t)})}return n}function findFunnelChartCurrentIndex(e,t){for(var a,o=-1,n=0,l=t.series.length;na.funnelArea[0]&&e.xa.funnelArea[1]&&e.ya.area[0]&&e.xa.area[1]&&e.yt.width-t.padding[1]-t.padding[3]?(a.push(g),p.push(n-t.legend.itemGap),n=l,g=[i]):(n+=l,g.push(i))}if(g.length){a.push(g),p.push(n-t.legend.itemGap),l.widthArr=p;let e=o.apply(null,p);switch(t.legend.float){case"left":l.area.start.x=t.padding[3],l.area.end.x=t.padding[3]+2*r;break;case"right":l.area.start.x=t.width-t.padding[1]-e-2*r,l.area.end.x=t.width-t.padding[1];break;default:l.area.start.x=(t.width-e)/2-r,l.area.end.x=(t.width+e)/2+r;}l.area.width=e+2*r,l.area.wholeWidth=e+2*r,l.area.height=a.length*c+2*r,l.area.wholeHeight=a.length*c+2*r+2*s,l.points=a}}else{let i=e.length,a=t.height-t.padding[0]-t.padding[2]-2*s-2*r,o=Math.min(n(a/c),i);switch(l.area.height=o*c+2*r,l.area.wholeHeight=o*c+2*r,t.legend.float){case"top":l.area.start.y=t.padding[0]+s,l.area.end.y=t.padding[0]+s+l.area.height;break;case"bottom":l.area.start.y=t.height-t.padding[2]-s-l.area.height,l.area.end.y=t.height-t.padding[2]-s;break;default:l.area.start.y=(t.height-l.area.height)/2,l.area.end.y=(t.height+l.area.height)/2;}let p=0==i%o?i/o:n(i/o+1),g=[];for(let t,a=0;aa&&(a=e);l.widthArr.push(a),l.heightArr.push(i.length*c+2*r)}let e=0;for(let t=0;ta&&(o.angle=45*Math.PI/180,o.xAxisHeight=2*i.xAxisTextPadding+l*Math.sin(o.angle)),o}function getXAxisTextList(e,t){var a=Math.min,o=Math.max,n=4n&&(a.angle=45*Math.PI/180,a.xAxisHeight=2*i.xAxisTextPadding+r*Math.sin(a.angle)),!0===t.xAxis.disabled&&(a.xAxisHeight=0),a}function getRadarDataPoints(e,t,i,a,o){var n=Math.max,l=5=a.oldData?(n._endAngle_-n._oldAngle_)*o+a.oldAngle:n._oldAngle_-(n._oldAngle_-n._endAngle_)*o,2<=n._proportion_&&(n._proportion_%=2)}return e}function getPieTextMaxLength(e){e=getPieDataPoints(e);let t=0;for(let a=0;a=e.width&&(e.width=1),e.x+=(a+.5-i/2)*e.width,e)})}function fixColumeMeterData(e,t,i,a,o,n,l){return e.map(function(e){return null===e?null:(e.width=Math.ceil((t-2*o.columePadding)/2),n.extra.column&&n.extra.column.width&&0<+n.extra.column.width&&(e.width=Math.min(e.width,+n.extra.column.width)),0s.x&&(h-=measureText(a.categories[r]||"")),n.beginPath(),n.setFontSize(o.fontSize),n.setFillStyle(l.labelColor||"#666666"),n.fillText(a.categories[r]||"",h,x+o.fontSize/2),n.closePath(),n.stroke()})}function drawPieText(e,t,a,o,i,n){var l=Math.cos,r=Math.sin,s=Math.min,d=Math.max,h=Math.PI,x=a.pieChartLinePadding,c=[],p=null,g=e.map(function(e){var t=e.format?e.format(+e._proportion_.toFixed(2)):util.toFixed(100*e._proportion_.toFixed(4))+"%";e._rose_proportion_&&(e._proportion_=e._rose_proportion_);var i=2*h-(e._start_+2*h*e._proportion_/2),a=e.color,o=e._radius_;return{arc:i,text:t,color:a,radius:o,textColor:e.textColor,textSize:e.textSize}});for(let h=0;ht?m=d(f,p.start.y):0y&&(y-=u);let S={lineStart:{x:o,y:n},lineEnd:{x:t,y:i},start:{x:y,y:m},width:u,height:a.fontSize,text:e.text,color:e.color,textColor:e.textColor,textSize:e.textSize};p=avoidCollision(S,p),c.push(p)}for(let l=0;le.start.x?s.x+e.width:s.x,x=0>e.start.x?s.x-5:s.x+5;o.quadraticCurveTo(r.x,r.y,d,s.y),o.moveTo(i.x,i.y),o.stroke(),o.closePath(),o.beginPath(),o.moveTo(s.x+e.width,s.y),o.arc(d,s.y,2,0,2*h),o.closePath(),o.fill(),o.beginPath(),o.setFontSize(e.textSize||a.fontSize),o.setFillStyle(e.textColor||"#666666"),o.fillText(e.text,x,s.y+3),o.closePath(),o.stroke(),o.closePath()}}function drawToolTipSplitLine(e,t,i,a){var o=t.extra.tooltip||{};o.gridType=null==o.gridType?"solid":o.gridType,o.dashLength=null==o.dashLength?4:o.dashLength;var n=t.area[0],l=t.height-t.area[2];if("dash"==o.gridType&&a.setLineDash([o.dashLength,o.dashLength]),a.setStrokeStyle(o.gridColor||"#cccccc"),a.setLineWidth(1*t.pixelRatio),a.beginPath(),a.moveTo(e,n),a.lineTo(e,l),a.stroke(),a.setLineDash([]),o.xAxisLabel){let n=t.categories[t.tooltip.index];a.setFontSize(i.fontSize);let r=measureText(n,i.fontSize),s=e-.5*r,d=l;a.beginPath(),a.setFillStyle(hexToRgb(o.labelBgColor||i.toolTipBackground,o.labelBgOpacity||i.toolTipOpacity)),a.setStrokeStyle(o.labelBgColor||i.toolTipBackground),a.setLineWidth(1*t.pixelRatio),a.rect(s-i.toolTipPadding,d,r+2*i.toolTipPadding,i.fontSize+2*i.toolTipPadding),a.closePath(),a.stroke(),a.fill(),a.beginPath(),a.setFontSize(i.fontSize),a.setFillStyle(o.labelFontColor||i.fontColor),a.fillText(n+"",s,d+i.toolTipPadding+i.fontSize),a.closePath(),a.stroke()}}function drawMarkLine(e,t,a){let o=assign({},{type:"solid",dashLength:4,data:[]},e.extra.markLine),n=e.area[3],l=e.width-e.area[1],r=calMarkLineData(o.data,e);for(let s,d=0;di.width&&(h=!0),p+t.y>i.height&&(t.y=i.height-p),o.beginPath(),o.setFillStyle(hexToRgb(l.bgColor||a.toolTipBackground,l.bgOpacity||a.toolTipOpacity)),h?(o.moveTo(t.x,t.y+10*i.pixelRatio),o.lineTo(t.x-d,t.y+10*i.pixelRatio-5*i.pixelRatio),o.lineTo(t.x-d,t.y),o.lineTo(t.x-d-n(c),t.y),o.lineTo(t.x-d-n(c),t.y+p),o.lineTo(t.x-d,t.y+p),o.lineTo(t.x-d,t.y+10*i.pixelRatio+5*i.pixelRatio),o.lineTo(t.x,t.y+10*i.pixelRatio)):(o.moveTo(t.x,t.y+10*i.pixelRatio),o.lineTo(t.x+d,t.y+10*i.pixelRatio-5*i.pixelRatio),o.lineTo(t.x+d,t.y),o.lineTo(t.x+d+n(c),t.y),o.lineTo(t.x+d+n(c),t.y+p),o.lineTo(t.x+d,t.y+p),o.lineTo(t.x+d,t.y+10*i.pixelRatio+5*i.pixelRatio),o.lineTo(t.x,t.y+10*i.pixelRatio)),o.closePath(),o.fill(),e.forEach(function(e,i){if(null!==e.color){o.beginPath(),o.setFillStyle(e.color);var n=t.x+d+2*a.toolTipPadding,l=t.y+(a.toolTipLineHeight-a.fontSize)/2+a.toolTipLineHeight*i+a.toolTipPadding+1;h&&(n=t.x-c-d+2*a.toolTipPadding),o.fillRect(n,l,r,a.fontSize),o.closePath()}}),e.forEach(function(e,i){var n=t.x+d+2*a.toolTipPadding+r+s;h&&(n=t.x-c-d+2*a.toolTipPadding+ +r+s);var x=t.y+(a.toolTipLineHeight-a.fontSize)/2+a.toolTipLineHeight*i+a.toolTipPadding;o.beginPath(),o.setFontSize(a.fontSize),o.setFillStyle(l.fontColor),o.fillText(e.text,n,x+a.fontSize),o.closePath(),o.stroke()}))}function drawYAxisTitle(e,t,i,a){var o=i.xAxisHeight+(t.height-i.xAxisHeight-measureText(e))/2;a.save(),a.beginPath(),a.setFontSize(i.fontSize),a.setFillStyle(t.yAxis.titleFontColor||"#333333"),a.translate(0,t.height),a.rotate(-90*Math.PI/180),a.fillText(e,o,t.padding[3]+.5*i.fontSize),a.closePath(),a.stroke(),a.restore()}function drawColumnDataPoints(e,t,i,a){let o=4h&&oh&&oh&&oh&&op&&(o.moveTo(i.x,i.y),e=1),0p&&i.xx&&tx&&(a.moveTo(e.x,e.y),i=1),0x&&e.xx&&(a.moveTo(e.x,e.y),i=1),0x&&e.xx&&(a.moveTo(t.x,t.y),e=1),0x&&t.xx&&(a.moveTo(t.x,t.y),e=1),0x&&t.xh&&(a.moveTo(o.x,o.y),i=1),0h&&o.xh&&(a.moveTo(t.x,t.y),i=1),0h&&t.xc&&ng&&(a.moveTo(e.x,e.y),i=1),0g&&e.xg&&(a.moveTo(e.x,e.y),i=1),0g&&e.xg&&(a.moveTo(e.x,e.y),t=1),0g&&e.xg&&(a.moveTo(e.x,e.y),t=1),0g&&e.xt._scrollDistance_&&o.fillRect(0,0,l,d),!0==t.enableScroll&&o.fillRect(r,0,t.width,d),o.closePath(),o.stroke();var h=[];for(let l=0;l<=t.yAxis.splitNumber;l++)h.push(t.area[0]+n*l);let x=t.area[3],c=t.width-t.area[1];for(let n,l=0;le/f?o.setStrokeStyle(hexToRgb(t[0].color,1)):o.setStrokeStyle(hexToRgb(t[0].color,.3)),o.setLineWidth(3*a.pixelRatio),o.moveTo(g,0),o.lineTo(y,0),o.stroke(),o.rotate(p*n);o.restore(),t=getArcbarDataPoints(t,r,l),o.setLineWidth(r.width),o.setStrokeStyle(t[0].color),o.setLineCap("round"),o.beginPath(),o.arc(s.x,s.y,h,r.startAngle*n,t[0]._proportion_*n,!1),o.stroke();let m=d-2.5*r.width;o.save(),o.translate(s.x,s.y),o.rotate((t[0]._proportion_-1)*n),o.beginPath(),o.setLineWidth(r.width/3);let S=o.createLinearGradient(0,.6*-m,0,.6*m);S.addColorStop("0",hexToRgb("#FFFFFF",0)),S.addColorStop("0.5",hexToRgb(t[0].color,1)),S.addColorStop("1.0",hexToRgb("#FFFFFF",0)),o.setStrokeStyle(S),o.arc(0,0,m,.85*n,1.15*n,!1),o.stroke(),o.beginPath(),o.setLineWidth(1),o.setStrokeStyle(t[0].color),o.setFillStyle(t[0].color),o.moveTo(-m-r.width/3/2,-4),o.lineTo(-m-r.width/3/2-4,0),o.lineTo(-m-r.width/3/2,4),o.lineTo(-m-r.width/3/2,-4),o.stroke(),o.fill(),o.restore()}else{o.setLineWidth(r.width),o.setLineCap("butt");for(let t,a=0;at[l].area[2]||e[1]>t[l].area[3]||e[2]e[0]||0>e[1]||e[2]>a||e[3]>o){n=!0;break}else n=!1;return n}function getBoundingBox(e){var t,a={};a.xMin=180,a.xMax=0,a.yMin=90,a.yMax=0;for(var o,n=0;nh.x?a.xMax:h.x,a.yMin=a.yMinh.y?a.yMax:h.y}}}return a}function coordinateToPoint(e,t,i,a,o,n){return{x:(t-i.xMin)*a+o,y:(i.yMax-e)*a+n}}function pointToCoordinate(e,t,i,a,o,n){return{x:(t-o)/a+i.xMin,y:i.yMax-(e-n)/a}}function isRayIntersectsSegment(e,t,i){if(t[1]==i[1])return!1;if(t[1]>e[1]&&i[1]>e[1])return!1;if(t[1]e[1])return!1;if(i[1]==e[1]&&t[1]>e[1])return!1;if(t[0](e/=.5)?.5*t(e,3):.5*(t(e-2,3)+2)},linear:function(e){return e}};function Animation(e){this.isStop=!1,e.duration="undefined"==typeof e.duration?1e3:e.duration,e.timing=e.timing||"linear";var t=function(){return"undefined"==typeof setTimeout?"undefined"==typeof requestAnimationFrame?function(e){e(null)}:requestAnimationFrame:function(e,t){setTimeout(function(){var t=+new Date;e(t)},t)}}(),i=null,a=function(o){if(null===o||!0===this.isStop)return e.onProcess&&e.onProcess(1),void(e.onAnimationFinish&&e.onAnimationFinish());if(null===i&&(i=o),o-io;o++)t.area[o]=t.padding[o];var d=calLegendData(s,t,a,t.chartData),h=d.area.wholeHeight,x=d.area.wholeWidth;switch(t.legend.position){case"top":t.area[0]+=h;break;case"bottom":t.area[2]+=h;break;case"left":t.area[3]+=x;break;case"right":t.area[1]+=x;}let c={},p=0;if("line"===t.type||"column"===t.type||"area"===t.type||"mix"===t.type||"candle"===t.type){if(c=calYAxisData(n,t,a),p=c.yAxisWidth,t.yAxis.showTitle){let e=0;for(let o=0;ot;t++)e.padding[t]*=e.pixelRatio;t.yAxisWidth=config.yAxisWidth*e.pixelRatio,t.xAxisHeight=config.xAxisHeight*e.pixelRatio,e.enableScroll&&e.xAxis.scrollShow&&(t.xAxisHeight+=6*e.pixelRatio),t.xAxisLineHeight=config.xAxisLineHeight*e.pixelRatio,t.fontSize=e.fontSize,t.titleFontSize=config.titleFontSize*e.pixelRatio,t.subtitleFontSize=config.subtitleFontSize*e.pixelRatio,t.toolTipPadding=config.toolTipPadding*e.pixelRatio,t.toolTipLineHeight=config.toolTipLineHeight*e.pixelRatio,t.columePadding=config.columePadding*e.pixelRatio,e.$this=e.$this?e.$this:this,this.context=uni.createCanvasContext(e.canvasId,e.$this),e.chartData={},this.event=new Event,this.scrollOption={currentOffset:0,startTouchX:0,distance:0,lastMoveTime:0},this.opts=e,this.config=t,drawCharts.call(this,e.type,e,t,this.context)};Charts.prototype.updateData=function(){let e=0=val){ 37 | state.actPage-=1; 38 | } 39 | }, 40 | pageJump(state,obj){ 41 | let arr=state.pageTabList,needPush=true; 42 | for (var i = 0; i < arr.length; i++) { 43 | if(arr[i].path== obj.path){ 44 | needPush=false; 45 | state.actPage=i; 46 | } 47 | } 48 | if(needPush){ 49 | state.actPage=arr.length; 50 | state.pageTabList.push({ 51 | title: obj.meta.title||'无标题', 52 | name: obj.name, 53 | path: obj.path, 54 | // canClose:obj.path!='/Home' 55 | }) 56 | } 57 | 58 | }, 59 | hideLoad(state){ 60 | state.gLoad=false; 61 | }, 62 | showLoad(state){ 63 | state.gLoad=true; 64 | }, 65 | }, 66 | actions: { 67 | initApp(context) { 68 | context.commit('InitData') 69 | } 70 | } 71 | }) 72 | 73 | export default store 74 | -------------------------------------------------------------------------------- /DemoWebManage/src/main.js: -------------------------------------------------------------------------------- 1 | // The Vue build version to load with the `import` command 2 | // (runtime-only or standalone) has been set in webpack.base.conf with an alias. 3 | import Vue from 'vue' 4 | import App from './App' 5 | 6 | import moment from 'moment'//时间管理器 7 | import router from '@/common/router.js';//路由 8 | import store from '@/common/vuex.js'//全局仓储 9 | import https from '@/common/https.js' //http请求 10 | import global from '@/common/global.js' //全局方法 11 | import Antd from 'ant-design-vue'; 12 | 13 | import 'ant-design-vue/dist/antd.css'; 14 | import '@/common/style/global.scss'; 15 | // import '../config.scss'; 16 | 17 | Vue.config.productionTip = false 18 | Vue.prototype.$http = https; 19 | Vue.prototype.$global = global; 20 | Vue.prototype.$store = store; 21 | Vue.prototype.$moment = moment; 22 | 23 | Vue.use(Antd); 24 | Vue.config.productionTip = false 25 | 26 | /* eslint-disable no-new */ 27 | new Vue({ 28 | el: '#app', 29 | router, 30 | components: { App }, 31 | template: '' 32 | }) 33 | -------------------------------------------------------------------------------- /DemoWebManage/src/pages/Admin/ExamplePage.vue: -------------------------------------------------------------------------------- 1 | 53 | 54 | 164 | 165 | 168 | -------------------------------------------------------------------------------- /DemoWebManage/src/pages/Admin/HomeDefault.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 36 | 37 | 51 | -------------------------------------------------------------------------------- /DemoWebManage/src/pages/Admin/ModuleOne.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 47 | 48 | 85 | -------------------------------------------------------------------------------- /DemoWebManage/src/pages/Admin/ModuleTwo.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 28 | 29 | 35 | -------------------------------------------------------------------------------- /DemoWebManage/src/pages/Admin/UserManage.vue: -------------------------------------------------------------------------------- 1 | 99 | 100 | 308 | 309 | 312 | -------------------------------------------------------------------------------- /DemoWebManage/src/pages/Home.vue: -------------------------------------------------------------------------------- 1 | 53 | 54 | 157 | 158 | 218 | -------------------------------------------------------------------------------- /DemoWebManage/src/pages/Login.vue: -------------------------------------------------------------------------------- 1 | 17 | 18 | 38 | 39 | 72 | -------------------------------------------------------------------------------- /DemoWebManage/static/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoneXuu/DemoProject/2430a31727c65d74465b27691e91d20a5074fc53/DemoWebManage/static/.gitkeep -------------------------------------------------------------------------------- /TestProject/Readme.txt: -------------------------------------------------------------------------------- 1 | 啊哈哈哈哈 -------------------------------------------------------------------------------- /TestProject/listScroll.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 列表滚动Demo 7 | 49 | 50 | 51 |
52 |
第1行
53 |
第2行
54 |
第3行
55 |
第4行
56 |
第5行
57 |
第6行
58 |
59 | 60 | 160 | 161 | --------------------------------------------------------------------------------