20200407-lc-1
This commit is contained in:
parent
055d9d4340
commit
96cc622cfd
@ -1,66 +1,60 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="dashboard-editor-container">
|
<div class="dashboard-editor-container">
|
||||||
|
<el-row :gutter="32">
|
||||||
<el-row :gutter="32">
|
<el-col :xs="24" :sm="24" :lg="8">
|
||||||
<el-col :xs="24" :sm="24" :lg="8">
|
<div class="chart-wrapper">
|
||||||
<div class="chart-wrapper">
|
<raddar-chart />
|
||||||
<raddar-chart />
|
</div>
|
||||||
</div>
|
</el-col>
|
||||||
</el-col>
|
<el-col :xs="24" :sm="24" :lg="8">
|
||||||
<el-col :xs="24" :sm="24" :lg="8">
|
<div class="chart-wrapper">
|
||||||
<div class="chart-wrapper">
|
<pie-chart />
|
||||||
<pie-chart />
|
</div>
|
||||||
</div>
|
</el-col>
|
||||||
</el-col>
|
<el-col :xs="24" :sm="24" :lg="8">
|
||||||
<el-col :xs="24" :sm="24" :lg="8">
|
<div class="chart-wrapper">
|
||||||
<div class="chart-wrapper">
|
<bar-chart />
|
||||||
<bar-chart />
|
</div>
|
||||||
</div>
|
</el-col>
|
||||||
</el-col>
|
</el-row>
|
||||||
</el-row>
|
</div>
|
||||||
|
</template>
|
||||||
</div>
|
|
||||||
</template>
|
<script>
|
||||||
|
import RaddarChart from "./dashboard/RaddarChart";
|
||||||
<script>
|
import PieChart from "./dashboard/PieChart";
|
||||||
import RaddarChart from './dashboard/RaddarChart'
|
import BarChart from "./dashboard/BarChart";
|
||||||
import PieChart from './dashboard/PieChart'
|
|
||||||
import BarChart from './dashboard/BarChart'
|
export default {
|
||||||
|
name: "Index",
|
||||||
export default {
|
components: {
|
||||||
name: 'Index',
|
RaddarChart,
|
||||||
components: {
|
PieChart,
|
||||||
RaddarChart,
|
BarChart
|
||||||
PieChart,
|
},
|
||||||
BarChart
|
data() {
|
||||||
},
|
return {};
|
||||||
data() {
|
},
|
||||||
return {
|
methods: {}
|
||||||
|
};
|
||||||
}
|
</script>
|
||||||
},
|
|
||||||
methods: {
|
<style lang="scss" scoped>
|
||||||
|
.dashboard-editor-container {
|
||||||
}
|
padding: 32px;
|
||||||
}
|
background-color: rgb(240, 242, 245);
|
||||||
</script>
|
position: relative;
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
.chart-wrapper {
|
||||||
.dashboard-editor-container {
|
background: #fff;
|
||||||
padding: 32px;
|
padding: 16px 16px 0;
|
||||||
background-color: rgb(240, 242, 245);
|
margin-bottom: 32px;
|
||||||
position: relative;
|
}
|
||||||
|
}
|
||||||
.chart-wrapper {
|
|
||||||
background: #fff;
|
@media (max-width: 1024px) {
|
||||||
padding: 16px 16px 0;
|
.chart-wrapper {
|
||||||
margin-bottom: 32px;
|
padding: 8px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
</style>
|
||||||
@media (max-width:1024px) {
|
|
||||||
.chart-wrapper {
|
|
||||||
padding: 8px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
@ -1,130 +1,130 @@
|
|||||||
'use strict'
|
'use strict'
|
||||||
const path = require('path')
|
const path = require('path')
|
||||||
const defaultSettings = require('./src/settings.js')
|
const defaultSettings = require('./src/settings.js')
|
||||||
|
|
||||||
function resolve(dir) {
|
function resolve(dir) {
|
||||||
return path.join(__dirname, dir)
|
return path.join(__dirname, dir)
|
||||||
}
|
}
|
||||||
|
|
||||||
const name = defaultSettings.title || '本一智慧平台管理系统' // 标题
|
const name = defaultSettings.title || '本一智慧平台管理系统' // 标题
|
||||||
|
|
||||||
const port = process.env.port || process.env.npm_config_port || 80 // 端口
|
const port = process.env.port || process.env.npm_config_port || 80 // 端口
|
||||||
|
|
||||||
// vue.config.js 配置说明
|
// vue.config.js 配置说明
|
||||||
//官方vue.config.js 参考文档 https://cli.vuejs.org/zh/config/#css-loaderoptions
|
//官方vue.config.js 参考文档 https://cli.vuejs.org/zh/config/#css-loaderoptions
|
||||||
// 这里只列一部分,具体配置参考文档
|
// 这里只列一部分,具体配置参考文档
|
||||||
module.exports = {
|
module.exports = {
|
||||||
// 部署生产环境和开发环境下的URL。
|
// 部署生产环境和开发环境下的URL。
|
||||||
// 默认情况下,Vue CLI 会假设你的应用是被部署在一个域名的根路径上
|
// 默认情况下,Vue CLI 会假设你的应用是被部署在一个域名的根路径上
|
||||||
// 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。
|
// 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。
|
||||||
publicPath: process.env.NODE_ENV === "production" ? "/" : "/",
|
publicPath: process.env.NODE_ENV === "production" ? "/" : "/",
|
||||||
// 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist)
|
// 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist)
|
||||||
outputDir: 'dist',
|
outputDir: 'dist',
|
||||||
// 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下)
|
// 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下)
|
||||||
assetsDir: 'static',
|
assetsDir: 'static',
|
||||||
// 是否开启eslint保存检测,有效值:ture | false | 'error'
|
// 是否开启eslint保存检测,有效值:ture | false | 'error'
|
||||||
lintOnSave: process.env.NODE_ENV === 'development',
|
lintOnSave: process.env.NODE_ENV === 'development',
|
||||||
// 如果你不需要生产环境的 source map,可以将其设置为 false 以加速生产环境构建。
|
// 如果你不需要生产环境的 source map,可以将其设置为 false 以加速生产环境构建。
|
||||||
productionSourceMap: false,
|
productionSourceMap: false,
|
||||||
// webpack-dev-server 相关配置
|
// webpack-dev-server 相关配置
|
||||||
devServer: {
|
devServer: {
|
||||||
host: '127.0.0.1',
|
host: '127.0.0.1',
|
||||||
port: port,
|
port: port,
|
||||||
proxy: {
|
proxy: {
|
||||||
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
||||||
[process.env.VUE_APP_BASE_API]: {
|
[process.env.VUE_APP_BASE_API]: {
|
||||||
target: `http://localhost:8080`,
|
target: `http://localhost:8080`,
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
pathRewrite: {
|
pathRewrite: {
|
||||||
['^' + process.env.VUE_APP_BASE_API]: ''
|
['^' + process.env.VUE_APP_BASE_API]: ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
disableHostCheck: true
|
disableHostCheck: true
|
||||||
},
|
},
|
||||||
configureWebpack: {
|
configureWebpack: {
|
||||||
name: name,
|
name: name,
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
'@': resolve('src')
|
'@': resolve('src')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
chainWebpack(config) {
|
chainWebpack(config) {
|
||||||
config.plugins.delete('preload') // TODO: need test
|
config.plugins.delete('preload') // TODO: need test
|
||||||
config.plugins.delete('prefetch') // TODO: need test
|
config.plugins.delete('prefetch') // TODO: need test
|
||||||
|
|
||||||
// set svg-sprite-loader
|
// set svg-sprite-loader
|
||||||
config.module
|
config.module
|
||||||
.rule('svg')
|
.rule('svg')
|
||||||
.exclude.add(resolve('src/assets/icons'))
|
.exclude.add(resolve('src/assets/icons'))
|
||||||
.end()
|
.end()
|
||||||
config.module
|
config.module
|
||||||
.rule('icons')
|
.rule('icons')
|
||||||
.test(/\.svg$/)
|
.test(/\.svg$/)
|
||||||
.include.add(resolve('src/assets/icons'))
|
.include.add(resolve('src/assets/icons'))
|
||||||
.end()
|
.end()
|
||||||
.use('svg-sprite-loader')
|
.use('svg-sprite-loader')
|
||||||
.loader('svg-sprite-loader')
|
.loader('svg-sprite-loader')
|
||||||
.options({
|
.options({
|
||||||
symbolId: 'icon-[name]'
|
symbolId: 'icon-[name]'
|
||||||
})
|
})
|
||||||
.end()
|
.end()
|
||||||
|
|
||||||
// set preserveWhitespace
|
// set preserveWhitespace
|
||||||
config.module
|
config.module
|
||||||
.rule('vue')
|
.rule('vue')
|
||||||
.use('vue-loader')
|
.use('vue-loader')
|
||||||
.loader('vue-loader')
|
.loader('vue-loader')
|
||||||
.tap(options => {
|
.tap(options => {
|
||||||
options.compilerOptions.preserveWhitespace = true
|
options.compilerOptions.preserveWhitespace = true
|
||||||
return options
|
return options
|
||||||
})
|
})
|
||||||
.end()
|
.end()
|
||||||
|
|
||||||
config
|
config
|
||||||
// https://webpack.js.org/configuration/devtool/#development
|
// https://webpack.js.org/configuration/devtool/#development
|
||||||
.when(process.env.NODE_ENV === 'development',
|
.when(process.env.NODE_ENV === 'development',
|
||||||
config => config.devtool('cheap-source-map')
|
config => config.devtool('cheap-source-map')
|
||||||
)
|
)
|
||||||
|
|
||||||
config
|
config
|
||||||
.when(process.env.NODE_ENV !== 'development',
|
.when(process.env.NODE_ENV !== 'development',
|
||||||
config => {
|
config => {
|
||||||
config
|
config
|
||||||
.plugin('ScriptExtHtmlWebpackPlugin')
|
.plugin('ScriptExtHtmlWebpackPlugin')
|
||||||
.after('html')
|
.after('html')
|
||||||
.use('script-ext-html-webpack-plugin', [{
|
.use('script-ext-html-webpack-plugin', [{
|
||||||
// `runtime` must same as runtimeChunk name. default is `runtime`
|
// `runtime` must same as runtimeChunk name. default is `runtime`
|
||||||
inline: /runtime\..*\.js$/
|
inline: /runtime\..*\.js$/
|
||||||
}])
|
}])
|
||||||
.end()
|
.end()
|
||||||
config
|
config
|
||||||
.optimization.splitChunks({
|
.optimization.splitChunks({
|
||||||
chunks: 'all',
|
chunks: 'all',
|
||||||
cacheGroups: {
|
cacheGroups: {
|
||||||
libs: {
|
libs: {
|
||||||
name: 'chunk-libs',
|
name: 'chunk-libs',
|
||||||
test: /[\\/]node_modules[\\/]/,
|
test: /[\\/]node_modules[\\/]/,
|
||||||
priority: 10,
|
priority: 10,
|
||||||
chunks: 'initial' // only package third parties that are initially dependent
|
chunks: 'initial' // only package third parties that are initially dependent
|
||||||
},
|
},
|
||||||
elementUI: {
|
elementUI: {
|
||||||
name: 'chunk-elementUI', // split elementUI into a single package
|
name: 'chunk-elementUI', // split elementUI into a single package
|
||||||
priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app
|
priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app
|
||||||
test: /[\\/]node_modules[\\/]_?element-ui(.*)/ // in order to adapt to cnpm
|
test: /[\\/]node_modules[\\/]_?element-ui(.*)/ // in order to adapt to cnpm
|
||||||
},
|
},
|
||||||
commons: {
|
commons: {
|
||||||
name: 'chunk-commons',
|
name: 'chunk-commons',
|
||||||
test: resolve('src/components'), // can customize your rules
|
test: resolve('src/components'), // can customize your rules
|
||||||
minChunks: 3, // minimum common number
|
minChunks: 3, // minimum common number
|
||||||
priority: 5,
|
priority: 5,
|
||||||
reuseExistingChunk: true
|
reuseExistingChunk: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
config.optimization.runtimeChunk('single')
|
config.optimization.runtimeChunk('single')
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,21 +1,23 @@
|
|||||||
package com.ruoyi;
|
package com.ruoyi;
|
||||||
|
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 启动程序
|
* 启动程序
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
*/
|
*/
|
||||||
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
|
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
|
||||||
public class RuoYiApplication
|
public class RuoYiApplication
|
||||||
{
|
{
|
||||||
public static void main(String[] args)
|
public static void main(String[] args)
|
||||||
{
|
{
|
||||||
System.setProperty("spring.devtools.restart.enabled", "false");
|
System.setProperty("spring.devtools.restart.enabled", "false");
|
||||||
SpringApplication.run(RuoYiApplication.class, args);
|
SpringApplication.run(RuoYiApplication.class, args);
|
||||||
System.out.println("BenYi Startup success");
|
System.out.println("-------^&^-------" +
|
||||||
}
|
"BenYi Startup success" +
|
||||||
}
|
"-------^&^-------");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user