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
0
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.12
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
31
increased by138.46%
Maintainers
0
Weekly downloads
 
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

  /**
   * 权限管理
   */
  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>

FAQs

Package last updated on 27 Nov 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