Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@imedx/ics-imedx-core

Package Overview
Dependencies
Maintainers
20
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@imedx/ics-imedx-core

iMedx核心功能js封装

  • 0.0.2-beta.5
  • npm
  • Socket score

Version published
Maintainers
20
Created
Source

Usage

npm i @imedx/ics-imedx-core@0.0.1-beta.1

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

System 系统类


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

Client 客户端操作类


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

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>

FAQs

Package last updated on 17 May 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc