vue-element-ui 中 office文档数据的预览、打印、导出和echarts可视化功能

最近写的项目中有需要打印、导出、和可视化功能
写完后 我就把它们都简单的整合了一下
如果想支持博主的可以去积分下载 链接 => 点我
完整代码gitee下载:https://gitee.com/zz09/easy-admin-element.git

下载后执行

npm install

npm run serve

下面是效果图
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

部分代码

<template>
  <div class="box">
    <div class="header">
      <div class="h_logo" :style="!isCollapse ? 'width:200px' : 'width:64px'">
        <i v-if="isCollapse" class="el-icon-eleme"></i>
        <i v-else class="el-icon-platform-eleme">ZZ</i>
      </div>
      <div class="h_menu_btn">
        <el-button
          size="small"
          @click="isCollapse = !isCollapse"
          type="primary"
          :icon="isCollapse ? 'el-icon-s-unfold' : 'el-icon-s-fold'"
        ></el-button>
      </div>
      <div class="h_title">
        vue-element ui 简易后台管理系统
        <el-dropdown @command="out">
          <span class="el-dropdown-link">
            菜单<i class="el-icon-arrow-down el-icon--right"></i>
          </span>
          <el-dropdown-menu slot="dropdown">
            <el-dropdown-item command="1">设置</el-dropdown-item>
            <el-dropdown-item command="2" divided>退出</el-dropdown-item>
          </el-dropdown-menu>
        </el-dropdown>
      </div>
    </div>
    <div class="body">
      <div class="nav">
        <el-menu
          :unique-opened="true"
          :default-active="active"
          class="el-menu-vertical-demo"
          @open="handleOpen"
          background-color="#545c64"
          text-color="#fff"
          active-text-color="#ffd04b"
          @close="handleClose"
          :collapse="isCollapse"
          @select="handleSelect"
        >
          <el-menu-item index="首页">
            <i class="el-icon-s-home"></i>
            <span slot="title">首页</span>
          </el-menu-item>

          <el-submenu index="数据表格">
            <template slot="title">
              <i class="el-icon-menu"></i>
              <span slot="title">数据表格</span>
            </template>
            <el-menu-item-group index="数据表格">
              <el-menu-item index="使用说明" data-path="/index/page1"
                >使用说明</el-menu-item
              >
              <el-menu-item index="普通表格" data-path="/index/page2"
                >普通表格</el-menu-item
              >
              <el-menu-item index="文档预览" data-path="/index/page3"
                >文档预览</el-menu-item
              >
            </el-menu-item-group>
            <el-submenu index="打印/下载">
              <span slot="title">打印/下载</span>
              <el-menu-item index="打印/下载" data-path="/index/page4"
                >打印/下载</el-menu-item
              >
            </el-submenu>
          </el-submenu>
          <el-submenu index="可视化">
            <template slot="title">
              <i class="el-icon-s-data"></i>
              <span slot="title">可视化</span>
            </template>
            <el-menu-item-group index="可视化">
              <el-menu-item index="扇形图" data-path="/index/page5"
                >扇形图</el-menu-item
              >
              <el-menu-item index="条形图" data-path="/index/page6"
                >条形图</el-menu-item
              >
            </el-menu-item-group>
          </el-submenu>

          <el-menu-item index="3" disabled>
            <i class="el-icon-document"></i>
            <span slot="title">导航三</span>
          </el-menu-item>
        </el-menu>
      </div>
      <div class="main" ref="main">
        <div class="breadcrumb" ref="breadcrumb">
          <el-breadcrumb separator-class="el-icon-arrow-right">
            <el-breadcrumb-item :to="{ path: '/index/page1' }"
              >首页</el-breadcrumb-item
            >
            <template v-for="(item, index) in breadcrumbs">
              <el-breadcrumb-item :key="index">{{ item }}</el-breadcrumb-item>
            </template>
          </el-breadcrumb>
        </div>
        <div
          class="content"
          :key="contenteight"
          :style="{ height: contenteight + 'px' }"
        >
          <router-view></router-view>
        </div>
        <div class="foot" ref="foot">Copyright© 2021</div>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      active: "首页", // 默认选择
      breadcrumbs: ["首页"],
      isCollapse: false,
      navMap: new Map([
        ["首页", "/index/index"],
        ["使用说明", "/index/page1"],
        ["普通表格", "/index/page2"],
        ["文档预览", "/index/page3"],
        ["打印/下载", "/index/page4"],
        ["扇形图", "/index/page5"],
        ["条形图", "/index/page6"],
      ]),
      contenteight: "",
    };
  },

  mounted() {
    this.$router.push("/index/index");
    this.$nextTick(() => {
      let mainheight = this.$refs.main.offsetHeight;
      let breadcrumbheight = this.$refs.breadcrumb.offsetHeight;
      let footheight = this.$refs.foot.offsetHeight;
      this.contenteight = mainheight - breadcrumbheight - footheight;
    });
  },
  methods: {
    // 3个导航栏事件
    handleOpen() {
      // this.breadcrumbs = keyPath;
      // console.log(key, keyPath);
      // console.log("Open");
    },
    handleClose() {
      // this.breadcrumbs = keyPath;
      // console.log(key, keyPath);
      // console.log("Close");
    },
    handleSelect(index, indexPath) {
      this.breadcrumbs = indexPath;
      // console.log(index, indexPath);
      this.$router.push(this.navMap.get(index));
    },
    // 退出
    out(val) {
      console.log(val);
      if (val == 2) {
        this.$router.push("/");
      }
    },
  },
};
</script>
<style scoped lang="less">
.box {
  height: 100%;
  box-sizing: border-box;
}
.header {
  height: 60px;
  line-height: 60px;
  font-size: 16px;
  background: #409eff;
  color: white;
  display: flex;
  text-align: center;
  .h_logo {
    transition: width 0.3s;
    transition-timing-function: ease-in-out;
    background: rgb(102, 177, 255);
    font-size: 30px;
  }
  .h_menu_btn {
    width: 64px;
    font-size: 16px;
    .el-button--small {
      padding: 5px 8px;
      font-size: 16px;
    }
  }
  .h_title {
    flex: 1;
    position: relative;
    .el-dropdown {
      position: absolute;
      right: 20px;
      color: white;
    }
  }
}
.body {
  position: absolute;
  width: 100%;
  top: 60px;
  bottom: 0px;
  display: flex;
  box-sizing: border-box;
  .nav {
    background: #545c64;
    overflow: auto;
    .el-menu {
      border-right: none;
    }
    .el-menu-vertical-demo:not(.el-menu--collapse) {
      width: 200px;
      min-height: 400px;
    }
  }
  .main {
    flex: 1;
    background: #ebeef5;
    position: relative;
    overflow: hidden;
    .breadcrumb {
      box-sizing: border-box;
      background: white;
      padding: 10px;
    }
    .content {
      padding: 5px;
      box-sizing: border-box;
    }
    .foot {
      height: 30px;
      line-height: 30px;
      position: absolute;
      bottom: 0;
      background: white;
      text-align: center;
      width: 100%;
      font-size: 12px;
    }
  }
}
</style>
  • 13
    点赞
  • 21
    收藏
    觉得还不错? 一键收藏
  • 9
    评论
entfrm-boot是一个以模块化为核心的无代码开发平台,是一个集PC和APP快速开发、系统管理、运维监控、开发工具、OAuth2授权、可视化数据源管理与数据构建、API动态生成与统计、工作流、智能表单设计、微服务骨架等全方位功能于一体的高效、稳定的快速开发平台。 后端采用Spring Boot 2.X 、Spring Security、Oauth2、Mybatis Plus、Activiti、 uni-app等核心技术,前端基于vue-element-admin框架。 entfrm-boot可视化开发平台功能: 1、系统管理 机构管理:配置系统组织机构,无限级树结构展现支持数据权限。 角色管理:角色菜单权限分配、设置角色按机构进行数据范围权限划分。 用户管理:用户是系统操作者,该功能主要完成系统用户配置。 菜单管理:配置系统菜单,操作权限,按钮权限标识等。 字典管理:对系统经常使用的一些较为固定的数据进行维护。 参数管理:对系统动态配置常用参数。 快捷方式:添加顶部、首页快捷方式。 文件管理:文件统一管理,集成阿里云、腾讯云、七牛等。 终端管理:OAuth2 Password、授权码模式,灵活管理。 数据维护:mysql数据库备份与还原。 2、运维监控 定时任务:在线(添加、修改、删除)任务调度包含执行结果日志。 令牌管理:用户登录token管理。 数据监控: 监视当前系统数据库连接池状态,可进行分析SQL找出系统性能瓶颈。 缓存监控:redis缓存监控。 服务监控: 监视当前系统CPU、内存、磁盘、堆栈等相关信息。 API监控:restful api 接口调用统计、可视化。 日志监控 登录日志:系统正常操作日志记录和查询;系统异常信息日志记录和查询。 操作日志:系统登录日志记录查询包含登录异常。 3、消息系统 消息模板:消息模板管理与审核。 系统消息:包括系统通知、告警等。 短信:短信平台集成。 邮件:邮件集成。 4、开发工具 数据管理:Mysql、SQL Server、PostgreSQL等主流数据库在线管理、数据表管理(新建、修改、删除、查询)、数据源管理与数据转换。 代码生成:支持单表、树表、左树右表代码生成。 5、API引擎 应用管理:应用新增、修改、删除、查看。 API设计:API在线设计、无代码开发,支持自定义。 API文档与测试:API文档生成与自动化测试。 API资源权限:API资源管理、权限控制。 API统计报表:API使用统计、图表展示。 6、流程引擎(Activiti) 模型管理:功能包括模型新增、查看、删除、模型设计、模型部署。 流程定义:功能包括流程图查看、流程挂起与激活、流程删除。 请假管理:功能包括请假新增、编辑、查看、删除、导出、提交。 流程任务:功能包括流程审批、审批意见列表及流程追踪。 7、表单引擎 表单设计:表单快速设计。 多终端支持:PC、Pad、手机多端适配。 表单分享:表单一键分享。 表单数据统计:手机填写的表单,支持列表和图表统计。 uni-app示例与基础:提供uni-app实例,并集成表单功能。 8、数据引擎 可视化:快速配置,图表生成。 大屏:图表编排,大屏显示。 报表:报表设计。 9、拓展插件 10、分布式与微服务 开发环境: 开发工具 IntelliJ IDEA、Navicat Premium 后端技术 Springboot2.x、SpringSecurity、Oauth2、JWT、mybatis-plus、activiti、Flutter、Mysql等 前端技术 Node.js 10+、Vue.js 2.6+、Vue CLI、Vuex、VueRouter、Element-UI等 entfrm-boot可视化开发平台使用说明: 1、配置环境(jdk1.8、maven3.x、mysql5.6及以上、redis3.2及以上) 2、创建数据库 3、初始化sql脚本:entfrm.sql 4、导入项目到IntelliJ IDE 5、修改配置文件entfrm-boot/entfrm-web/src/main/resources/application.yml redis 配置 datasource 数据源配置 6、启动WebApplication 7、启动entfrm-ui 在线演示 账号:entfrm 密码:123456
基于Springboot+Vue的房价可视化监测系统源码+项目说明.zip 【资源说明】 1、该资源内项目代码都是经过测试运行成功,功能ok的情况下才上传的,请放心下载使用! 2、本项目适合计算机相关专业(如计科、人工智能、通信工程、自动化、电子信息等)的在校学生、老师或者企业员工下载使用,也适合小白学习进阶,当然也可作为毕设项目、课程设计、作业、项目初期立项演示等。 3、如果基础还行,也可在此代码基础上进行修改,以实现其他功能。 一个基于Springboot+Vue的房价可视化监测系统,数据抓取自链家,通过Echarts进行可视化展现。 ### 1.1 项目介绍 [1] 爬取链家的新楼盘、二手房、小区、租房信息作为分析数据,支持北上广深等国内21个主要城市。 [2] 通过 IP 代理池、伪装 User-Agent 、随机延时、多线程等手段快速稳定抓取数据。 [3] 通过 xxl-job 定时任务实现爬虫的自动抓取及数据的自动汇总处理。 [4] 有完善的用户、角色、权限配置及管理机制,支持页面级、按钮级的权限管理。 [5] 通过 AOP 切面及自定义注解实现系统日志记录,可在系统管理页面查看操作日志。 [6] 集成 Druid 数据连接池、Screw 导出数据库结构、Swagger 生成接口文档。 [7] 通过 axios 请求后端接口,使用 VueX 缓存用户登录状态及系统字典。 [8] 使用 Element-UI 组件库开发页面,Echarts 开发可视化图表,二者均简单易用。 ### 1.2 项目技术栈 后端部分:[Springboot](https://github.com/spring-projects/spring-boot)(后端核心框架)、[Mybatis](https://github.com/mybatis/mybatis-3)(持久化框架)、[Shiro](https://github.com/apache/shiro)(权限框架)、[Druid](https://github.com/alibaba/druid)(数据库连接池)、[Screw](https://github.com/pingfangushi/screw)(数据库表结构生成器)、[Swagger](https://github.com/swagger-api/swagger-ui)(接口文档)、[Hutool](https://github.com/looly/hutool)(Java工具类库)、[Lombok](https://www.projectlombok.org/)(简化代码)、[MySQL](https://www.mysql.com/cn/)(数据库)、[Redis](https://redis.io/)(高速缓存) 前端部分:[Vue](https://cn.vuejs.org/v2/guide/index.html)(前端核心框架)、[VueX](https://vuex.vuejs.org/zh/)(状态管理)、[axios](https://github.com/axios/axios)(HTTP请求库)、[Element-UI](https://element.eleme.cn/#/zh-CN/component/installation)(基础组件库)、[Echarts](https://echarts.baidu.com/theme-builder/)(可视化图表) 爬虫部分:[Xpath](https://www.w3.org/TR/xpath/)(Python爬虫核心模块)、[ProxyPool](https://github.com/jhao104/proxy_pool)(Python爬虫IP代理池) 定时任务:[xxl-job](https://github.com/xuxueli/xxl-job/)(分布式任务调度平台,分为调度心 xxl-job-admin 和执行器 xxl-job-executor 两部分) 开发工具:IDEA、PyCharm、VScode、Git、Maven、Navicat ### 1.3 项目结构 项目主要结构如下: ``` house-price-monitor ├── admin │ ├── pom.xml │ ├── src/main/java/com/house │ ├── ├── AdminApplication.java │ ├── ├── aop │ ├── ├── config │ ├── ├── constant │ ├── ├── controller

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值