一周随笔

这周主要复习了一下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>

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值