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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@imedx/ics-imedx-core

v0.0.10

Published

iMedx核心功能js封装

Downloads

239

Readme

Usage

npm i @imedx/[email protected]

feature

0.0.1-beta.1 初始提供

Features

  • IMedx:IMedx 核心封装类
import IMedx from '@imedx/ics-imedx-core'

IMedx类


  /**
   * 当前client实例
   */
  public static clientInfo: ClientInfo


  /**
   * 当前user实例
   */
   public static userInfo: UserInfo
   
   /**
   * 设置 request 请求
   */
  public static use({ request }: { request: any })

  /**
   * 传过来的axios实例
   */
  public static request: any

   /**
   * 系统参数
   */
  public static system: System
  
  /**
   * 客户端操作
   */
  public static client: Client

  /**
   * 医保核心接口
   */
   public static IntfChsPlatform = IntfChsPlatform

  /**
   * 权限管理
   */
  public static Permission = Permission

  /**
   * 获取code释义
   */
  public static messageCore: MessageCore = new MessageCore()

  /**
   * 电子签名
   */
  public static ESign: ESignCore

System 系统类


  /**
   * 系统参数
   */
  public param: Param

Client 客户端操作类


   /**
   * 客户端报表打印
   */
  public Report = Report
 

MessageCore 客户端错误码对应释义


   /**
   * 客户端错误码对应释义
   */
  public Messgae = Messgae

Param 参数类


 /**
   * 获取系统参数
   * @param key 键
   * @param expirationTime 过期时间-秒
   * @returns
   */
  public get(key: string, expirationTime: number): Promise<any>


  /**
   * 获取支付方式
   * @param tradeType 交易类型
   * @param expirationTime  过期时间-秒
   * @returns
   */
  public getTradeChannel(tradeType: string, expirationTime: number): Promise<any>

Report 参数类


/**
   * 获取打印机名称
   * @param name 报表名称
   * @param expirationTime 过期时间-秒
   * @returns 打印机名称
   */
  public getPrinterName(name: string, expirationTime: number = 12 * 60 * 60): Promise<any> 

  /**
   * 清空数据源
   * @returns void
   */
  public clearData(): Promise<any> 

  /**
   * 注册数据源
   * @param name 数据源名称
   * @param data  数据
   * @param field 指定字段对应类型 默认所有字段类型为string
   * 可指定 string|bool|date|datetime|decimal|double|float|int|long|object|short
   * 格式: {"id":"string","flag":"int","birthday":"date","total":"decimal"}
   * @returns
   */
  public registerData(name: string, data: Array<any>, field: object): Promise<any> 

  /**
   * 设置双面打印
   * @param value true双面打印 false非双面打印
   * @returns
   */
  public doublePass(value: Boolean): Promise<any>

  /**
   * 指定文件加载报表
   * @param fileName frx文件名称,默认程序根目录下report文件夹下面文件
   * @returns
   */
  public load(fileName: string): Promise<any>

  /**
   * 根据Id加载报表,暂时没有启用
   * @param reportId 报表Id
   * @returns
   */
  public loadFromId(reportId: string): Promise<any>

  /**
   * 导出pdf
   * @param fileName 文件名称,如果不传则返回流
   * @returns 文件或者文件流
   */
  public ExportToPdf(fileName: string): Promise<any>

  /**
   * 导出html
   * @param fileName 文件名称,如果不传则返回流
   * @returns 文件或者文件流
   */
  public exportToHtml(fileName: string): Promise<any>

  /**
   * 准备报表
   * @param append 是否追加
   * @returns
   */
  public prepare(append?: Boolean): Promise<any>

  /**
   * 添加报表参数
   * @param name 参数名称
   * @param value 参数值
   * @returns
   */
  public addParameter(name: string, value: string): Promise<any>

  /**
   * 设计报表
   * @returns
   */
  public design(): Promise<any>

  /**
   * 预览报表
   * @returns
   */
  
  public show(printerName?: string, showPrintSettings?: boolean, closeAfterPrint?:boolean): Promise<any>

  /**
   * 预览准备报表
   * @returns
   */
  public showPrepared(printerName?: string, showPrintSettings?: boolean, closeAfterPrint?:boolean): Promise<any>

  /**
   * 打印报表
   * @param printerName
   * @returns
   */
  public print(printerName?: string, showPrintSettings?: boolean): Promise<any>

  /**
   * 打印准备报表
   * @param printerName
   * @returns
   */
  public printPrepared(printerName?: string, showPrintSettings?: boolean): Promise<any>

  /**
   * 释放报表
   * @returns
   */
  public dispose(): Promise<any>

Message 消息文案类


  /**
   * 获取code释义
   * @param codes code集合
   * @param dynamicParams // 动态替换参数
   * @param expirationTime 过期时间-秒
   * @return code码释义
   */
  public getCodeDesc(
    codes: string[],
    dynamicParams: any,
    expirationTime: number = 24 * 60 * 60
  ): Promise<any>