1.0.3 • Published 2 years ago

review-report v1.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

本地locastorage需要存储

- Authorization: "Bearer"+登录时的token值
- user_info: 
    {
      id: "admin",// 必须有的,该id会在后续报告发布分析时会借助此处的id作为userId参数发起请求来获取发布报告的信息
      token: 登录时的token值,
      userCode: "admin",
      username: "admin"
    }

Install

安装方法:

npm install review-report

开始使用

    <review-report :reportId="id" :shareAddress="shareAddress" :editAddress="editAddress"/>
    export default {
        data(){
          return {
            id:'402884cd7b1a1846017b71eeb71d003b'
            shareAddress:"http://localhost:8080/dataVisualization/reportShare.html",//分享地址
            editAddress:"http://localhost:8080/dataVisualization/dashboard.html"//编辑跳转地址
          }
        },
    }

    <!-- props参数 -->
    reportId:预览的报告的id
    shareAddress:报告发布的地址
    editAddress:点击编辑跳转的页面

    <!-- main.js -->
    import ReviewReport from "visual-report"
    Vue.use(ReviewReport)
    <!-- 此外需要额外引入elementUI -->
    import ElementUI from 'element-ui';
    import 'element-ui/lib/theme-chalk/index.css';
    Vue.use(ElementUI);

    <!-- 配置文件中加入代理 -->
    proxy: {
          '/dashboard': {
            target: 'http://sso-davin.pbe.5ireport.com:10082/dashboard',
            changeOrigin: true, 
            pathRewrite: {
              '^/dashboard': '/'
            },
            timeout: 10*1000
          },
          '/widget': {
            target: 'http://sso-davin.pbe.5ireport.com:10082/widget',
            changeOrigin: true,
            pathRewrite: {
              '^/widget': '/'
            },
            timeout: 10*1000
          },
          '/share': {
            target: 'http://sso-davin.pbe.5ireport.com:10082/share',
            changeOrigin: true,
            pathRewrite: {
              '^/share': '/'
            },
            timeout: 10*1000
          },
        }