interface Window { z: { init?: (params: string) => void; config?: Record; }; ggie: { // getMultiConfig :: [String] -> Object getMultiConfig: (list: Array) => string; getMQThread: () => void; /** * @param format 语音文案 * @param json 数据 * @param times 语音次数 */ addUser: (format: string, json: string, times: number) => void; webLog: (type: string, info: string) => void; }; updateLoadingStatus: (stack: string, status = 'loading') => void; shouldEncode: boolean; getQueue: (params: string) => void; testCC: (s: string) => void; /** * @param show 是否显示当前播报 * @param params 当前播报信息 */ displayInfo: (show: boolean, params?: string) => void; /** @access */ external: { StartMQConsumer: (mac: string) => void; GetIniProfileString: (path: string, encode: string, namespace: string, key: string) => string; }; onMQMsg: (params: string) => void; /** 驱动监听事件 */ callEvent: (eventName: string) => void; ipcRenderer: { on: (eventName: BridgeType_Win, callback: (event: any, ...args: any[]) => void) => void; send: (eventName: BridgeType_Win, ...args: any[]) => void; invoke: (eventName: BridgeType_Win, ...args: any[]) => Promise; }; deviceApi: { IP: string; speek: (str: string) => void; ginfo: { success: (str: string) => Promise; error: (str: string) => void; }; startRead: () => void; callH5: (body: { /** 00: 成功 01: 故障 02: 失败 03: 超时 04: 模块错误 */ retcode: '00' | '01' | '02' | '03' | '04'; retmsg?: string; data?: string; }) => void; }; GGCardReader: { excute: () => void; }; GGDialog: (type: 'success' | 'error', title: string) => void; GGTTS: { excute: (str: string) => void; }; } type BridgeType_Win = 'MQ_OPEN' | 'MQ_MSG' | 'WEB_RLOG' | 'WEB_RCFG' | 'some-name' | 'WEB_GET_ALL_CFG'; type OPERATE_TYPE = 'get' | 'over_in' | 'adjust' | 'resume' | 'transfer' | 'up' | 'call' | 'fu' | 'finish'; /** * 1: 就诊 * 2: 检查服务 * 3: 军人 * 5: 急诊 */ type PATIENT_TYPE = 1 | 2 | 3; type QueueInfo = { /** 科室名 */ nameLevel: string; /** 叫号的序列号,后来改用 businessid */ serialNumber?: number; /** 用户名 */ nameOwner: string; /** 外部系统指定队列唯一id */ idOuter: string; /** 设备号 */ idDev: string; /** 诊室名 */ nameRoom: string; /** 用户的状态 call 和 finish 都是表示 正在就诊 */ operate: OPERATE_TYPE; /** 科室ID */ idLevel: string; /** 外部系统指定叫号顺序 */ orderOuter: string; /** 取号唯一 id */ id: string; /** 用于显示的排队序号 */ businessid: string; /** 医生名 */ nameEmployee: string; /** 医生 id */ idEmployee: string; /** 外部系统指定号类型 */ type: PATIENT_TYPE; /** 自用,实际接口不存在此字段 */ waiting?: QueueInfo[]; /** 自用,实际接口不存在此字段 */ current?: QueueInfo; }; /** * get: 取号 * call: 呼叫 * recall: 重呼 * selectcall: 选呼 * signnotice: 签到通知 * signout: 签退通知 * finish: 完成 * adjust: 队列变更 * getno: 取号 * over: 过号 * overin: 过号重排 * transfer: 转诊 */ type MESSAGES_TYPE = | 'get' | 'call' | 'recall' | 'selectcall' | 'signnotice' | 'signout' | 'finish' | 'adjust' | 'getno' | 'over' | 'overin' | 'transfer'; type TemplateType = /** 综合屏,叫号,显示功能 */ | 'complex' /** 综合屏测试用,不选该值 */ | 'complex1' /** 一页最多四列科室的综合屏 */ | 'complex2' /** 竖屏,带号源排队、叫号、扫描功能 */ | 'portraitScanner' /** 政务的窗口屏,叫号与显示 */ | 'settlement' /** 空的政务窗口屏,只做播报 */ | 'settlementEmpty' /** 竖屏,号源更少 */ | 'portrait1' /** 空的只做报道用 */ | 'empty'; type DeviceConfig = { /** 设备类型 */ type: number; /** 语音文案 */ local: string; /** 设备号 */ idDev?: string; /** 关联科室 */ idLevelList?: IdLevelListType[]; /** 科室名 */ nameRoom?: string; /** 标题 */ title?: string; /** 表格配置 */ table?: Partial; /** 主题 */ theme?: Partial; /** 通用配置 */ common: { /** 选择加载的模板 */ template: TemplateType; /** 是否需要脱敏 */ needEncode?: boolean; /** 是否需要显示序号 */ hasOrder?: boolean; }; /** 播报配置 */ broadcast?: { /** 语音播报次数 */ times: number; voiceLocal: string; showLocal: string; }; qrcode?: { value: string; }; } & NativeConfigs; interface ServerResponse { returnCode: string; returnMsg: string; } type ThemeType = { 'primary-color': string; 'secondary-color': string; 'text-sm': string; /** 背景图 */ bg: string; }; type TableType = { thead: TableHeadType[]; maximumRows: number; }; type TableHeadType = { local: string; key: keyof QueueInfo; /** 权重,默认 1 */ weight?: string | number; }; type IdLevelListType = { idLevel: string; nameLevel: string; typeLevel: number; }; interface QueryByGroupResponse extends ServerResponse { list: GroupList[]; } type DocInfo = { id: string; idEmployee: string; nameEmployee: string; nameLevel: string; gradeName: string; info: string; photo: string; idLevelList: IdLevelListType[]; nameRoom: string; idLevel: string; }; interface QueryResponse extends ServerResponse { list: QueueInfo[]; } type GroupList = { idEmployee: string; idLevel: string; // nameEmployee: string; subList: Omit[]; }; type MQRes = { msgType: MESSAGES_TYPE; currentQueueLength: number; list: QueueInfo[]; roomMac: string; }; type NativeConfigs = { ServerConfig: { server_ip: string; server_port: string; }; DeviceConfig: { device_id: string; ui_address: string; }; UIConfig: { ajax_ip: string; ajax_port: string; }; }; type ComponentBaseProps = { style?: React.CSSProperties; className?: string; };