npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

enterprise-report

v1.16.0

Published

企业数字报告组件

Downloads

2,240

Readme

enterprise-report

企业数字报告组件

更新发布包命令

npm version minor 更新版本号 npm publish --access public 发布到npm仓库

安装

npm install enterprise-report --save

使用

当更新组件后,需要重更新组件 命令 npm update enterprise-report

<template>
  <div>
    <!-- 自定义头部 -->
    <div class="header">
      <button @click="handleDownload">下载报告</button>
    </div>
    
    <!-- 使用报告组件 -->
    <EnterpriseReport 
      :report-info="reportData" 
      :download-file="downloadFile"
      @preview-image="handlePreview"
    />
  </div>
</template>

<script>
import EnterpriseReport from 'enterprise-report';
import { downloadFile } from '@/utils/index.js';

export default {
  components: { EnterpriseReport },
  data() {
    return {
      reportData: null
    };
  },
  async created() {
    // 获取报告数据
    const res = await this.$api.getReportData({ id: this.reportId });
    this.reportData = res.data;
  },
  methods: {
    downloadFile(fid) {
      return downloadFile(fid);
    },
    handlePreview(src) {
      // 图片预览处理
      console.log('预览图片:', src);
    },
    handleDownload() {
      // 下载逻辑
    }
  }
};
</script>

Props

| 属性 | 类型 | 必填 | 说明 | |------|------|------|------| | reportInfo | Object | 是 | 报告数据 | | downloadFile | Function | 是 | 下载文件方法 |

Events

| 事件名 | 参数 | 说明 | |--------|------|------| | preview-image | src | 点击图片时触发 |

数据结构

const reportInfo = {
  fcompanyname: '公司名称',
  fcreditcode: '统一社会信用代码',
  areaname: '地区',
  faddress: '详细地址',
  festablishtime: '成立时间',
  fscalecompany: '公司规模代码',
  amountStr: '注册资金',
  groupname: '所属行业',
  femail: '邮箱',
  web: '网址',
  fmainbusiness: '经营范围',
  fcompanyprofile: '公司介绍',
  count: {
    productCount: 0,
    qualificationCount: 0,
    projectCount: 0,
    contractCount: 0
  },
  enterprise: {
    produce: '产品介绍',
    license: '营业执照附件'
  },
  qualification: [
    { name: '资质名称', attach_file: '附件ID,文件名' }
  ],
  project: [
    { bkid: '项目ID', name: '项目名称', amt: '金额', settime: '时间' }
  ],
  product: [
    { bkid: '产品ID', name: '产品名称' }
  ],
  contract: [
    { name: '业绩名称', attach_file: '附件ID,文件名' }
  ],
  credit: [
    { name: '信用证书名称', attach_file: '附件ID,文件名' }
  ]
};

注意事项

  1. 请确保项目中已引入全局样式重置文件(如 reset.css)
  2. 需要在项目中引入 Element UI
  3. downloadFile 方法需要返回 Promise,resolve 时返回图片 URL

开发

# 安装依赖
npm install

# 开发模式
npm run dev

# 构建
npm run build

许可证

MIT