Signed-off-by: chy <chy@163.com>
This commit is contained in:
12
.babelrc
Normal file
12
.babelrc
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"presets": [
|
||||||
|
["env", {
|
||||||
|
"modules": false,
|
||||||
|
"targets": {
|
||||||
|
"browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
|
||||||
|
}
|
||||||
|
}],
|
||||||
|
"stage-2"
|
||||||
|
],
|
||||||
|
"plugins":["transform-vue-jsx", "transform-runtime"]
|
||||||
|
}
|
||||||
14
.editorconfig
Normal file
14
.editorconfig
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
# http://editorconfig.org
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
charset = utf-8
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
|
end_of_line = lf
|
||||||
|
insert_final_newline = true
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
|
[*.md]
|
||||||
|
insert_final_newline = false
|
||||||
|
trim_trailing_whitespace = false
|
||||||
15
.gitignore
vendored
Normal file
15
.gitignore
vendored
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
.DS_Store
|
||||||
|
node_modules/
|
||||||
|
dist/
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
package-lock.json
|
||||||
|
|
||||||
|
# Editor directories and files
|
||||||
|
.idea
|
||||||
|
.vscode
|
||||||
|
*.suo
|
||||||
|
*.ntvs*
|
||||||
|
*.njsproj
|
||||||
|
*.sln
|
||||||
10
.postcssrc.js
Normal file
10
.postcssrc.js
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
// https://github.com/michael-ciniawsky/postcss-load-config
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
"plugins": {
|
||||||
|
"postcss-import": {},
|
||||||
|
"postcss-url": {},
|
||||||
|
// to edit target browsers: use "browserslist" field in package.json
|
||||||
|
"autoprefixer": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
4
Dockerfile
Normal file
4
Dockerfile
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
# Dockerfile
|
||||||
|
FROM nginx:alpine
|
||||||
|
COPY dist/ /usr/share/nginx/html/
|
||||||
|
EXPOSE 80
|
||||||
58
README.md
Normal file
58
README.md
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
### 本地运行
|
||||||
|
```
|
||||||
|
npm config set registry https://registry.npmmirror.com/
|
||||||
|
npm install
|
||||||
|
npm run dev
|
||||||
|
|
||||||
|
|
||||||
|
npm install babel-plugin-component -D --legacy-peer-deps
|
||||||
|
```
|
||||||
|
### 打包
|
||||||
|
```
|
||||||
|
npm install
|
||||||
|
npm run build:prod
|
||||||
|
编译结果:admin-ui/dist目录
|
||||||
|
```
|
||||||
|
|
||||||
|
npm cache clean --force
|
||||||
|
|
||||||
|
|
||||||
|
rm -rf node_modules
|
||||||
|
rm package-lock.json # 或者 rm yarn.lock
|
||||||
|
npm install
|
||||||
|
|
||||||
|
|
||||||
|
npm install --legacy-peer-deps
|
||||||
|
|
||||||
|
|
||||||
|
npm install --loglevel verbose
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
server_name localhost;
|
||||||
|
charset utf-8;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
root /opt/web/;
|
||||||
|
try_files $uri $uri/ /index.html;
|
||||||
|
index index.html index.htm;
|
||||||
|
}
|
||||||
|
|
||||||
|
location /prod-api/ {
|
||||||
|
proxy_set_header Host $http_host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header REMOTE-HOST $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_pass http://210.45.128.61:9095/;
|
||||||
|
}
|
||||||
|
|
||||||
|
# springdoc proxy
|
||||||
|
location ~ ^/v3/api-docs/(.*) {
|
||||||
|
proxy_pass http://localhost:8080/v3/api-docs/$1;
|
||||||
|
}
|
||||||
|
|
||||||
|
error_page 500 502 503 504 /50x.html;
|
||||||
|
location = /50x.html {
|
||||||
|
root html;
|
||||||
|
}
|
||||||
|
}
|
||||||
45
build/build.js
Normal file
45
build/build.js
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
'use strict'
|
||||||
|
require('./check-versions')()
|
||||||
|
|
||||||
|
//process.env.NODE_ENV = 'production'
|
||||||
|
|
||||||
|
const ora = require('ora')
|
||||||
|
const rm = require('rimraf')
|
||||||
|
const path = require('path')
|
||||||
|
const chalk = require('chalk')
|
||||||
|
const webpack = require('webpack')
|
||||||
|
const config = require('../config')
|
||||||
|
const webpackConfig = require('./webpack.prod.conf')
|
||||||
|
|
||||||
|
const spinner = ora('building for ' + process.env.NODE_ENV + '...')
|
||||||
|
spinner.start()
|
||||||
|
|
||||||
|
rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => {
|
||||||
|
if (err) throw err
|
||||||
|
webpack(webpackConfig, (err, stats) => {
|
||||||
|
spinner.stop()
|
||||||
|
if (err) throw err
|
||||||
|
process.stdout.write(
|
||||||
|
stats.toString({
|
||||||
|
colors: true,
|
||||||
|
modules: false,
|
||||||
|
children: false,
|
||||||
|
chunks: false,
|
||||||
|
chunkModules: false
|
||||||
|
}) + '\n\n'
|
||||||
|
)
|
||||||
|
|
||||||
|
if (stats.hasErrors()) {
|
||||||
|
console.log(chalk.red(' Build failed with errors.\n'))
|
||||||
|
process.exit(1)
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(chalk.cyan(' Build complete.\n'))
|
||||||
|
console.log(
|
||||||
|
chalk.yellow(
|
||||||
|
' Tip: built files are meant to be served over an HTTP server.\n' +
|
||||||
|
" Opening index.html over file:// won't work.\n"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
})
|
||||||
|
})
|
||||||
64
build/check-versions.js
Normal file
64
build/check-versions.js
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
'use strict'
|
||||||
|
const chalk = require('chalk')
|
||||||
|
const semver = require('semver')
|
||||||
|
const packageConfig = require('../package.json')
|
||||||
|
const shell = require('shelljs')
|
||||||
|
|
||||||
|
function exec(cmd) {
|
||||||
|
return require('child_process')
|
||||||
|
.execSync(cmd)
|
||||||
|
.toString()
|
||||||
|
.trim()
|
||||||
|
}
|
||||||
|
|
||||||
|
const versionRequirements = [
|
||||||
|
{
|
||||||
|
name: 'node',
|
||||||
|
currentVersion: semver.clean(process.version),
|
||||||
|
versionRequirement: packageConfig.engines.node
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
if (shell.which('npm')) {
|
||||||
|
versionRequirements.push({
|
||||||
|
name: 'npm',
|
||||||
|
currentVersion: exec('npm --version'),
|
||||||
|
versionRequirement: packageConfig.engines.npm
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = function() {
|
||||||
|
const warnings = []
|
||||||
|
|
||||||
|
for (let i = 0; i < versionRequirements.length; i++) {
|
||||||
|
const mod = versionRequirements[i]
|
||||||
|
|
||||||
|
if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) {
|
||||||
|
warnings.push(
|
||||||
|
mod.name +
|
||||||
|
': ' +
|
||||||
|
chalk.red(mod.currentVersion) +
|
||||||
|
' should be ' +
|
||||||
|
chalk.green(mod.versionRequirement)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (warnings.length) {
|
||||||
|
console.log('')
|
||||||
|
console.log(
|
||||||
|
chalk.yellow(
|
||||||
|
'To use this template, you must update following to modules:'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
console.log()
|
||||||
|
|
||||||
|
for (let i = 0; i < warnings.length; i++) {
|
||||||
|
const warning = warnings[i]
|
||||||
|
console.log(' ' + warning)
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log()
|
||||||
|
process.exit(1)
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
build/logo.png
Normal file
BIN
build/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.7 KiB |
108
build/utils.js
Normal file
108
build/utils.js
Normal file
@@ -0,0 +1,108 @@
|
|||||||
|
'use strict'
|
||||||
|
const path = require('path')
|
||||||
|
const config = require('../config')
|
||||||
|
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
|
||||||
|
const packageConfig = require('../package.json')
|
||||||
|
|
||||||
|
exports.assetsPath = function(_path) {
|
||||||
|
const assetsSubDirectory =
|
||||||
|
process.env.NODE_ENV === 'production'
|
||||||
|
? config.build.assetsSubDirectory
|
||||||
|
: config.dev.assetsSubDirectory
|
||||||
|
|
||||||
|
return path.posix.join(assetsSubDirectory, _path)
|
||||||
|
}
|
||||||
|
|
||||||
|
exports.cssLoaders = function(options) {
|
||||||
|
options = options || {}
|
||||||
|
|
||||||
|
const cssLoader = {
|
||||||
|
loader: 'css-loader',
|
||||||
|
options: {
|
||||||
|
sourceMap: options.sourceMap
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const postcssLoader = {
|
||||||
|
loader: 'postcss-loader',
|
||||||
|
options: {
|
||||||
|
sourceMap: options.sourceMap
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// generate loader string to be used with extract text plugin
|
||||||
|
function generateLoaders(loader, loaderOptions) {
|
||||||
|
const loaders = []
|
||||||
|
|
||||||
|
// Extract CSS when that option is specified
|
||||||
|
// (which is the case during production build)
|
||||||
|
if (options.extract) {
|
||||||
|
loaders.push(MiniCssExtractPlugin.loader)
|
||||||
|
} else {
|
||||||
|
loaders.push('vue-style-loader')
|
||||||
|
}
|
||||||
|
|
||||||
|
loaders.push(cssLoader)
|
||||||
|
|
||||||
|
if (options.usePostCSS) {
|
||||||
|
loaders.push(postcssLoader)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (loader) {
|
||||||
|
loaders.push({
|
||||||
|
loader: loader + '-loader',
|
||||||
|
options: Object.assign({}, loaderOptions, {
|
||||||
|
sourceMap: options.sourceMap
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
return loaders
|
||||||
|
}
|
||||||
|
// https://vue-loader.vuejs.org/en/configurations/extract-css.html
|
||||||
|
return {
|
||||||
|
css: generateLoaders(),
|
||||||
|
postcss: generateLoaders(),
|
||||||
|
less: generateLoaders('less'),
|
||||||
|
sass: generateLoaders('sass', {
|
||||||
|
indentedSyntax: true
|
||||||
|
}),
|
||||||
|
scss: generateLoaders('sass'),
|
||||||
|
stylus: generateLoaders('stylus'),
|
||||||
|
styl: generateLoaders('stylus')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Generate loaders for standalone style files (outside of .vue)
|
||||||
|
exports.styleLoaders = function(options) {
|
||||||
|
const output = []
|
||||||
|
const loaders = exports.cssLoaders(options)
|
||||||
|
|
||||||
|
for (const extension in loaders) {
|
||||||
|
const loader = loaders[extension]
|
||||||
|
output.push({
|
||||||
|
test: new RegExp('\\.' + extension + '$'),
|
||||||
|
use: loader
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
return output
|
||||||
|
}
|
||||||
|
|
||||||
|
exports.createNotifierCallback = () => {
|
||||||
|
const notifier = require('node-notifier')
|
||||||
|
|
||||||
|
return (severity, errors) => {
|
||||||
|
if (severity !== 'error') return
|
||||||
|
|
||||||
|
const error = errors[0]
|
||||||
|
const filename = error.file && error.file.split('!').pop()
|
||||||
|
|
||||||
|
notifier.notify({
|
||||||
|
title: packageConfig.name,
|
||||||
|
message: severity + ': ' + error.name,
|
||||||
|
subtitle: filename || '',
|
||||||
|
icon: path.join(__dirname, 'logo.png')
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
11
build/vue-loader.conf.js
Normal file
11
build/vue-loader.conf.js
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
'use strict'
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
css: {
|
||||||
|
loaderOptions: {
|
||||||
|
sass: {
|
||||||
|
implementation: require('sass'), // This line must in sass option
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
100
build/webpack.base.conf.js
Normal file
100
build/webpack.base.conf.js
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
'use strict'
|
||||||
|
const path = require('path')
|
||||||
|
const utils = require('./utils')
|
||||||
|
const config = require('../config')
|
||||||
|
const {
|
||||||
|
VueLoaderPlugin
|
||||||
|
} = require('vue-loader')
|
||||||
|
const vueLoaderConfig = require('./vue-loader.conf')
|
||||||
|
|
||||||
|
function resolve(dir) {
|
||||||
|
return path.join(__dirname, '..', dir)
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
context: path.resolve(__dirname, '../'),
|
||||||
|
entry: {
|
||||||
|
app: './src/main.js'
|
||||||
|
},
|
||||||
|
output: {
|
||||||
|
path: config.build.assetsRoot,
|
||||||
|
filename: '[name].js',
|
||||||
|
publicPath: config.build.assetsPublicPath //process.env.NODE_ENV === 'production' ? config.build.assetsPublicPath : config.dev.assetsPublicPath
|
||||||
|
},
|
||||||
|
resolve: {
|
||||||
|
extensions: ['mjs', '.js', '.vue', '.json'],
|
||||||
|
alias: {
|
||||||
|
'@': resolve('src'),
|
||||||
|
'vue$': 'vue/dist/vue.runtime.esm.js'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
module: {
|
||||||
|
rules: [{
|
||||||
|
test: /\.vue$/,
|
||||||
|
loader: 'vue-loader',
|
||||||
|
options: vueLoaderConfig
|
||||||
|
},
|
||||||
|
{
|
||||||
|
test: /\.js$/,
|
||||||
|
loader: 'babel-loader',
|
||||||
|
include: [
|
||||||
|
resolve('src'),
|
||||||
|
resolve('test'),
|
||||||
|
resolve('node_modules/webpack-dev-server/client')
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
test: /\.svg$/,
|
||||||
|
loader: 'svg-sprite-loader',
|
||||||
|
include: [resolve('src/icons')],
|
||||||
|
options: {
|
||||||
|
symbolId: 'icon-[name]'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
|
||||||
|
loader: 'url-loader',
|
||||||
|
exclude: [resolve('src/icons')],
|
||||||
|
options: {
|
||||||
|
//esModule: false,
|
||||||
|
limit: 10000,
|
||||||
|
name: utils.assetsPath('img/[name].[hash:7].[ext]')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/,
|
||||||
|
loader: 'url-loader',
|
||||||
|
options: {
|
||||||
|
limit: 10000,
|
||||||
|
name: utils.assetsPath('media/[name].[hash:7].[ext]')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
|
||||||
|
loader: 'url-loader',
|
||||||
|
options: {
|
||||||
|
limit: 10000,
|
||||||
|
name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
test: /\.mjs$/,
|
||||||
|
include: /node_modules/,
|
||||||
|
type: 'javascript/auto'
|
||||||
|
},
|
||||||
|
]
|
||||||
|
},
|
||||||
|
plugins: [new VueLoaderPlugin()],
|
||||||
|
node: {
|
||||||
|
// prevent webpack from injecting useless setImmediate polyfill because Vue
|
||||||
|
// source contains it (although only uses it if it's native).
|
||||||
|
setImmediate: false,
|
||||||
|
// prevent webpack from injecting mocks to Node native modules
|
||||||
|
// that does not make sense for the client
|
||||||
|
dgram: 'empty',
|
||||||
|
fs: 'empty',
|
||||||
|
net: 'empty',
|
||||||
|
tls: 'empty',
|
||||||
|
child_process: 'empty'
|
||||||
|
}
|
||||||
|
}
|
||||||
100
build/webpack.dev.conf.js
Normal file
100
build/webpack.dev.conf.js
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
'use strict'
|
||||||
|
const path = require('path')
|
||||||
|
const utils = require('./utils')
|
||||||
|
const webpack = require('webpack')
|
||||||
|
const config = require('../config')
|
||||||
|
const merge = require('webpack-merge')
|
||||||
|
const baseWebpackConfig = require('./webpack.base.conf')
|
||||||
|
const HtmlWebpackPlugin = require('html-webpack-plugin')
|
||||||
|
const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin')
|
||||||
|
const portfinder = require('portfinder')
|
||||||
|
|
||||||
|
function resolve(dir) {
|
||||||
|
return path.join(__dirname, '..', dir)
|
||||||
|
}
|
||||||
|
|
||||||
|
const HOST = process.env.HOST
|
||||||
|
const PORT = process.env.PORT && Number(process.env.PORT)
|
||||||
|
|
||||||
|
const devWebpackConfig = merge(baseWebpackConfig, {
|
||||||
|
mode: 'development',
|
||||||
|
output: {
|
||||||
|
path: config.build.assetsRoot,
|
||||||
|
filename: '[name].js',
|
||||||
|
publicPath: config.dev.assetsPublicPath
|
||||||
|
},
|
||||||
|
module: {
|
||||||
|
rules: utils.styleLoaders({
|
||||||
|
sourceMap: config.dev.cssSourceMap,
|
||||||
|
usePostCSS: true
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// cheap-module-eval-source-map is faster for development
|
||||||
|
devtool: config.dev.devtool,
|
||||||
|
|
||||||
|
// these devServer options should be customized in /config/index.js
|
||||||
|
devServer: {
|
||||||
|
clientLogLevel: 'warning',
|
||||||
|
historyApiFallback: true,
|
||||||
|
hot: true,
|
||||||
|
compress: true,
|
||||||
|
host: HOST || config.dev.host,
|
||||||
|
port: PORT || config.dev.port,
|
||||||
|
open: config.dev.autoOpenBrowser,
|
||||||
|
overlay: config.dev.errorOverlay
|
||||||
|
? { warnings: false, errors: true }
|
||||||
|
: false,
|
||||||
|
publicPath: config.dev.assetsPublicPath,
|
||||||
|
proxy: config.dev.proxyTable,
|
||||||
|
quiet: true, // necessary for FriendlyErrorsPlugin
|
||||||
|
watchOptions: {
|
||||||
|
poll: config.dev.poll
|
||||||
|
}
|
||||||
|
},
|
||||||
|
plugins: [
|
||||||
|
new webpack.DefinePlugin({
|
||||||
|
'process.env': require('../config/dev.env')
|
||||||
|
}),
|
||||||
|
new webpack.HotModuleReplacementPlugin(),
|
||||||
|
// https://github.com/ampedandwired/html-webpack-plugin
|
||||||
|
new HtmlWebpackPlugin({
|
||||||
|
filename: 'index.html',
|
||||||
|
template: 'index.html',
|
||||||
|
inject: true,
|
||||||
|
favicon: resolve('static/favicon.ico'),
|
||||||
|
title: 'vue-admin-template'
|
||||||
|
})
|
||||||
|
]
|
||||||
|
})
|
||||||
|
|
||||||
|
module.exports = new Promise((resolve, reject) => {
|
||||||
|
portfinder.basePort = process.env.PORT || config.dev.port
|
||||||
|
portfinder.getPort((err, port) => {
|
||||||
|
if (err) {
|
||||||
|
reject(err)
|
||||||
|
} else {
|
||||||
|
// publish the new Port, necessary for e2e tests
|
||||||
|
process.env.PORT = port
|
||||||
|
// add port to devServer config
|
||||||
|
devWebpackConfig.devServer.port = port
|
||||||
|
|
||||||
|
// Add FriendlyErrorsPlugin
|
||||||
|
devWebpackConfig.plugins.push(
|
||||||
|
new FriendlyErrorsPlugin({
|
||||||
|
compilationSuccessInfo: {
|
||||||
|
messages: [
|
||||||
|
`Your application is running here: http://${
|
||||||
|
devWebpackConfig.devServer.host
|
||||||
|
}:${port}`
|
||||||
|
]
|
||||||
|
},
|
||||||
|
onErrors: config.dev.notifyOnErrors
|
||||||
|
? utils.createNotifierCallback()
|
||||||
|
: undefined
|
||||||
|
})
|
||||||
|
)
|
||||||
|
|
||||||
|
resolve(devWebpackConfig)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
187
build/webpack.prod.conf.js
Normal file
187
build/webpack.prod.conf.js
Normal file
@@ -0,0 +1,187 @@
|
|||||||
|
'use strict'
|
||||||
|
const path = require('path')
|
||||||
|
const utils = require('./utils')
|
||||||
|
const webpack = require('webpack')
|
||||||
|
const config = require('../config')
|
||||||
|
const merge = require('webpack-merge')
|
||||||
|
const baseWebpackConfig = require('./webpack.base.conf')
|
||||||
|
const CopyWebpackPlugin = require('copy-webpack-plugin')
|
||||||
|
const HtmlWebpackPlugin = require('html-webpack-plugin')
|
||||||
|
const ScriptExtHtmlWebpackPlugin = require('script-ext-html-webpack-plugin')
|
||||||
|
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
|
||||||
|
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin')
|
||||||
|
const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
|
||||||
|
|
||||||
|
function resolve(dir) {
|
||||||
|
return path.join(__dirname, '..', dir)
|
||||||
|
}
|
||||||
|
|
||||||
|
var env = require('../config/dev.env')
|
||||||
|
if (process.env.NODE_ENV === 'testing') {
|
||||||
|
env = require('../config/test.env')
|
||||||
|
}
|
||||||
|
if (process.env.NODE_ENV === 'production') {
|
||||||
|
env = require('../config/prod.env')
|
||||||
|
}
|
||||||
|
|
||||||
|
// For NamedChunksPlugin
|
||||||
|
const seen = new Set()
|
||||||
|
const nameLength = 4
|
||||||
|
|
||||||
|
const webpackConfig = merge(baseWebpackConfig, {
|
||||||
|
mode: 'production',
|
||||||
|
module: {
|
||||||
|
rules: utils.styleLoaders({
|
||||||
|
sourceMap: config.build.productionSourceMap,
|
||||||
|
extract: true,
|
||||||
|
usePostCSS: true
|
||||||
|
})
|
||||||
|
},
|
||||||
|
devtool: config.build.productionSourceMap ? config.build.devtool : false,
|
||||||
|
output: {
|
||||||
|
path: config.build.assetsRoot,
|
||||||
|
filename: utils.assetsPath('js/[name].[chunkhash:8].js'),
|
||||||
|
chunkFilename: utils.assetsPath('js/[name].[chunkhash:8].js')
|
||||||
|
},
|
||||||
|
plugins: [
|
||||||
|
// http://vuejs.github.io/vue-loader/en/workflow/production.html
|
||||||
|
new webpack.DefinePlugin({
|
||||||
|
'process.env': env
|
||||||
|
}),
|
||||||
|
// extract css into its own file
|
||||||
|
new MiniCssExtractPlugin({
|
||||||
|
filename: utils.assetsPath('css/[name].[contenthash:8].css'),
|
||||||
|
chunkFilename: utils.assetsPath('css/[name].[contenthash:8].css')
|
||||||
|
}),
|
||||||
|
// generate dist index.html with correct asset hash for caching.
|
||||||
|
// you can customize output by editing /index.html
|
||||||
|
// see https://github.com/ampedandwired/html-webpack-plugin
|
||||||
|
new HtmlWebpackPlugin({
|
||||||
|
filename: config.build.index,
|
||||||
|
template: 'index.html',
|
||||||
|
inject: true,
|
||||||
|
favicon: resolve('static/favicon.ico'),
|
||||||
|
title: 'vue-admin-template',
|
||||||
|
minify: {
|
||||||
|
removeComments: true,
|
||||||
|
collapseWhitespace: true,
|
||||||
|
removeAttributeQuotes: true
|
||||||
|
// more options:
|
||||||
|
// https://github.com/kangax/html-minifier#options-quick-reference
|
||||||
|
}
|
||||||
|
// default sort mode uses toposort which cannot handle cyclic deps
|
||||||
|
// in certain cases, and in webpack 4, chunk order in HTML doesn't
|
||||||
|
// matter anyway
|
||||||
|
}),
|
||||||
|
new ScriptExtHtmlWebpackPlugin({
|
||||||
|
//`runtime` must same as runtimeChunk name. default is `runtime`
|
||||||
|
inline: /runtime\..*\.js$/
|
||||||
|
}),
|
||||||
|
// keep chunk.id stable when chunk has no name
|
||||||
|
new webpack.NamedChunksPlugin(chunk => {
|
||||||
|
if (chunk.name) {
|
||||||
|
return chunk.name
|
||||||
|
}
|
||||||
|
const modules = Array.from(chunk.modulesIterable)
|
||||||
|
if (modules.length > 1) {
|
||||||
|
const hash = require('hash-sum')
|
||||||
|
const joinedHash = hash(modules.map(m => m.id).join('_'))
|
||||||
|
let len = nameLength
|
||||||
|
while (seen.has(joinedHash.substr(0, len))) len++
|
||||||
|
seen.add(joinedHash.substr(0, len))
|
||||||
|
return `chunk-${joinedHash.substr(0, len)}`
|
||||||
|
} else {
|
||||||
|
return modules[0].id
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
// keep module.id stable when vender modules does not change
|
||||||
|
new webpack.HashedModuleIdsPlugin(),
|
||||||
|
// copy custom static assets
|
||||||
|
new CopyWebpackPlugin([{
|
||||||
|
from: path.resolve(__dirname, '../static'),
|
||||||
|
to: config.build.assetsSubDirectory,
|
||||||
|
ignore: ['.*']
|
||||||
|
}])
|
||||||
|
],
|
||||||
|
optimization: {
|
||||||
|
splitChunks: {
|
||||||
|
chunks: 'all',
|
||||||
|
cacheGroups: {
|
||||||
|
libs: {
|
||||||
|
name: 'chunk-libs',
|
||||||
|
test: /[\\/]node_modules[\\/]/,
|
||||||
|
priority: 10,
|
||||||
|
chunks: 'initial' // 只打包初始时依赖的第三方
|
||||||
|
},
|
||||||
|
elementUI: {
|
||||||
|
name: 'chunk-elementUI', // 单独将 elementUI 拆包
|
||||||
|
priority: 20, // 权重要大于 libs 和 app 不然会被打包进 libs 或者 app
|
||||||
|
test: /[\\/]node_modules[\\/]element-ui[\\/]/
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
runtimeChunk: 'single',
|
||||||
|
minimizer: [
|
||||||
|
new UglifyJsPlugin({
|
||||||
|
uglifyOptions: {
|
||||||
|
mangle: {
|
||||||
|
safari10: true
|
||||||
|
},
|
||||||
|
compress: {
|
||||||
|
drop_debugger: false , //true 去掉debugger
|
||||||
|
drop_console: false, //true 去掉console
|
||||||
|
pure_funcs: ['console.log', 'console.info', 'console.warn', 'console.debug'] //drop_console 设置false,需要特殊清除的
|
||||||
|
},
|
||||||
|
},
|
||||||
|
sourceMap: config.build.productionSourceMap,
|
||||||
|
cache: true,
|
||||||
|
parallel: true,
|
||||||
|
}),
|
||||||
|
// Compress extracted CSS. We are using this plugin so that possible
|
||||||
|
// duplicated CSS from different components can be deduped.
|
||||||
|
new OptimizeCSSAssetsPlugin()
|
||||||
|
]
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
if (config.build.productionGzip) {
|
||||||
|
const CompressionWebpackPlugin = require('compression-webpack-plugin')
|
||||||
|
|
||||||
|
webpackConfig.plugins.push(
|
||||||
|
new CompressionWebpackPlugin({
|
||||||
|
asset: '[path].gz[query]',
|
||||||
|
algorithm: 'gzip',
|
||||||
|
test: new RegExp(
|
||||||
|
'\\.(' + config.build.productionGzipExtensions.join('|') + ')$'
|
||||||
|
),
|
||||||
|
threshold: 10240,
|
||||||
|
minRatio: 0.8
|
||||||
|
})
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (config.build.generateAnalyzerReport || config.build.bundleAnalyzerReport) {
|
||||||
|
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer')
|
||||||
|
.BundleAnalyzerPlugin
|
||||||
|
|
||||||
|
if (config.build.bundleAnalyzerReport) {
|
||||||
|
webpackConfig.plugins.push(
|
||||||
|
new BundleAnalyzerPlugin({
|
||||||
|
analyzerPort: 8080,
|
||||||
|
generateStatsFile: false
|
||||||
|
})
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (config.build.generateAnalyzerReport) {
|
||||||
|
webpackConfig.plugins.push(
|
||||||
|
new BundleAnalyzerPlugin({
|
||||||
|
analyzerMode: 'static',
|
||||||
|
reportFilename: 'bundle-report.html',
|
||||||
|
openAnalyzer: false
|
||||||
|
})
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = webpackConfig
|
||||||
9
config/dev.env.js
Normal file
9
config/dev.env.js
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
'use strict'
|
||||||
|
const merge = require('webpack-merge')
|
||||||
|
const prodEnv = require('./prod.env')
|
||||||
|
|
||||||
|
module.exports = merge(prodEnv, {
|
||||||
|
NODE_ENV: '"development"',
|
||||||
|
BASE_API: '"http://127.0.0.1:48090"'
|
||||||
|
// BASE_API: '"http://192.168.1.241:8080/prod-api"'
|
||||||
|
})
|
||||||
86
config/index.js
Normal file
86
config/index.js
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
'use strict'
|
||||||
|
// Template version: 1.2.6
|
||||||
|
// see http://vuejs-templates.github.io/webpack for documentation.
|
||||||
|
|
||||||
|
const path = require('path')
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
dev: {
|
||||||
|
// Paths
|
||||||
|
assetsSubDirectory: 'static',
|
||||||
|
assetsPublicPath: '/',
|
||||||
|
proxyTable: {},
|
||||||
|
|
||||||
|
// Various Dev Server settings
|
||||||
|
host: 'localhost', // can be overwritten by process.env.HOST
|
||||||
|
port: 9528, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
|
||||||
|
autoOpenBrowser: true,
|
||||||
|
errorOverlay: true,
|
||||||
|
notifyOnErrors: false,
|
||||||
|
poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
|
||||||
|
|
||||||
|
// Use Eslint Loader?
|
||||||
|
// If true, your code will be linted during bundling and
|
||||||
|
// linting errors and warnings will be shown in the console.
|
||||||
|
useEslint: true,
|
||||||
|
// If true, eslint errors and warnings will also be shown in the error overlay
|
||||||
|
// in the browser.
|
||||||
|
showEslintErrorsInOverlay: false,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Source Maps
|
||||||
|
*/
|
||||||
|
|
||||||
|
// https://webpack.js.org/configuration/devtool/#development
|
||||||
|
devtool: 'cheap-source-map',
|
||||||
|
|
||||||
|
// CSS Sourcemaps off by default because relative paths are "buggy"
|
||||||
|
// with this option, according to the CSS-Loader README
|
||||||
|
// (https://github.com/webpack/css-loader#sourcemaps)
|
||||||
|
// In our experience, they generally work as expected,
|
||||||
|
// just be aware of this issue when enabling this option.
|
||||||
|
cssSourceMap: false
|
||||||
|
},
|
||||||
|
|
||||||
|
build: {
|
||||||
|
// Template for index.html
|
||||||
|
index: path.resolve(__dirname, '../dist/index.html'),
|
||||||
|
|
||||||
|
// Paths
|
||||||
|
assetsRoot: path.resolve(__dirname, '../dist'),
|
||||||
|
assetsSubDirectory: 'static',
|
||||||
|
|
||||||
|
/**
|
||||||
|
* You can set by youself according to actual condition
|
||||||
|
* You will need to set this if you plan to deploy your site under a sub path,
|
||||||
|
* for example GitHub pages. If you plan to deploy your site to https://foo.github.io/bar/,
|
||||||
|
* then assetsPublicPath should be set to "/bar/".
|
||||||
|
* In most cases please use '/' !!!
|
||||||
|
*/
|
||||||
|
assetsPublicPath: '/',
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Source Maps
|
||||||
|
*/
|
||||||
|
|
||||||
|
productionSourceMap: false,
|
||||||
|
// https://webpack.js.org/configuration/devtool/#production
|
||||||
|
devtool: 'source-map',
|
||||||
|
|
||||||
|
// Gzip off by default as many popular static hosts such as
|
||||||
|
// Surge or Netlify already gzip all static assets for you.
|
||||||
|
// Before setting to `true`, make sure to:
|
||||||
|
// npm install --save-dev compression-webpack-plugin
|
||||||
|
productionGzip: false,
|
||||||
|
productionGzipExtensions: ['js', 'css'],
|
||||||
|
|
||||||
|
// Run the build command with an extra argument to
|
||||||
|
// View the bundle analyzer report after build finishes:
|
||||||
|
// `npm run build --report`
|
||||||
|
// Set to `true` or `false` to always turn it on or off
|
||||||
|
bundleAnalyzerReport: process.env.npm_config_report || false,
|
||||||
|
|
||||||
|
// `npm run build:prod --generate_report`
|
||||||
|
generateAnalyzerReport: process.env.npm_config_generate_report || false
|
||||||
|
}
|
||||||
|
}
|
||||||
5
config/prod.env.js
Normal file
5
config/prod.env.js
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
'use strict'
|
||||||
|
module.exports = {
|
||||||
|
NODE_ENV: '"production"',
|
||||||
|
BASE_API: '"http://192.168.1.241:8080/prod-api"'
|
||||||
|
}
|
||||||
8
config/test.env.js
Normal file
8
config/test.env.js
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
'use strict'
|
||||||
|
const merge = require('webpack-merge')
|
||||||
|
const prodEnv = require('./prod.env')
|
||||||
|
|
||||||
|
module.exports = merge(prodEnv, {
|
||||||
|
NODE_ENV: '"testing"',
|
||||||
|
BASE_API: '"./"'
|
||||||
|
})
|
||||||
24
index.html
Normal file
24
index.html
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||||
|
<title>数据大屏</title>
|
||||||
|
<link rel="icon" href="static/favicon.ico" type="image/x-icon" />
|
||||||
|
<link rel="shortcut icon" href="static/favicon.ico" type="image/x-icon" />
|
||||||
|
<link rel='stylesheet' href='/static/luckysheet/plugins/css/pluginsCss.css' />
|
||||||
|
<link rel='stylesheet' href='/static/luckysheet/plugins/plugins.css' />
|
||||||
|
<link rel='stylesheet' href='/static/luckysheet/css/luckysheet.css' />
|
||||||
|
<link rel='stylesheet' href='/static/luckysheet/assets/iconfont/iconfont.css' />
|
||||||
|
<script src="/static/luckysheet/plugins/js/plugin.js"></script>
|
||||||
|
<script src="/static/luckysheet/luckysheet.umd.js"></script>
|
||||||
|
<script src="/static/luckysheet/luckyexcel.umd.js"></script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div id="app"></div>
|
||||||
|
<!-- built files will be auto injected -->
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
46
node_modules_echarts_need/map/js/china-contour.js
Normal file
46
node_modules_echarts_need/map/js/china-contour.js
Normal file
File diff suppressed because one or more lines are too long
46
node_modules_echarts_need/map/js/china.js
Normal file
46
node_modules_echarts_need/map/js/china.js
Normal file
File diff suppressed because one or more lines are too long
46
node_modules_echarts_need/map/js/province/anhui.js
Normal file
46
node_modules_echarts_need/map/js/province/anhui.js
Normal file
File diff suppressed because one or more lines are too long
46
node_modules_echarts_need/map/js/province/aomen.js
Normal file
46
node_modules_echarts_need/map/js/province/aomen.js
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
* or more contributor license agreements. See the NOTICE file
|
||||||
|
* distributed with this work for additional information
|
||||||
|
* regarding copyright ownership. The ASF licenses this file
|
||||||
|
* to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance
|
||||||
|
* with the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing,
|
||||||
|
* software distributed under the License is distributed on an
|
||||||
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
* KIND, either express or implied. See the License for the
|
||||||
|
* specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
(function (root, factory) {
|
||||||
|
if (typeof define === 'function' && define.amd) {
|
||||||
|
// AMD. Register as an anonymous module.
|
||||||
|
define(['exports', 'echarts'], factory);
|
||||||
|
} else if (typeof exports === 'object' && typeof exports.nodeName !== 'string') {
|
||||||
|
// CommonJS
|
||||||
|
factory(exports, require('echarts'));
|
||||||
|
} else {
|
||||||
|
// Browser globals
|
||||||
|
factory({}, root.echarts);
|
||||||
|
}
|
||||||
|
}(this, function (exports, echarts) {
|
||||||
|
var log = function (msg) {
|
||||||
|
if (typeof console !== 'undefined') {
|
||||||
|
console && console.error && console.error(msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!echarts) {
|
||||||
|
log('ECharts is not Loaded');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!echarts.registerMap) {
|
||||||
|
log('ECharts Map is not loaded')
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
echarts.registerMap('澳门', {"type":"FeatureCollection","features":[{"id":"820001","type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[["@@LADC^umZ@DONWE@DALBBF@H@DFBBTC"],["@@P@LC@AGM@OECMBABBTCD@DDH"]],"encodeOffsets":[[[116285,22746]],[[116303,22746]]]},"properties":{"cp":[113.552965,22.207882],"name":"花地玛堂区","childNum":2}},{"id":"820002","type":"Feature","geometry":{"type":"Polygon","coordinates":["@@MK@CA@AAGDEB@NVFJG"],"encodeOffsets":[[116281,22734]]},"properties":{"cp":[113.549052,22.199175],"name":"花王堂区","childNum":1}},{"id":"820003","type":"Feature","geometry":{"type":"Polygon","coordinates":["@@EGOB@DNLHE@C"],"encodeOffsets":[[116285,22729]]},"properties":{"cp":[113.550252,22.193791],"name":"望德堂区","childNum":1}},{"id":"820004","type":"Feature","geometry":{"type":"Polygon","coordinates":["@@YMVAN@BFCBBDAFHDBBFDHIJJEFDPCHHlYJQ"],"encodeOffsets":[[116313,22707]]},"properties":{"cp":[113.55374,22.188119],"name":"大堂区","childNum":1}},{"id":"820005","type":"Feature","geometry":{"type":"Polygon","coordinates":["@@JICGAECACGEBAAEDBFNXB@"],"encodeOffsets":[[116266,22728]]},"properties":{"cp":[113.54167,22.187778],"name":"风顺堂区","childNum":1}},{"id":"820006","type":"Feature","geometry":{"type":"Polygon","coordinates":["@@ ZNWRquZCBCC@AEA@@ADCDCAACEAGBQ@INEL"],"encodeOffsets":[[116265,22694]]},"properties":{"cp":[113.558783,22.154124],"name":"嘉模堂区","childNum":1}},{"id":"820007","type":"Feature","geometry":{"type":"Polygon","coordinates":["@@MOIAIEI@@GE@AAUCBdCFIFR@HAFBBDDBDCBC@@FB@BDDDA\\M"],"encodeOffsets":[[116316,22676]]},"properties":{"cp":[113.56925,22.136546],"name":"路凼填海区","childNum":1}},{"id":"820008","type":"Feature","geometry":{"type":"Polygon","coordinates":["@@DKMMa_GC_COD@dVDBBF@@HJ@JFJBNPZK"],"encodeOffsets":[[116329,22670]]},"properties":{"cp":[113.559954,22.124049],"name":"圣方济各堂区","childNum":1}}],"UTF8Encoding":true});
|
||||||
|
}));
|
||||||
46
node_modules_echarts_need/map/js/province/beijing.js
Normal file
46
node_modules_echarts_need/map/js/province/beijing.js
Normal file
File diff suppressed because one or more lines are too long
20
node_modules_echarts_need/map/js/province/chongqing.js
Normal file
20
node_modules_echarts_need/map/js/province/chongqing.js
Normal file
File diff suppressed because one or more lines are too long
46
node_modules_echarts_need/map/js/province/fujian.js
Normal file
46
node_modules_echarts_need/map/js/province/fujian.js
Normal file
File diff suppressed because one or more lines are too long
46
node_modules_echarts_need/map/js/province/gansu.js
Normal file
46
node_modules_echarts_need/map/js/province/gansu.js
Normal file
File diff suppressed because one or more lines are too long
46
node_modules_echarts_need/map/js/province/guangdong.js
Normal file
46
node_modules_echarts_need/map/js/province/guangdong.js
Normal file
File diff suppressed because one or more lines are too long
46
node_modules_echarts_need/map/js/province/guangxi.js
Normal file
46
node_modules_echarts_need/map/js/province/guangxi.js
Normal file
File diff suppressed because one or more lines are too long
46
node_modules_echarts_need/map/js/province/guizhou.js
Normal file
46
node_modules_echarts_need/map/js/province/guizhou.js
Normal file
File diff suppressed because one or more lines are too long
46
node_modules_echarts_need/map/js/province/hainan.js
Normal file
46
node_modules_echarts_need/map/js/province/hainan.js
Normal file
File diff suppressed because one or more lines are too long
46
node_modules_echarts_need/map/js/province/hebei.js
Normal file
46
node_modules_echarts_need/map/js/province/hebei.js
Normal file
File diff suppressed because one or more lines are too long
46
node_modules_echarts_need/map/js/province/heilongjiang.js
Normal file
46
node_modules_echarts_need/map/js/province/heilongjiang.js
Normal file
File diff suppressed because one or more lines are too long
46
node_modules_echarts_need/map/js/province/henan.js
Normal file
46
node_modules_echarts_need/map/js/province/henan.js
Normal file
File diff suppressed because one or more lines are too long
46
node_modules_echarts_need/map/js/province/hubei.js
Normal file
46
node_modules_echarts_need/map/js/province/hubei.js
Normal file
File diff suppressed because one or more lines are too long
46
node_modules_echarts_need/map/js/province/hunan.js
Normal file
46
node_modules_echarts_need/map/js/province/hunan.js
Normal file
File diff suppressed because one or more lines are too long
46
node_modules_echarts_need/map/js/province/jiangsu.js
Normal file
46
node_modules_echarts_need/map/js/province/jiangsu.js
Normal file
File diff suppressed because one or more lines are too long
46
node_modules_echarts_need/map/js/province/jiangxi.js
Normal file
46
node_modules_echarts_need/map/js/province/jiangxi.js
Normal file
File diff suppressed because one or more lines are too long
46
node_modules_echarts_need/map/js/province/jilin.js
Normal file
46
node_modules_echarts_need/map/js/province/jilin.js
Normal file
File diff suppressed because one or more lines are too long
46
node_modules_echarts_need/map/js/province/liaoning.js
Normal file
46
node_modules_echarts_need/map/js/province/liaoning.js
Normal file
File diff suppressed because one or more lines are too long
46
node_modules_echarts_need/map/js/province/neimenggu.js
Normal file
46
node_modules_echarts_need/map/js/province/neimenggu.js
Normal file
File diff suppressed because one or more lines are too long
46
node_modules_echarts_need/map/js/province/ningxia.js
Normal file
46
node_modules_echarts_need/map/js/province/ningxia.js
Normal file
File diff suppressed because one or more lines are too long
46
node_modules_echarts_need/map/js/province/qinghai.js
Normal file
46
node_modules_echarts_need/map/js/province/qinghai.js
Normal file
File diff suppressed because one or more lines are too long
46
node_modules_echarts_need/map/js/province/shandong.js
Normal file
46
node_modules_echarts_need/map/js/province/shandong.js
Normal file
File diff suppressed because one or more lines are too long
20
node_modules_echarts_need/map/js/province/shanghai.js
Normal file
20
node_modules_echarts_need/map/js/province/shanghai.js
Normal file
File diff suppressed because one or more lines are too long
46
node_modules_echarts_need/map/js/province/shanxi.js
Normal file
46
node_modules_echarts_need/map/js/province/shanxi.js
Normal file
File diff suppressed because one or more lines are too long
46
node_modules_echarts_need/map/js/province/shanxi1.js
Normal file
46
node_modules_echarts_need/map/js/province/shanxi1.js
Normal file
File diff suppressed because one or more lines are too long
46
node_modules_echarts_need/map/js/province/sichuan.js
Normal file
46
node_modules_echarts_need/map/js/province/sichuan.js
Normal file
File diff suppressed because one or more lines are too long
20
node_modules_echarts_need/map/js/province/taiwan.js
Normal file
20
node_modules_echarts_need/map/js/province/taiwan.js
Normal file
File diff suppressed because one or more lines are too long
19
node_modules_echarts_need/map/js/province/tianjin.js
Normal file
19
node_modules_echarts_need/map/js/province/tianjin.js
Normal file
File diff suppressed because one or more lines are too long
46
node_modules_echarts_need/map/js/province/xianggang.js
Normal file
46
node_modules_echarts_need/map/js/province/xianggang.js
Normal file
File diff suppressed because one or more lines are too long
20
node_modules_echarts_need/map/js/province/xinjiang.js
Normal file
20
node_modules_echarts_need/map/js/province/xinjiang.js
Normal file
File diff suppressed because one or more lines are too long
20
node_modules_echarts_need/map/js/province/xizang.js
Normal file
20
node_modules_echarts_need/map/js/province/xizang.js
Normal file
File diff suppressed because one or more lines are too long
46
node_modules_echarts_need/map/js/province/yunnan.js
Normal file
46
node_modules_echarts_need/map/js/province/yunnan.js
Normal file
File diff suppressed because one or more lines are too long
46
node_modules_echarts_need/map/js/province/zhejiang.js
Normal file
46
node_modules_echarts_need/map/js/province/zhejiang.js
Normal file
File diff suppressed because one or more lines are too long
20
node_modules_echarts_need/map/js/world.js
Normal file
20
node_modules_echarts_need/map/js/world.js
Normal file
File diff suppressed because one or more lines are too long
1
node_modules_echarts_need/map/json/china-cities.json
Normal file
1
node_modules_echarts_need/map/json/china-cities.json
Normal file
File diff suppressed because one or more lines are too long
1
node_modules_echarts_need/map/json/china-contour.json
Normal file
1
node_modules_echarts_need/map/json/china-contour.json
Normal file
File diff suppressed because one or more lines are too long
1
node_modules_echarts_need/map/json/china.json
Normal file
1
node_modules_echarts_need/map/json/china.json
Normal file
File diff suppressed because one or more lines are too long
1
node_modules_echarts_need/map/json/province/anhui.json
Normal file
1
node_modules_echarts_need/map/json/province/anhui.json
Normal file
File diff suppressed because one or more lines are too long
1
node_modules_echarts_need/map/json/province/aomen.json
Normal file
1
node_modules_echarts_need/map/json/province/aomen.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{"type":"FeatureCollection","features":[{"id":"820001","type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[["@@LADC^umZ@DONWE@DALBBF@H@DFBBTC"],["@@P@LC@AGM@OECMBABBTCD@DDH"]],"encodeOffsets":[[[116285,22746]],[[116303,22746]]]},"properties":{"cp":[113.552965,22.207882],"name":"花地玛堂区","childNum":2}},{"id":"820002","type":"Feature","geometry":{"type":"Polygon","coordinates":["@@MK@CA@AAGDEB@NVFJG"],"encodeOffsets":[[116281,22734]]},"properties":{"cp":[113.549052,22.199175],"name":"花王堂区","childNum":1}},{"id":"820003","type":"Feature","geometry":{"type":"Polygon","coordinates":["@@EGOB@DNLHE@C"],"encodeOffsets":[[116285,22729]]},"properties":{"cp":[113.550252,22.193791],"name":"望德堂区","childNum":1}},{"id":"820004","type":"Feature","geometry":{"type":"Polygon","coordinates":["@@YMVAN@BFCBBDAFHDBBFDHIJJEFDPCHHlYJQ"],"encodeOffsets":[[116313,22707]]},"properties":{"cp":[113.55374,22.188119],"name":"大堂区","childNum":1}},{"id":"820005","type":"Feature","geometry":{"type":"Polygon","coordinates":["@@JICGAECACGEBAAEDBFNXB@"],"encodeOffsets":[[116266,22728]]},"properties":{"cp":[113.54167,22.187778],"name":"风顺堂区","childNum":1}},{"id":"820006","type":"Feature","geometry":{"type":"Polygon","coordinates":["@@ ZNWRquZCBCC@AEA@@ADCDCAACEAGBQ@INEL"],"encodeOffsets":[[116265,22694]]},"properties":{"cp":[113.558783,22.154124],"name":"嘉模堂区","childNum":1}},{"id":"820007","type":"Feature","geometry":{"type":"Polygon","coordinates":["@@MOIAIEI@@GE@AAUCBdCFIFR@HAFBBDDBDCBC@@FB@BDDDA\\M"],"encodeOffsets":[[116316,22676]]},"properties":{"cp":[113.56925,22.136546],"name":"路凼填海区","childNum":1}},{"id":"820008","type":"Feature","geometry":{"type":"Polygon","coordinates":["@@DKMMa_GC_COD@dVDBBF@@HJ@JFJBNPZK"],"encodeOffsets":[[116329,22670]]},"properties":{"cp":[113.559954,22.124049],"name":"圣方济各堂区","childNum":1}}],"UTF8Encoding":true}
|
||||||
1
node_modules_echarts_need/map/json/province/beijing.json
Normal file
1
node_modules_echarts_need/map/json/province/beijing.json
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
node_modules_echarts_need/map/json/province/fujian.json
Normal file
1
node_modules_echarts_need/map/json/province/fujian.json
Normal file
File diff suppressed because one or more lines are too long
1
node_modules_echarts_need/map/json/province/gansu.json
Normal file
1
node_modules_echarts_need/map/json/province/gansu.json
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
node_modules_echarts_need/map/json/province/guangxi.json
Normal file
1
node_modules_echarts_need/map/json/province/guangxi.json
Normal file
File diff suppressed because one or more lines are too long
1
node_modules_echarts_need/map/json/province/guizhou.json
Normal file
1
node_modules_echarts_need/map/json/province/guizhou.json
Normal file
File diff suppressed because one or more lines are too long
1
node_modules_echarts_need/map/json/province/hainan.json
Normal file
1
node_modules_echarts_need/map/json/province/hainan.json
Normal file
File diff suppressed because one or more lines are too long
1
node_modules_echarts_need/map/json/province/hebei.json
Normal file
1
node_modules_echarts_need/map/json/province/hebei.json
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
node_modules_echarts_need/map/json/province/henan.json
Normal file
1
node_modules_echarts_need/map/json/province/henan.json
Normal file
File diff suppressed because one or more lines are too long
1
node_modules_echarts_need/map/json/province/hubei.json
Normal file
1
node_modules_echarts_need/map/json/province/hubei.json
Normal file
File diff suppressed because one or more lines are too long
1
node_modules_echarts_need/map/json/province/hunan.json
Normal file
1
node_modules_echarts_need/map/json/province/hunan.json
Normal file
File diff suppressed because one or more lines are too long
1
node_modules_echarts_need/map/json/province/jiangsu.json
Normal file
1
node_modules_echarts_need/map/json/province/jiangsu.json
Normal file
File diff suppressed because one or more lines are too long
1
node_modules_echarts_need/map/json/province/jiangxi.json
Normal file
1
node_modules_echarts_need/map/json/province/jiangxi.json
Normal file
File diff suppressed because one or more lines are too long
1
node_modules_echarts_need/map/json/province/jilin.json
Normal file
1
node_modules_echarts_need/map/json/province/jilin.json
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
node_modules_echarts_need/map/json/province/ningxia.json
Normal file
1
node_modules_echarts_need/map/json/province/ningxia.json
Normal file
File diff suppressed because one or more lines are too long
1
node_modules_echarts_need/map/json/province/qinghai.json
Normal file
1
node_modules_echarts_need/map/json/province/qinghai.json
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
node_modules_echarts_need/map/json/province/shanxi.json
Normal file
1
node_modules_echarts_need/map/json/province/shanxi.json
Normal file
File diff suppressed because one or more lines are too long
1
node_modules_echarts_need/map/json/province/shanxi1.json
Normal file
1
node_modules_echarts_need/map/json/province/shanxi1.json
Normal file
File diff suppressed because one or more lines are too long
1
node_modules_echarts_need/map/json/province/sichuan.json
Normal file
1
node_modules_echarts_need/map/json/province/sichuan.json
Normal file
File diff suppressed because one or more lines are too long
1
node_modules_echarts_need/map/json/province/taiwan.json
Normal file
1
node_modules_echarts_need/map/json/province/taiwan.json
Normal file
File diff suppressed because one or more lines are too long
1
node_modules_echarts_need/map/json/province/tianjin.json
Normal file
1
node_modules_echarts_need/map/json/province/tianjin.json
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
node_modules_echarts_need/map/json/province/xizang.json
Normal file
1
node_modules_echarts_need/map/json/province/xizang.json
Normal file
File diff suppressed because one or more lines are too long
1
node_modules_echarts_need/map/json/province/yunnan.json
Normal file
1
node_modules_echarts_need/map/json/province/yunnan.json
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
node_modules_echarts_need/map/json/world.json
Normal file
1
node_modules_echarts_need/map/json/world.json
Normal file
File diff suppressed because one or more lines are too long
8
node_modules_echarts_need/readme
Normal file
8
node_modules_echarts_need/readme
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
1、执行完npm install后需要将map文件夹拷贝到node_modules/echarts/文件夹下,
|
||||||
|
因为echarts v5.0之后的版本不在包含map文件夹
|
||||||
|
|
||||||
|
2、执行完1之后需要修改 report-ui/node_modules/echarts目录下的package.json
|
||||||
|
在“sideEffects”追加 "map/js/*.js" 和 "map/js/province/*.js"
|
||||||
|
不明白可参考:https://blog.csdn.net/m0_45159572/article/details/130077091
|
||||||
|
|
||||||
|
|
||||||
110
package.json
Normal file
110
package.json
Normal file
@@ -0,0 +1,110 @@
|
|||||||
|
{
|
||||||
|
"name": "report-ui",
|
||||||
|
"version": "1.7.1",
|
||||||
|
"description": "report-ui",
|
||||||
|
"author": "beliefteam",
|
||||||
|
"scripts": {
|
||||||
|
"dev": "SET NODE_OPTIONS=--openssl-legacy-provider && webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
|
||||||
|
"start": "npm run dev",
|
||||||
|
"build": "SET NODE_OPTIONS=--openssl-legacy-provider && cross-env NODE_ENV=production node build/build.js",
|
||||||
|
"build:dev": "SET NODE_OPTIONS=--openssl-legacy-provider && cross-env NODE_ENV=development node build/build.js",
|
||||||
|
"build:test": "SET NODE_OPTIONS=--openssl-legacy-provider && cross-env NODE_ENV=testing node build/build.js",
|
||||||
|
"build:prod": "SET NODE_OPTIONS=--openssl-legacy-provider && cross-env NODE_ENV=production node build/build.js"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@ckeditor/ckeditor5-build-decoupled-document": "^23.1.0",
|
||||||
|
"@jiaminghi/data-view": "^2.10.0",
|
||||||
|
"@smallwei/avue": "^2.9.13",
|
||||||
|
"axios": "0.18.0",
|
||||||
|
"chokidar": "^3.5.2",
|
||||||
|
"codemirror": "^5.58.1",
|
||||||
|
"crypto-js": "^3.1.9-1",
|
||||||
|
"echarts": "^5.5.1",
|
||||||
|
"echarts-gl": "^2.0.9",
|
||||||
|
"echarts-liquidfill": "^3.1.0",
|
||||||
|
"echarts-wordcloud": "^2.1.0",
|
||||||
|
"element-ui": "^2.15.14",
|
||||||
|
"flv.js": "^1.6.2",
|
||||||
|
"js-cookie": "2.2.0",
|
||||||
|
"jsbarcode": "^3.11.4",
|
||||||
|
"miment": "^0.0.9",
|
||||||
|
"moment": "^2.29.1",
|
||||||
|
"monaco-editor": "^0.28.0",
|
||||||
|
"normalize.css": "7.0.0",
|
||||||
|
"nprogress": "0.2.0",
|
||||||
|
"qrcodejs2": "0.0.2",
|
||||||
|
"sortablejs": "^1.10.2",
|
||||||
|
"uninstall": "0.0.0",
|
||||||
|
"v-chart": "^1.0.0",
|
||||||
|
"vue": "^2.7.16",
|
||||||
|
"vue-codemirror": "^4.0.6",
|
||||||
|
"vue-color": "^2.8.1",
|
||||||
|
"vue-drag-resize": "^1.5.4",
|
||||||
|
"vue-echarts": "^6.6.1",
|
||||||
|
"vue-json-editor": "^1.4.3",
|
||||||
|
"vue-router": "^3.5.4",
|
||||||
|
"vue-ruler-tool": "^1.2.4",
|
||||||
|
"vue-superslide": "^0.1.1",
|
||||||
|
"vuedraggable": "^2.24.1",
|
||||||
|
"vuex": "^3.6.2",
|
||||||
|
"xlsx": "^0.18.5"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"autoprefixer": "8.5.0",
|
||||||
|
"babel-core": "6.26.0",
|
||||||
|
"babel-helper-vue-jsx-merge-props": "2.0.3",
|
||||||
|
"babel-loader": "7.1.5",
|
||||||
|
"babel-plugin-component": "^1.1.1",
|
||||||
|
"babel-plugin-syntax-jsx": "6.18.0",
|
||||||
|
"babel-plugin-transform-runtime": "6.23.0",
|
||||||
|
"babel-plugin-transform-vue-jsx": "3.7.0",
|
||||||
|
"babel-preset-env": "1.7.0",
|
||||||
|
"babel-preset-stage-2": "6.24.1",
|
||||||
|
"chalk": "2.4.1",
|
||||||
|
"copy-webpack-plugin": "4.5.2",
|
||||||
|
"cross-env": "^5.2.0",
|
||||||
|
"css-loader": "1.0.0",
|
||||||
|
"eventsource-polyfill": "0.9.6",
|
||||||
|
"file-loader": "1.1.11",
|
||||||
|
"friendly-errors-webpack-plugin": "1.7.0",
|
||||||
|
"html-webpack-plugin": "4.0.0-alpha",
|
||||||
|
"js-md5": "^0.7.3",
|
||||||
|
"mini-css-extract-plugin": "0.4.1",
|
||||||
|
"monaco-editor-webpack-plugin": "^4.1.1",
|
||||||
|
"node-notifier": "5.2.1",
|
||||||
|
"optimize-css-assets-webpack-plugin": "5.0.0",
|
||||||
|
"ora": "3.0.0",
|
||||||
|
"path-to-regexp": "2.4.0",
|
||||||
|
"portfinder": "1.0.16",
|
||||||
|
"postcss-import": "12.0.0",
|
||||||
|
"postcss-loader": "2.1.6",
|
||||||
|
"postcss-url": "7.3.2",
|
||||||
|
"rimraf": "2.6.2",
|
||||||
|
"sass": "^1.79.3",
|
||||||
|
"sass-loader": "^10.5.2",
|
||||||
|
"script-ext-html-webpack-plugin": "2.0.1",
|
||||||
|
"semver": "7.3.7",
|
||||||
|
"shelljs": "0.8.2",
|
||||||
|
"svg-sprite-loader": "6.0.0",
|
||||||
|
"svgo": "2.0.0",
|
||||||
|
"uglifyjs-webpack-plugin": "1.2.7",
|
||||||
|
"url-loader": "4.0.0",
|
||||||
|
"vue-loader": "^15.10.2",
|
||||||
|
"vue-style-loader": "4.1.2",
|
||||||
|
"vue-template-compiler": "2.6.11",
|
||||||
|
"webpack": "4.36.0",
|
||||||
|
"webpack-bundle-analyzer": "4.0.0",
|
||||||
|
"webpack-cli": "3.3.10",
|
||||||
|
"webpack-dev-server": "3.3.0",
|
||||||
|
"webpack-merge": "4.1.4"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 6.0.0",
|
||||||
|
"npm": ">= 3.0.0"
|
||||||
|
},
|
||||||
|
"browserslist": [
|
||||||
|
"> 1%",
|
||||||
|
"last 2 versions",
|
||||||
|
"not ie <= 8"
|
||||||
|
]
|
||||||
|
}
|
||||||
49
src/App.vue
Normal file
49
src/App.vue
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
<template>
|
||||||
|
<div id="app">
|
||||||
|
<router-view v-if="isRouterAlive" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import "@/assets/iconfont/iconfont.css";
|
||||||
|
import "@/assets/iconfont2/iconfont.css";
|
||||||
|
import { initDictToLocalstorage } from "@/api/dict-data";
|
||||||
|
export default {
|
||||||
|
name: "App",
|
||||||
|
provide() {
|
||||||
|
return {
|
||||||
|
reload: this.reload
|
||||||
|
};
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
isRouterAlive: false
|
||||||
|
};
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
$route(to, form) {
|
||||||
|
if (to.path == "/login") {
|
||||||
|
this.queryDictName();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {},
|
||||||
|
created() {
|
||||||
|
this.queryDictName();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
queryDictName() {
|
||||||
|
// 初始化数据字典到浏览器本地缓存
|
||||||
|
initDictToLocalstorage(() => {
|
||||||
|
this.isRouterAlive = true;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
reload() {
|
||||||
|
this.isRouterAlive = false;
|
||||||
|
this.$nextTick(function() {
|
||||||
|
this.isRouterAlive = true;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
85
src/api/LdReport.js
Normal file
85
src/api/LdReport.js
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
import {getShareToken, getToken} from "@/utils/auth";
|
||||||
|
import axios from "axios";
|
||||||
|
|
||||||
|
// 设计报表
|
||||||
|
export function design(data) {
|
||||||
|
return request({
|
||||||
|
url: 'report/design',
|
||||||
|
method: 'post',
|
||||||
|
data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 预览报表,渲染数据
|
||||||
|
export function preview(data) {
|
||||||
|
return request({
|
||||||
|
url: 'reportExcel/preview',
|
||||||
|
method: 'post',
|
||||||
|
headers: { 'Share-Token': getShareToken(), 'Authorization': getToken() },
|
||||||
|
data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 导出报表
|
||||||
|
export function exportExcel(data) {
|
||||||
|
/* return request({
|
||||||
|
url: 'reportExcel/exportExcel',
|
||||||
|
method: 'post',
|
||||||
|
data,
|
||||||
|
})*/
|
||||||
|
return new Promise((resolve) =>{
|
||||||
|
axios({
|
||||||
|
method:'post',
|
||||||
|
url: process.env.BASE_API + '/reportExcel/exportExcel',
|
||||||
|
//headers: { 'Authorization': getToken() },
|
||||||
|
data,
|
||||||
|
responseType:'blob'
|
||||||
|
}).then(res =>{
|
||||||
|
resolve(res.data);
|
||||||
|
}).catch(err =>{
|
||||||
|
resolve('error');
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 导出报表
|
||||||
|
export function exportPdf(data) {
|
||||||
|
return request({
|
||||||
|
url: 'reportExcel/exportPdf',
|
||||||
|
method: 'post',
|
||||||
|
data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取所有数据集
|
||||||
|
export function queryAllDataSet() {
|
||||||
|
return request({
|
||||||
|
url: 'dataSet/queryAllDataSet',
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取对应数据集的列集合
|
||||||
|
export function detail(data) {
|
||||||
|
return request({
|
||||||
|
url: 'dataSet/detailBysetId/' + data,
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取对应数据集的列集合
|
||||||
|
export function detailBysetCode(data) {
|
||||||
|
return request({
|
||||||
|
url: 'dataSet/detailBysetCode/' + data,
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 根据reportCode获取报表表格详情
|
||||||
|
export function detailByReportCode(data) {
|
||||||
|
return request({
|
||||||
|
url: 'reportExcel/detailByReportCode/' + data,
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
}
|
||||||
42
src/api/accessAuthority.js
Normal file
42
src/api/accessAuthority.js
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
export function accessAuthorityList(params) {
|
||||||
|
return request({
|
||||||
|
url: 'accessAuthority/pageList',
|
||||||
|
method: 'GET',
|
||||||
|
params,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function accessAuthorityAdd(data) {
|
||||||
|
return request({
|
||||||
|
url: 'accessAuthority',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function accessAuthorityDeleteBatch(data) {
|
||||||
|
return request({
|
||||||
|
url: 'accessAuthority/delete/batch',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function accessAuthorityUpdate(data) {
|
||||||
|
return request({
|
||||||
|
url: 'accessAuthority',
|
||||||
|
method: 'put', data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function accessAuthorityDetail(data) {
|
||||||
|
return request({
|
||||||
|
url: 'accessAuthority/' + data.id,
|
||||||
|
method: 'get',
|
||||||
|
params: { accessKey: data.accessKey }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export default { accessAuthorityList, accessAuthorityAdd, accessAuthorityDeleteBatch, accessAuthorityUpdate, accessAuthorityDetail }
|
||||||
58
src/api/accessRole.js
Normal file
58
src/api/accessRole.js
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
export function accessRoleList (params) {
|
||||||
|
return request({
|
||||||
|
url: 'accessRole/pageList',
|
||||||
|
method: 'GET',
|
||||||
|
params,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function accessRoleAdd (data) {
|
||||||
|
return request({
|
||||||
|
url: 'accessRole',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function accessRoleDeleteBatch (data) {
|
||||||
|
return request({
|
||||||
|
url: 'accessRole/delete/batch',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function accessRoleUpdate (data) {
|
||||||
|
return request({
|
||||||
|
url: 'accessRole',
|
||||||
|
method: 'put', data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function accessRoleDetail (data) {
|
||||||
|
return request({
|
||||||
|
url: 'accessRole/' + data.id,
|
||||||
|
method: 'get',
|
||||||
|
params: { accessKey: data.accessKey }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function accessRoleAuthorityTree (roleCode) {
|
||||||
|
return request({
|
||||||
|
url: 'accessRole/authorityTree/' + roleCode,
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function saveAuthorityTree (data) {
|
||||||
|
return request({
|
||||||
|
url: 'accessRole/saveAuthorityTree',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export default { accessRoleList, accessRoleAdd, accessRoleDeleteBatch, accessRoleUpdate, accessRoleDetail, accessRoleAuthorityTree, saveAuthorityTree }
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user