克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

xxl-job-vue

介绍

  • xxl-job前端分离的vue实现版本,基于vue2.0,ElementUI,axios
  • 对接最新的xxl-job v2.2及以上版本,低版本本人没有测试过
  • 个人觉得原版的页面虽然功能完善,但是界面不免有些不尽如人意(不够美观),因此才有了此项目

安装教程

  1. npm install --registry=https://registry.npm.taobao.org # 建议不要用cnpm 安装有各种诡异的bug 可以通过此种操作解决npm速度慢的问题
  2. npm run dev
  3. npm run build

使用说明

  • 本项目旨在学习vue相关知识,其中不免存在问题,欢迎广大dever指正

  • 由于兼容性问题,本项目无法完全支持原版的xxljob 需要做一些调整,具体如下:

    1. 支持异接口拦截响应,因为原拦截会发生302重定向,前端无法获取到状态码做页面跳转
    #PermissionInterceptor line45
    if (loginUser == null) {
      if (Objects.equals(xHeader,"XMLHttpRequest")){
        //ajax请求返回401状态码
        response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);
        return false;
      }
      response.setStatus(302);
      response.setHeader("location", request.getContextPath()+"/toLogin");
      return false;
    }
    
    
    1. 添加前端所需数据接口
      //IndexController
      @RequestMapping("/dashboardInfo")
      @ResponseBody
      public ReturnT<Map<String, Object>> dashboardInfo() {
        Map<String, Object> dashboardInfo = xxlJobService.dashboardInfo();
        return new ReturnT<>(dashboardInfo);
      }
    
MIT License Copyright (c) 2019 tang2992 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

xxl-job的vue版本 展开 收起
Java
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化