Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CommonService

Common service

Hierarchy

  • CommonService

Implements

Index

Constructors

  • Creates an instance of common service.

    Returns CommonService

Methods

  • changeLoginData(siteCd?: string, pushUseYn?: boolean, pushKey?: string): void
  • Changes login data

    Parameters

    • Optional siteCd: string
    • Optional pushUseYn: boolean
    • Optional pushKey: string

    Returns void

  • changePage(location: string): void
  • Changes page

    Parameters

    • location: string

    Returns void

  • checkLoadStatusList(component: { $refs?: any; dataList?: any[]; loadStatus?: LoadStatusType }, promise: Promise<any>, event?: any): void
  • Checks load status list

    Parameters

    • component: { $refs?: any; dataList?: any[]; loadStatus?: LoadStatusType }
      • Optional $refs?: any
      • Optional dataList?: any[]
      • Optional loadStatus?: LoadStatusType
    • promise: Promise<any>
    • Optional event: any

    Returns void

  • checkLoadStatusView(component: { dataView?: any; loadStatus?: LoadStatusType; writeModel?: any }, promise: Promise<any>, event?: any): void
  • Checks load status view

    Parameters

    • component: { dataView?: any; loadStatus?: LoadStatusType; writeModel?: any }
      • Optional dataView?: any
      • Optional loadStatus?: LoadStatusType
      • Optional writeModel?: any
    • promise: Promise<any>
    • Optional event: any

    Returns void

  • checkLogin(): Promise<boolean>
  • Checks login

    Returns Promise<boolean>

    login

  • Gets app conf

    Returns AppConfVo

    app conf

  • getCreate<T>(url: string, params?: any, config?: AxiosRequestConfig<any>): Promise<T>
  • Gets create

    Type Parameters

    • T

    Parameters

    • url: string
    • Optional params: any
    • Optional config: AxiosRequestConfig<any>

    Returns Promise<T>

    create

  • getDelete<T>(url: string, params?: any, config?: AxiosRequestConfig<any>): Promise<T>
  • Gets delete

    Type Parameters

    • T

    Parameters

    • url: string
    • Optional params: any
    • Optional config: AxiosRequestConfig<any>

    Returns Promise<T>

    delete

  • getIonicData(target: {}, colunms: {}): any
  • Gets ionic data

    Parameters

    • target: {}
      • [key: string]: any
    • colunms: {}
      • [key: string]: "date"

    Returns any

    ionic data

  • getList<T>(url: string, params?: any, limit?: number, offset?: number, config?: AxiosRequestConfig<any>): Promise<T[]>
  • Gets list

    Type Parameters

    • T

    Parameters

    • url: string
    • Optional params: any
    • limit: number = 100
    • offset: number = 0
    • Optional config: AxiosRequestConfig<any>

    Returns Promise<T[]>

    list

  • getPost(url: string, params?: any, config?: AxiosRequestConfig<any>): Promise<any>
  • Gets post

    Parameters

    • url: string
    • Optional params: any
    • Optional config: AxiosRequestConfig<any>

    Returns Promise<any>

    post

  • getRef<T>(refs?: any, refName?: string, methodName?: string): T
  • Gets ref

    Type Parameters

    • T = any

    Parameters

    • refs: any = null
    • refName: string = null
    • Optional methodName: string

    Returns T

    ref

  • getRouter(): UseIonRouterResult
  • Gets router

    Returns UseIonRouterResult

    router

  • Gets shared service

    Returns SharedService

    shared service

  • getSubmitData(target: {}, colunms?: {}, fixData?: any): any
  • Gets submit data

    Parameters

    • target: {}
      • [key: string]: any
    • Optional colunms: {}
      • [key: string]: "date" | "codeall"
    • Optional fixData: any

    Returns any

    submit data

  • getTranslate(message: string, named?: Record<string, unknown>): string
  • Gets translate

    Parameters

    • message: string
    • Optional named: Record<string, unknown>

    Returns string

  • getUpdate<T>(url: string, params?: any, config?: AxiosRequestConfig<any>): Promise<T>
  • Gets update

    Type Parameters

    • T

    Parameters

    • url: string
    • Optional params: any
    • Optional config: AxiosRequestConfig<any>

    Returns Promise<T>

    update

  • getUuid(prefix: string): string
  • Gets uuid

    Parameters

    • prefix: string

    Returns string

    uuid

  • getView<T>(url: string, params?: any, config?: AxiosRequestConfig<any>): Promise<T>
  • Gets view

    Type Parameters

    • T

    Parameters

    • url: string
    • Optional params: any
    • Optional config: AxiosRequestConfig<any>

    Returns Promise<T>

    view

  • isNotNull(input: any): boolean
  • Determines whether not null is

    Parameters

    • input: any

    Returns boolean

    true if not null

  • isNull(input: any): boolean
  • Determines whether null is

    Parameters

    • input: any

    Returns boolean

    true if null

  • openAlert(message: string, named?: Record<string, unknown>, options?: AlertOptions): Promise<boolean>
  • Opens alert

    commonService.openAlert('알려드립니다.').then(() => {
    alert('알림 닫힘');
    });

    Parameters

    • message: string
    • Optional named: Record<string, unknown>
    • Optional options: AlertOptions

    Returns Promise<boolean>

    alert

  • openConfirm(message: string, named?: Record<string, unknown>, options?: AlertOptions): Promise<boolean>
  • Opens confirm

    확인창을 보여줌

    commonService.openConfirm('Are U OK?').then(isOk => {
    if (isOk) {
    alert('You are OK');
    } else {
    alert('You are not OK');
    }
    })

    Parameters

    • message: string
    • Optional named: Record<string, unknown>
    • Optional options: AlertOptions

    Returns Promise<boolean>

    confirm

  • openFormInvalid(errorField: string, refs?: any, refName?: string): boolean
  • Opens form invalid

    Parameters

    • errorField: string
    • refs: any = null
    • refName: string = null

    Returns boolean

    true if form invalid

  • openModal(component: any, componentProps?: any, showBackdrop?: boolean, backdropDismiss?: boolean): Promise<OverlayEventDetail<any>>
  • Opens modal

    Parameters

    • component: any
    • Optional componentProps: any
    • Optional showBackdrop: boolean
    • Optional backdropDismiss: boolean

    Returns Promise<OverlayEventDetail<any>>

  • openToast(message: string, named?: Record<string, any>, duration?: number, header?: string, color?: IonColorType, icon?: string, buttons?: (string | ToastButton)[], routerPath?: string): Promise<OverlayEventDetail<any>>
  • Opens toast

    토스트 창 열기

    commonService.openToast('Message Message Message Message', null, 260000, 'message title', color, null, null, '/home')
    

    Parameters

    • message: string

      메세지

    • Optional named: Record<string, any>
    • duration: number = 3000
    • Optional header: string
    • Optional color: IonColorType
    • Optional icon: string
    • Optional buttons: (string | ToastButton)[]
    • Optional routerPath: string

    Returns Promise<OverlayEventDetail<any>>

  • setFormDisabled(disabled: boolean, refs?: any, refName?: string): boolean
  • Sets form disabled

    Parameters

    • disabled: boolean
    • refs: any = null
    • refName: string = null

    Returns boolean

    true if form disabled

  • setFormFocus(refs?: any, refName?: string): boolean
  • Sets form focus

    Parameters

    • refs: any = null
    • refName: string = null

    Returns boolean

    true if form focus

  • setI18n(i18n: VueI18n<{}, {}, {}, string, never, string, Composer<{}, {}, {}, string, never, string>>): void
  • Sets i18n

    Parameters

    • i18n: VueI18n<{}, {}, {}, string, never, string, Composer<{}, {}, {}, string, never, string>>

    Returns void

  • setRouter(ionRouter: UseIonRouterResult): void
  • Sets router

    Parameters

    • ionRouter: UseIonRouterResult

    Returns void

  • showError(error: any): void
  • Shows error

    Parameters

    • error: any

    Returns void

  • Gets instance

    Returns CommonService

    instance

Generated using TypeDoc