Common service

### Hierarchy

- CommonService

### Implements

- ICommonService
- ILogerService

## Index

### Constructors

- constructor

### Methods

- changeLoginData
- changePage
- checkLoadStatusList
- checkLoadStatusSubmit
- checkLoadStatusView
- checkLogin
- consoleLog
- getAppConf
- getCreate
- getDelete
- getIonicData
- getList
- getPost
- getRef
- getRouter
- getSharedService
- getSubmitData
- getTranslate
- getUpdate
- getUuid
- getView
- isNotNull
- isNull
- openAlert
- openConfirm
- openFormInvalid
- openModal
- openToast
- setFormDisabled
- setFormFocus
- setI18n
- setLogger
- setRouter
- showError
- getInstance

## Constructors

### constructor

- new CommonService(): CommonService

- - Defined in src/services/common.service.ts:41

  Creates an instance of common service.

  #### Returns CommonService

## Methods

### changeLoginData

- changeLoginData(siteCd?: string, pushUseYn?: boolean, pushKey?: string): void

- - Defined in src/services/common.service.ts:736

  Changes login data

  #### Parameters

  - ##### Optional siteCd: string

  - ##### Optional pushUseYn: boolean

  - ##### Optional pushKey: string

  #### Returns void

### changePage

- changePage(location: string): void

- Implementation of ILogerService.changePage

  - Defined in src/services/common.service.ts:495

  Changes page

  #### Parameters

  - ##### location: string

  #### Returns void

### checkLoadStatusList

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

- - Defined in src/services/common.service.ts:648

  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

### checkLoadStatusSubmit

- checkLoadStatusSubmit(component: { loadStatus?: LoadStatusType; toolbars?: ToolbarButtonVo[] }, promise: Promise<any>, event?: any): void

- - Defined in src/services/common.service.ts:698

  Checks load status view

  #### Parameters

  - ##### component: { loadStatus?: LoadStatusType; toolbars?: ToolbarButtonVo[] }

    - ##### Optional loadStatus?: LoadStatusType

    - ##### Optional toolbars?: ToolbarButtonVo[]

  - ##### promise: Promise<any>

  - ##### Optional event: any

  #### Returns void

### checkLoadStatusView

- checkLoadStatusView(component: { dataView?: any; loadStatus?: LoadStatusType; writeModel?: any }, promise: Promise<any>, event?: any): void

- - Defined in src/services/common.service.ts:673

  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

- checkLogin(): Promise<boolean>

- - Defined in src/services/common.service.ts:524

  Checks login

  #### Returns Promise<boolean>

  login

### consoleLog

- consoleLog(type: ConsoleLogType, title: string, ...objs: any[]): void

- Implementation of ILogerService.consoleLog

  - Defined in src/services/common.service.ts:774

  Consoles log

  #### Parameters

  - ##### type: ConsoleLogType

  - ##### title: string

  - ##### Rest ...objs: any[]

  #### Returns void

### getAppConf

- getAppConf(): AppConfVo

- - Defined in src/services/common.service.ts:506

  Gets app conf

  #### Returns AppConfVo

  app conf

### getCreate

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

- - Defined in src/services/common.service.ts:595

  Gets create

  #### Type Parameters

  - #### T

  #### Parameters

  - ##### url: string

  - ##### Optional params: any

  - ##### Optional config: AxiosRequestConfig<any>

  #### Returns Promise<T>

  create

### getDelete

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

- - Defined in src/services/common.service.ts:635

  Gets delete

  #### Type Parameters

  - #### T

  #### Parameters

  - ##### url: string

  - ##### Optional params: any

  - ##### Optional config: AxiosRequestConfig<any>

  #### Returns Promise<T>

  delete

### getIonicData

- getIonicData(target: {}, colunms: {}): any

- - Defined in src/services/common.service.ts:121

  Gets ionic data

  #### Parameters

  - ##### target: {}

    - ##### [key: string]: any

  - ##### colunms: {}

    - ##### [key: string]: "date"

  #### Returns any

  ionic data

### getList

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

- - Defined in src/services/common.service.ts:562

  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

- getPost(url: string, params?: any, config?: AxiosRequestConfig<any>): Promise<any>

- - Defined in src/services/common.service.ts:620

  Gets post

  #### Parameters

  - ##### url: string

  - ##### Optional params: any

  - ##### Optional config: AxiosRequestConfig<any>

  #### Returns Promise<any>

  post

### getRef

- getRef<T>(refs?: any, refName?: string, methodName?: string): T

- - Defined in src/services/common.service.ts:85

  Gets ref

  #### Type Parameters

  - #### T = any

  #### Parameters

  - ##### refs: any = null

  - ##### refName: string = null

  - ##### Optional methodName: string

  #### Returns T

  ref

### getRouter

- getRouter(): UseIonRouterResult

- - Defined in src/services/common.service.ts:486

  Gets router

  #### Returns UseIonRouterResult

  router

### getSharedService

- getSharedService(): SharedService

- - Defined in src/services/common.service.ts:515

  Gets shared service

  #### Returns SharedService

  shared service

### getSubmitData

- getSubmitData(target: {}, colunms?: {}, fixData?: any): any

- - Defined in src/services/common.service.ts:157

  Gets submit data

  #### Parameters

  - ##### target: {}

    - ##### [key: string]: any

  - ##### Optional colunms: {}

    - ##### [key: string]: "date" | "codeall"

  - ##### Optional fixData: any

  #### Returns any

  submit data

### getTranslate

- getTranslate(message: string, named?: Record<string, unknown>): string

- - Defined in src/services/common.service.ts:206

  Gets translate

  #### Parameters

  - ##### message: string

  - ##### Optional named: Record<string, unknown>

  #### Returns string

### getUpdate

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

- - Defined in src/services/common.service.ts:608

  Gets update

  #### Type Parameters

  - #### T

  #### Parameters

  - ##### url: string

  - ##### Optional params: any

  - ##### Optional config: AxiosRequestConfig<any>

  #### Returns Promise<T>

  update

### getUuid

- getUuid(prefix: string): string

- - Defined in src/services/common.service.ts:459

  Gets uuid

  #### Parameters

  - ##### prefix: string

  #### Returns string

  uuid

### getView

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

- - Defined in src/services/common.service.ts:580

  Gets view

  #### Type Parameters

  - #### T

  #### Parameters

  - ##### url: string

  - ##### Optional params: any

  - ##### Optional config: AxiosRequestConfig<any>

  #### Returns Promise<T>

  view

### isNotNull

- isNotNull(input: any): boolean

- - Defined in src/services/common.service.ts:449

  Determines whether not null is

  #### Parameters

  - ##### input: any

  #### Returns boolean

  true if not null

### isNull

- isNull(input: any): boolean

- - Defined in src/services/common.service.ts:421

  Determines whether null is

  #### Parameters

  - ##### input: any

  #### Returns boolean

  true if null

### openAlert

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

- - Defined in src/services/common.service.ts:324

  Opens alert

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

  #### Parameters

  - ##### message: string

  - ##### Optional named: Record<string, unknown>

  - ##### Optional options: AlertOptions

  #### Returns Promise<boolean>

  alert

### openConfirm

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

- - Defined in src/services/common.service.ts:367

  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

- openFormInvalid(errorField: string, refs?: any, refName?: string): boolean

- - Defined in src/services/common.service.ts:69

  Opens form invalid

  #### Parameters

  - ##### errorField: string

  - ##### refs: any = null

  - ##### refName: string = null

  #### Returns boolean

  true if form invalid

### openModal

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

- - Defined in src/services/common.service.ts:404

  Opens modal

  #### Parameters

  - ##### component: any

  - ##### Optional componentProps: any

  - ##### Optional showBackdrop: boolean

  - ##### Optional backdropDismiss: boolean

  #### Returns Promise<OverlayEventDetail<any>>

### openToast

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

- Implementation of ICommonService.openToast

  - Defined in src/services/common.service.ts:232

  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

- setFormDisabled(disabled: boolean, refs?: any, refName?: string): boolean

- - Defined in src/services/common.service.ts:187

  Sets form disabled

  #### Parameters

  - ##### disabled: boolean

  - ##### refs: any = null

  - ##### refName: string = null

  #### Returns boolean

  true if form disabled

### setFormFocus

- setFormFocus(refs?: any, refName?: string): boolean

- - Defined in src/services/common.service.ts:106

  Sets form focus

  #### Parameters

  - ##### refs: any = null

  - ##### refName: string = null

  #### Returns boolean

  true if form focus

### setI18n

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

- - Defined in src/services/common.service.ts:468

  Sets i18n

  #### Parameters

  - ##### i18n: VueI18n<{}, {}, {}, string, never, string, Composer<{}, {}, {}, string, never, string>>

  #### Returns void

### setLogger

- setLogger(logger: ILogerService): void

- Implementation of ILogerService.setLogger

  - Defined in src/services/common.service.ts:752

  Sets logger

  #### Parameters

  - ##### logger: ILogerService

  #### Returns void

### setRouter

- setRouter(ionRouter: UseIonRouterResult): void

- - Defined in src/services/common.service.ts:477

  Sets router

  #### Parameters

  - ##### ionRouter: UseIonRouterResult

  #### Returns void

### showError

- showError(error: any): void

- - Defined in src/services/common.service.ts:533

  Shows error

  #### Parameters

  - ##### error: any

  #### Returns void

### Static getInstance

- getInstance(): CommonService

- - Defined in src/services/common.service.ts:54

  Gets instance

  #### Returns CommonService

  instance

Generated using TypeDoc