Browse Source

报表前端

master
zhoukaihong@idcos.com 4 months ago
commit
9256d12b7f
  1. 12
      .babelrc
  2. 14
      .editorconfig
  3. 10
      .postcssrc.js
  4. 4
      Dockerfile
  5. 22
      README.md
  6. 45
      build/build.js
  7. 64
      build/check-versions.js
  8. BIN
      build/logo.png
  9. 108
      build/utils.js
  10. 11
      build/vue-loader.conf.js
  11. 100
      build/webpack.base.conf.js
  12. 100
      build/webpack.dev.conf.js
  13. 187
      build/webpack.prod.conf.js
  14. 9
      config/dev.env.js
  15. 86
      config/index.js
  16. 5
      config/prod.env.js
  17. 8
      config/test.env.js
  18. 24
      index.html
  19. 46
      node_modules_echarts_need/map/js/china-contour.js
  20. 46
      node_modules_echarts_need/map/js/china.js
  21. 46
      node_modules_echarts_need/map/js/province/anhui.js
  22. 46
      node_modules_echarts_need/map/js/province/aomen.js
  23. 46
      node_modules_echarts_need/map/js/province/beijing.js
  24. 20
      node_modules_echarts_need/map/js/province/chongqing.js
  25. 46
      node_modules_echarts_need/map/js/province/fujian.js
  26. 46
      node_modules_echarts_need/map/js/province/gansu.js
  27. 46
      node_modules_echarts_need/map/js/province/guangdong.js
  28. 46
      node_modules_echarts_need/map/js/province/guangxi.js
  29. 46
      node_modules_echarts_need/map/js/province/guizhou.js
  30. 46
      node_modules_echarts_need/map/js/province/hainan.js
  31. 46
      node_modules_echarts_need/map/js/province/hebei.js
  32. 46
      node_modules_echarts_need/map/js/province/heilongjiang.js
  33. 46
      node_modules_echarts_need/map/js/province/henan.js
  34. 46
      node_modules_echarts_need/map/js/province/hubei.js
  35. 46
      node_modules_echarts_need/map/js/province/hunan.js
  36. 46
      node_modules_echarts_need/map/js/province/jiangsu.js
  37. 46
      node_modules_echarts_need/map/js/province/jiangxi.js
  38. 46
      node_modules_echarts_need/map/js/province/jilin.js
  39. 46
      node_modules_echarts_need/map/js/province/liaoning.js
  40. 46
      node_modules_echarts_need/map/js/province/neimenggu.js
  41. 46
      node_modules_echarts_need/map/js/province/ningxia.js
  42. 46
      node_modules_echarts_need/map/js/province/qinghai.js
  43. 46
      node_modules_echarts_need/map/js/province/shandong.js
  44. 20
      node_modules_echarts_need/map/js/province/shanghai.js
  45. 46
      node_modules_echarts_need/map/js/province/shanxi.js
  46. 46
      node_modules_echarts_need/map/js/province/shanxi1.js
  47. 46
      node_modules_echarts_need/map/js/province/sichuan.js
  48. 20
      node_modules_echarts_need/map/js/province/taiwan.js
  49. 19
      node_modules_echarts_need/map/js/province/tianjin.js
  50. 46
      node_modules_echarts_need/map/js/province/xianggang.js
  51. 20
      node_modules_echarts_need/map/js/province/xinjiang.js
  52. 20
      node_modules_echarts_need/map/js/province/xizang.js
  53. 46
      node_modules_echarts_need/map/js/province/yunnan.js
  54. 46
      node_modules_echarts_need/map/js/province/zhejiang.js
  55. 20
      node_modules_echarts_need/map/js/world.js
  56. 1
      node_modules_echarts_need/map/json/china-cities.json
  57. 1
      node_modules_echarts_need/map/json/china-contour.json
  58. 1
      node_modules_echarts_need/map/json/china.json
  59. 1
      node_modules_echarts_need/map/json/province/anhui.json
  60. 1
      node_modules_echarts_need/map/json/province/aomen.json
  61. 1
      node_modules_echarts_need/map/json/province/beijing.json
  62. 1
      node_modules_echarts_need/map/json/province/chongqing.json
  63. 1
      node_modules_echarts_need/map/json/province/fujian.json
  64. 1
      node_modules_echarts_need/map/json/province/gansu.json
  65. 1
      node_modules_echarts_need/map/json/province/guangdong.json
  66. 1
      node_modules_echarts_need/map/json/province/guangxi.json
  67. 1
      node_modules_echarts_need/map/json/province/guizhou.json
  68. 1
      node_modules_echarts_need/map/json/province/hainan.json
  69. 1
      node_modules_echarts_need/map/json/province/hebei.json
  70. 1
      node_modules_echarts_need/map/json/province/heilongjiang.json
  71. 1
      node_modules_echarts_need/map/json/province/henan.json
  72. 1
      node_modules_echarts_need/map/json/province/hubei.json
  73. 1
      node_modules_echarts_need/map/json/province/hunan.json
  74. 1
      node_modules_echarts_need/map/json/province/jiangsu.json
  75. 1
      node_modules_echarts_need/map/json/province/jiangxi.json
  76. 1
      node_modules_echarts_need/map/json/province/jilin.json
  77. 1
      node_modules_echarts_need/map/json/province/liaoning.json
  78. 1
      node_modules_echarts_need/map/json/province/neimenggu.json
  79. 1
      node_modules_echarts_need/map/json/province/ningxia.json
  80. 1
      node_modules_echarts_need/map/json/province/qinghai.json
  81. 1
      node_modules_echarts_need/map/json/province/shandong.json
  82. 1
      node_modules_echarts_need/map/json/province/shanghai.json
  83. 1
      node_modules_echarts_need/map/json/province/shanxi.json
  84. 1
      node_modules_echarts_need/map/json/province/shanxi1.json
  85. 1
      node_modules_echarts_need/map/json/province/sichuan.json
  86. 1
      node_modules_echarts_need/map/json/province/taiwan.json
  87. 1
      node_modules_echarts_need/map/json/province/tianjin.json
  88. 1
      node_modules_echarts_need/map/json/province/xianggang.json
  89. 1
      node_modules_echarts_need/map/json/province/xinjiang.json
  90. 1
      node_modules_echarts_need/map/json/province/xizang.json
  91. 1
      node_modules_echarts_need/map/json/province/yunnan.json
  92. 1
      node_modules_echarts_need/map/json/province/zhejiang.json
  93. 1
      node_modules_echarts_need/map/json/world.json
  94. 8
      node_modules_echarts_need/readme
  95. 109
      package.json
  96. 49
      src/App.vue
  97. 85
      src/api/GaeaReport.js
  98. 42
      src/api/accessAuthority.js
  99. 58
      src/api/accessRole.js
  100. 65
      src/api/accessUser.js

12
.babelrc

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

14
.editorconfig

@ -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

10
.postcssrc.js

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

4
Dockerfile

@ -0,0 +1,4 @@
# Dockerfile
FROM nginx:alpine
COPY dist/ /usr/share/nginx/html/
EXPOSE 80

22
README.md

@ -0,0 +1,22 @@
### 本地运行
```
npm install
npm run dev
```
### 打包
```
npm install
npm run build:prod
编译结果:report/report-ui/dist目录
```
### 前端技术
- [npm](https://www.npmjs.com/):node.js的包管理工具,用于统一管理我们前端项目中需要用到的包、插件、工具、命令等,便于开发和维护。
- [webpack](https://webpack.docschina.org/):用于现代 JavaScript 应用程序的_静态模块打包工具
- [ES6](https://es6.ruanyifeng.com/):Javascript的新版本,ECMAScript6的简称。利用ES6我们可以简化我们的JS代码,同时利用其提供的强大功能来快速实现JS逻辑。
- [vue-cli](https://cli.vuejs.org/):Vue的脚手架工具,用于自动生成Vue项目的目录及文件。
- [vue-router](https://router.vuejs.org/): Vue提供的前端路由工具,利用其我们实现页面的路由控制,局部刷新及按需加载,构建单页应用,实现前后端分离。
- [element-ui](https://element.eleme.cn/#/zh-CN):基于MVVM框架Vue开源出来的一套前端ui组件。
- [avue](https://www.avuejs.com/): 用该组件包裹后可以变成拖拽组件,采用相对于父类绝对定位;用键盘的上下左右也可以控制移动
- [vue-echarts](https://www.npmjs.com/package/vue-echarts/): vue-echarts是封装后的vue插件,基于 ECharts v4.0.1+ 开发
- [vue-superslide](https://www.npmjs.com/package/vue-super-slider/): Vue-SuperSlide(Github) 是 SuperSlide 的 Vue 封装版本
- [vuedraggable](https://github.com/SortableJS/Vue.Draggable/): 是一款基于Sortable.js实现的vue拖拽插件。

45
build/build.js

@ -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

@ -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

After

Width: 200  |  Height: 200  |  Size: 6.7 KiB

108
build/utils.js

@ -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

@ -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

@ -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

@ -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

@ -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: true, //去掉debugger
drop_console: 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

@ -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://39.98.128.49:9095"'
//BASE_API: '"http://10.108.26.197:9095"'
})

86
config/index.js

@ -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

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

8
config/test.env.js

@ -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

@ -0,0 +1,24 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>Report</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
File diff suppressed because it is too large
View File

46
node_modules_echarts_need/map/js/china.js
File diff suppressed because it is too large
View File

46
node_modules_echarts_need/map/js/province/anhui.js
File diff suppressed because it is too large
View File

46
node_modules_echarts_need/map/js/province/aomen.js

@ -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
File diff suppressed because it is too large
View File

20
node_modules_echarts_need/map/js/province/chongqing.js
File diff suppressed because it is too large
View File

46
node_modules_echarts_need/map/js/province/fujian.js
File diff suppressed because it is too large
View File

46
node_modules_echarts_need/map/js/province/gansu.js
File diff suppressed because it is too large
View File

46
node_modules_echarts_need/map/js/province/guangdong.js
File diff suppressed because it is too large
View File

46
node_modules_echarts_need/map/js/province/guangxi.js
File diff suppressed because it is too large
View File

46
node_modules_echarts_need/map/js/province/guizhou.js
File diff suppressed because it is too large
View File

46
node_modules_echarts_need/map/js/province/hainan.js
File diff suppressed because it is too large
View File

46
node_modules_echarts_need/map/js/province/hebei.js
File diff suppressed because it is too large
View File

46
node_modules_echarts_need/map/js/province/heilongjiang.js
File diff suppressed because it is too large
View File

46
node_modules_echarts_need/map/js/province/henan.js
File diff suppressed because it is too large
View File

46
node_modules_echarts_need/map/js/province/hubei.js
File diff suppressed because it is too large
View File

46
node_modules_echarts_need/map/js/province/hunan.js
File diff suppressed because it is too large
View File

46
node_modules_echarts_need/map/js/province/jiangsu.js
File diff suppressed because it is too large
View File

46
node_modules_echarts_need/map/js/province/jiangxi.js
File diff suppressed because it is too large
View File

46
node_modules_echarts_need/map/js/province/jilin.js
File diff suppressed because it is too large
View File

46
node_modules_echarts_need/map/js/province/liaoning.js
File diff suppressed because it is too large
View File

46
node_modules_echarts_need/map/js/province/neimenggu.js
File diff suppressed because it is too large
View File

46
node_modules_echarts_need/map/js/province/ningxia.js
File diff suppressed because it is too large
View File

46
node_modules_echarts_need/map/js/province/qinghai.js
File diff suppressed because it is too large
View File

46
node_modules_echarts_need/map/js/province/shandong.js
File diff suppressed because it is too large
View File

20
node_modules_echarts_need/map/js/province/shanghai.js
File diff suppressed because it is too large
View File

46
node_modules_echarts_need/map/js/province/shanxi.js
File diff suppressed because it is too large
View File

46
node_modules_echarts_need/map/js/province/shanxi1.js
File diff suppressed because it is too large
View File

46
node_modules_echarts_need/map/js/province/sichuan.js
File diff suppressed because it is too large
View File

20
node_modules_echarts_need/map/js/province/taiwan.js
File diff suppressed because it is too large
View File

19
node_modules_echarts_need/map/js/province/tianjin.js
File diff suppressed because it is too large
View File

46
node_modules_echarts_need/map/js/province/xianggang.js
File diff suppressed because it is too large
View File

20
node_modules_echarts_need/map/js/province/xinjiang.js
File diff suppressed because it is too large
View File

20
node_modules_echarts_need/map/js/province/xizang.js
File diff suppressed because it is too large
View File

46
node_modules_echarts_need/map/js/province/yunnan.js
File diff suppressed because it is too large
View File

46
node_modules_echarts_need/map/js/province/zhejiang.js
File diff suppressed because it is too large
View File

20
node_modules_echarts_need/map/js/world.js
File diff suppressed because it is too large
View File

1
node_modules_echarts_need/map/json/china-cities.json
File diff suppressed because it is too large
View File

1
node_modules_echarts_need/map/json/china-contour.json
File diff suppressed because it is too large
View File

1
node_modules_echarts_need/map/json/china.json
File diff suppressed because it is too large
View File

1
node_modules_echarts_need/map/json/province/anhui.json
File diff suppressed because it is too large
View File

1
node_modules_echarts_need/map/json/province/aomen.json

@ -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
File diff suppressed because it is too large
View File

1
node_modules_echarts_need/map/json/province/chongqing.json
File diff suppressed because it is too large
View File

1
node_modules_echarts_need/map/json/province/fujian.json
File diff suppressed because it is too large
View File

1
node_modules_echarts_need/map/json/province/gansu.json
File diff suppressed because it is too large
View File

1
node_modules_echarts_need/map/json/province/guangdong.json
File diff suppressed because it is too large
View File

1
node_modules_echarts_need/map/json/province/guangxi.json
File diff suppressed because it is too large
View File

1
node_modules_echarts_need/map/json/province/guizhou.json
File diff suppressed because it is too large
View File

1
node_modules_echarts_need/map/json/province/hainan.json
File diff suppressed because it is too large
View File

1
node_modules_echarts_need/map/json/province/hebei.json
File diff suppressed because it is too large
View File

1
node_modules_echarts_need/map/json/province/heilongjiang.json
File diff suppressed because it is too large
View File

1
node_modules_echarts_need/map/json/province/henan.json
File diff suppressed because it is too large
View File

1
node_modules_echarts_need/map/json/province/hubei.json
File diff suppressed because it is too large
View File

1
node_modules_echarts_need/map/json/province/hunan.json
File diff suppressed because it is too large
View File

1
node_modules_echarts_need/map/json/province/jiangsu.json
File diff suppressed because it is too large
View File

1
node_modules_echarts_need/map/json/province/jiangxi.json
File diff suppressed because it is too large
View File

1
node_modules_echarts_need/map/json/province/jilin.json
File diff suppressed because it is too large
View File

1
node_modules_echarts_need/map/json/province/liaoning.json
File diff suppressed because it is too large
View File

1
node_modules_echarts_need/map/json/province/neimenggu.json
File diff suppressed because it is too large
View File

1
node_modules_echarts_need/map/json/province/ningxia.json
File diff suppressed because it is too large
View File

1
node_modules_echarts_need/map/json/province/qinghai.json
File diff suppressed because it is too large
View File

1
node_modules_echarts_need/map/json/province/shandong.json
File diff suppressed because it is too large
View File

1
node_modules_echarts_need/map/json/province/shanghai.json
File diff suppressed because it is too large
View File

1
node_modules_echarts_need/map/json/province/shanxi.json
File diff suppressed because it is too large
View File

1
node_modules_echarts_need/map/json/province/shanxi1.json
File diff suppressed because it is too large
View File

1
node_modules_echarts_need/map/json/province/sichuan.json
File diff suppressed because it is too large
View File

1
node_modules_echarts_need/map/json/province/taiwan.json
File diff suppressed because it is too large
View File

1
node_modules_echarts_need/map/json/province/tianjin.json
File diff suppressed because it is too large
View File

1
node_modules_echarts_need/map/json/province/xianggang.json
File diff suppressed because it is too large
View File

1
node_modules_echarts_need/map/json/province/xinjiang.json
File diff suppressed because it is too large
View File

1
node_modules_echarts_need/map/json/province/xizang.json
File diff suppressed because it is too large
View File

1
node_modules_echarts_need/map/json/province/yunnan.json
File diff suppressed because it is too large
View File

1
node_modules_echarts_need/map/json/province/zhejiang.json
File diff suppressed because it is too large
View File

1
node_modules_echarts_need/map/json/world.json
File diff suppressed because it is too large
View File

8
node_modules_echarts_need/readme

@ -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

109
package.json

@ -0,0 +1,109 @@
{
"name": "report-ui",
"version": "1.7.1",
"description": "report-ui",
"author": "beliefteam",
"scripts": {
"dev": "cross-env NODE_OPTIONS=--openssl-legacy-provider webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
"start": "npm run dev",
"build": "cross-env NODE_ENV=production node build/build.js",
"build:dev": "cross-env NODE_ENV=development node build/build.js",
"build:test": "cross-env NODE_ENV=testing node build/build.js",
"build:prod": "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-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.1",
"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

@ -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/GaeaReport.js

@ -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

@ -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

@ -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 }

65
src/api/accessUser.js

@ -0,0 +1,65 @@
import request from '@/utils/request'
export function accessUserList (params) {
return request({
url: 'accessUser/pageList',
method: 'GET',
params,
})
}
export function accessUserAdd (data) {
return request({
url: 'accessUser',
method: 'post',
data
})
}
export function accessUserDeleteBatch (data) {
return request({
url: 'accessUser/delete/batch',
method: 'post',
data
})
}
export function accessUserUpdate (data) {
return request({
url: 'accessUser',
method: 'put', data,
})
}
export function accessUserDetail (data) {
return request({
url: 'accessUser/' + data.id,
method: 'get',
params: { accessKey: data.accessKey }
})
}
export function getRoleTree (loginName) {
return request({
url: 'accessUser/roleTree/' + loginName,
method: 'get',
})
}
export function saveRoleTree (data) {
return request({
url: 'accessUser/saveRoleTree',
method: 'post',
data
})
}
export function resetPassword (data) {
return request({
url: 'accessUser/resetPassword',
method: 'post',
data
})
}
export default { accessUserList, accessUserAdd, accessUserDeleteBatch, accessUserUpdate, accessUserDetail, getRoleTree, saveRoleTree, resetPassword }

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save