这周主要复习了一下springboot框架,下周开始后端的编写
持久层 > 业务层 > 控制器 > 前端页面
从基础的用户登录/角色管理/权限管理开始
1.echarts图表默认展示最新5条数据
echarts图表的数据是以数组的进行存储
var a=[]
var b=[]
所以我的方法时判断数组长度,当数组长度大于5时取后5条数据。
if (a.length>5){
a=a.slice(-5)
}
if (b.length>5) {
b=b.slice(-5)
}
2.使用element-Container布局容器所造成的路由问题
使用嵌套路由解决问题
import Vue from 'vue'
import VueRouter from 'vue-router'
//1.安装插件
Vue.use(VueRouter)
//2.创建对象
export default new VueRouter({
routes: [
{
path:'/',
redirect: '/datashow'
},
{
path: '/',
component:()=>import('@/components/common/Home'),
meta: { title: '自述文件' },
children:[
{
path:'/datashow',
name: '数据展示',
component:()=>import('@/components/page/Datashow')
},
{
path:'/eqptshow',
name:'设备列表',
component:()=>import('@/components/page/Eqptshow')
},
{
path:'/customershow',
name:'客户展示',
component:()=>import('@/components/page/Customershow')
},
{
path:'/dataanalysis',
name:'数据分析',
component:()=>import('@/components/page/Dataanalysis')
},
{
path:'/eqptcalibration',
name:'设备标定',
component:()=>import('@/components/page/Eqptcalibration')
},
{
path:'/eqptconnect',
name:'设备连接',
component:()=>import('@/components/page/Eqptconnect')
},
{
path:'/eqptexception',
name:'设备异常',
component:()=>import('@/components/page/Eqptexception')
},
{
path:'/frequencyshow',
name:'日活频次',
component:()=>import('@/components/page/Frequencyshow')
},
{
path:'/uploadupdate',
name:'上传更新',
component:()=>import('@/components/page/Uploadupdate')
}
]
},
{
path:'/login',
name: '登陆',
component:()=>import('@/components/page/Login')
},
]
});
3.新建maven项目时出现 web.xml is missing and is set to true
原因:没有生成src/main/webapp/WEB_INF/web.xml相关目录路径
解决方法:
1.右键点击项目名--》Java EE Tools-->Generate Deployment Descriptor Stub,这样就能解决错误了
2.在pom.xml中加入插件:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.6</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
</plugins>
</build>