123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516 |
- import { Injectable } from "@angular/core";
- import { HttpClient, HttpHeaders } from "@angular/common/http";
- import host from "../../assets/js/http";
- @Injectable({
- providedIn: "root",
- })
- export class MainService {
- constructor(private http: HttpClient) {}
- headers = new HttpHeaders({
- "Content-Type": "application/json",
- "Cache-Control": "no-cache",
- });
- exportHeader = new HttpHeaders().set("Accept", "*/*"); //导出excel表使用
- // 单点登录
- singleSignOnLogin(data): any {
- return this.http.post(host.host + "/auth/portalLogin", data, {
- headers: this.headers,
- });
- }
- // 登录
- login(name: string, pwd: string): any {
- const data = {
- username: name,
- password: pwd,
- type: "PC",
- };
- return this.http.post(host.host + "/auth/login", data, {
- headers: this.headers,
- });
- }
- // 登出
- logOut(): any {
- return this.http.delete(host.host + "/auth/logout2", {
- headers: this.headers,
- });
- }
- // 修改密码
- upPwd(data): any {
- return this.http.post(host.host + "/auth/uppwd", data, {
- headers: this.headers,
- });
- }
- // 字典表
- getDictionary(type, key): any {
- const data = {
- type: type,
- key: key,
- };
- return this.http.post(host.host + "/common/common/getDictionary", data, {
- headers: this.headers,
- });
- }
- // 列表搜索(get data)
- getDataFetchData(type, id): any {
- return this.http.get(host.host + "/data/fetchData/" + type + "/" + id, {
- headers: this.headers,
- });
- }
- // api 详情 -工单详情
- getApiFetchData(type, id): any {
- return this.http.get(host.host + "/api/fetchData/" + type + "/" + id, {
- headers: this.headers,
- });
- }
- // 列表搜索(通用)
- getFetchDataList(type, target, data): any {
- return this.http.post(
- host.host + "/" + type + "/fetchDataList/" + target,
- data,
- { headers: this.headers }
- );
- }
- // 调度台 获取支助人员信息
- getSerInfo(type, data): any {
- return this.http.post(host.host + "/ser/" + type, data, {
- headers: this.headers,
- });
- }
- // 通用操作data信息(新增/更新/删除)//coop:操作类型addData:新增,updData更新,rmvData删除
- coopData(coop, type, data): any {
- return this.http.post(host.host + "/data/" + coop + "/" + type, data, {
- headers: this.headers,
- });
- }
- // 通用操作user data信息(新增/更新/删除)//coop:操作类型addData:新增,updData更新,rmvData删除
- coopUserData(coop, type, data): any {
- return this.http.post(host.host + "/user/data/" + coop + "/" + type, data, {
- headers: this.headers,
- });
- }
- // 获取院区user信息
- getHosUser(type, id): any {
- return this.http.get(host.host + "/user/data/" + type + "/" + id, {});
- }
- // 通用操作configuration信息 有操作类型(新增/更新/删除)//coop:操作类型addData:新增,updData更新,rmvData删除
- coopTypeConfig(coop, type, data): any {
- return this.http.post(
- host.host + "/configuration/" + coop + "/" + type,
- data,
- { headers: this.headers }
- );
- }
- // 通用操作configuration信息(新增/更新/删除)
- coopConfig(type, data): any {
- return this.http.post(host.host + "/configuration/" + type, data, {
- headers: this.headers,
- });
- }
- // 查询所有数据
- findAllDataList(type): any {
- return this.http.post(
- host.host + "/data/findAll/" + type,
- {},
- { headers: this.headers }
- );
- }
- // 权限相关
- getPermission(type): any {
- return this.http.get(host.host + "/permission/roleMenu/" + type, {
- headers: this.headers,
- });
- }
- //科室详情
- getOfficeDetail(id): any {
- return this.http.get(host.host + "/data/fetchData/department/" + id, {
- headers: this.headers,
- });
- }
- // fetchData查看详情
- getFetchData(type, info, id?): any {
- let url = id
- ? host.host + "/" + type + "/fetchData/" + info + "/" + id
- : host.host + "/" + type + "/fetchData/" + info;
- return this.http.get(url, { headers: this.headers });
- }
- // 获取楼栋信息/楼层信息
- getBuildingOrFloor(type, data): any {
- return this.http.post(
- host.host + "/data/getBuildingOrFloor/" + type,
- data,
- { headers: this.headers }
- );
- }
- // 自定义请求 post
- postCustom(type, info, data): any {
- return this.http.post(host.host + "/" + type + "/" + info, data, {
- headers: this.headers,
- });
- }
- // 科室二维码打印flag=1
- postCustomCode(type, info, data): any {
- return this.http.post(host.host + "/" + type + "/" + info + "/1", data, {
- headers: this.headers,
- });
- }
- // 自定义请求 get
- getCustom(type, info): any {
- return this.http.get(host.host + "/" + type + "/" + info, {
- headers: this.headers,
- });
- }
- // 调度台-分派工单
- assignWorker(data, type): any {
- return this.http.post(host.host + "/workerOrder/" + type, data, {
- headers: this.headers,
- });
- }
- // 调度台-删除工单
- delOrder(id): any {
- return this.http.get(host.host + "/workerOrder/delWorkOrder/" + id, {
- headers: this.headers,
- });
- }
- // 工单列表-删除工单
- delOrders(ids): any {
- return this.http.post(
- host.host + "/workerOrder/delWorkOrders",
- { ids },
- { headers: this.headers }
- );
- }
- // 调度台工单相关
- coopWorkerOrder(type, data): any {
- return this.http.post(host.host + "/workerOrder/" + type, data, {
- headers: this.headers,
- });
- }
- // 调度台-工单历史记录
- getWorkOrderLog(id): any {
- return this.http.get(host.host + "/ser/fetchWorkOrderLog/" + id, {
- headers: this.headers,
- });
- }
- // 综合报表
- postReportCount(type, data): any {
- return this.http.post(host.host + "/report/orderCount/" + type, data, {
- headers: this.headers,
- });
- }
- // 报表导出
- exportReport(type, data): any {
- return this.http.post(host.host + "/report/export/" + type, data, {
- headers: this.exportHeader,
- responseType: "arraybuffer",
- });
- }
- dataExport(type, data): any {
- return this.http.post(host.host + "/data/export/" + type, data, {
- headers: this.exportHeader,
- responseType: "arraybuffer",
- });
- }
- //新增/编辑轮巡计划
- addRoundRobin(type: string, data: any): any {
- return this.http.post(host.host + "/orderPlan/" + type, data, {
- headers: this.headers,
- });
- }
- //删除轮巡计划
- delRoundRobin(id): any {
- return this.http.get(host.host + "/orderPlan/deletePlan/" + id, {
- headers: this.headers,
- });
- }
- //启用/停用轮巡计划
- switchRoundRobin(isSwitch, id): any {
- return this.http.get(
- `${host.host}/orderPlan/activePlan/${isSwitch}/${id}`,
- { headers: this.headers }
- );
- }
- //新增/编辑快捷建单
- addShortcutBuildOrders(type: string, data: any): any {
- return this.http.post(host.host + "/api/" + type + "/quickOrder", data, {
- headers: this.headers,
- });
- }
- //删除快捷建单
- delShortcutBuildOrders(id): any {
- return this.http.post(host.host + "/api/rmvData/quickOrder", [id], {
- headers: this.headers,
- });
- }
- // 快捷建单二维码批量打印
- printShortcutBuildOrders(idArr): any {
- return this.http.post(host.host + "/api/orderCodes", idArr, {
- headers: this.headers,
- });
- }
- //护士端返回二维码信息,flag=0,动态二维码
- getDeptCode(idArr) {
- return this.http.post(host.host + "/dept/deptCodes/0", idArr, {
- headers: this.headers,
- });
- }
- //药房端药房列表查询、搜索接口
- getPharmacyList(idx, type, searchKey, launch) {
- return this.http.post(
- host.host + "/api/fetchDataList/drugsBag",
- {
- idx: idx,
- sum: 10,
- drugsBag: { searchType: type, searchKey: searchKey, launch: launch },
- },
- { headers: this.headers }
- );
- }
- //药房端打印二维码的接口
- printRequisition(idArr) {
- return this.http.post(host.host + "/drugsBag/printRequisition", idArr, {
- headers: this.headers,
- });
- }
- //药房端待打印变为待配药接口
- changeToDispensing(idArr, name) {
- return this.http.post(
- host.host + "/drugsBag/changeToDispensing/" + name,
- idArr,
- { headers: this.headers }
- );
- }
- //新建工单->获取新建类型
- getAutoWorkTypes(hosId) {
- return this.http.get(host.host + "/ser/getAutoWorkTypes/" + hosId, {
- headers: this.headers,
- });
- }
- //服务台新建工单—调度台建单获取起点科室或者终点科室列表
- getdeptList(taskTypeId) {
- return this.http.post(
- host.host + "/ser/getdeptList",
- { taskTypeId },
- { headers: this.headers }
- );
- }
- //服务台新建工单—调度台建单获取患者
- getPatientList(data) {
- return this.http.post(host.host + "/ser/getPatientInfo", data, {
- headers: this.headers,
- });
- }
- //服务台新建工单—调度台建单获取起点科室或者终点科室列表
- buildOrder(data) {
- return this.http.post(host.host + "/ser/buildOrder", data, {
- headers: this.headers,
- });
- }
- //获取当前用户信息
- getCurrentUser1() {
- return this.http.get(host.host + "/user/data/getCurrentUser", {
- headers: this.headers,
- });
- }
- //获取通话记录音频地址
- getCallLogPath(data) {
- return this.http.post(host.host + "/callLog/getRecordByPath", data, {
- headers: this.headers,
- });
- }
- //根据工作分配和人员id获取科室信息
- getDeptByUser(data) {
- return this.http.post(host.host + "/api/getDeptByUser", data, {
- headers: this.headers,
- });
- }
- //根据工作分配和分组id获取科室信息
- getDeptByGroup(data) {
- return this.http.post(host.host + "/api/getDeptByGroup", data, {
- headers: this.headers,
- });
- }
- //微信配置修改
- changeWechatConfig(data) {
- return this.http.post(
- host.host + "/simple/data/addData/wechatConfig",
- data,
- { headers: this.headers }
- );
- }
- //系统配置修改
- changeSysConfig(data) {
- return this.http.post(
- host.host + "/simple/data/addListData/systemConfiguration",
- data,
- { headers: this.headers }
- );
- }
- //护士端关注接口
- changeFollow(data) {
- return this.http.post(host.host + "/nurse/updData/patient", data, {
- headers: this.headers,
- });
- }
- //数据字典楼栋保存接口
- saveBuildingList(data) {
- return this.http.post(
- host.host + "/simple/data/addListData/building",
- data,
- { headers: this.headers }
- );
- }
- //数据字典楼栋删除接口
- delBuildingList(data) {
- return this.http.post(host.host + "/simple/data/rmvData/building", data, {
- headers: this.headers,
- });
- }
- //数据字典楼层保存接口
- saveFloorList(data) {
- return this.http.post(host.host + "/simple/data/addListData/floor", data, {
- headers: this.headers,
- });
- }
- //数据字典楼层保存接口
- delFloorList(data) {
- return this.http.post(host.host + "/simple/data/rmvData/floor", data, {
- headers: this.headers,
- });
- }
- //获取患者最近一条检查信息
- getRecentInfo(data) {
- return this.http.post(
- host.host + "/nurse/workOrder/findInspectRecently",
- data,
- { headers: this.headers }
- );
- }
- //simple增删改查,addData新增,addListData批量新增
- simplePost(coop, type, data): any {
- return this.http.post(
- host.host + "/simple/data/" + coop + "/" + type,
- data,
- { headers: this.headers }
- );
- }
- //任务类型列表排序
- sortTaskType(data): any {
- return this.http.post(host.host + "/configuration/setOrders", data, {
- headers: this.headers,
- });
- }
- //获取工单详情里的历史记录
- getWorkOrderRecord(data): any {
- return this.http.post(host.host + "/workerOrder/getWorkOrderRecord", data, {
- headers: this.headers,
- });
- }
- //刷新字典缓存
- refreshDic(): any {
- return this.http.post(
- host.host + "/common/common/refreshCache",
- {},
- { headers: this.headers }
- );
- }
- //调度台建单获取可搜索的任务类型列表
- getTaskTypeBySearchKey(data): any {
- return this.http.post(host.host + "/ser/getTaskTypeBySearchKey", data, {
- headers: this.headers,
- });
- }
- //切换院区
- changeHospital(data): any {
- return this.http.post(host.host + "/auth/changeHospital", data, {
- headers: this.headers,
- });
- }
- //刷新缓存
- refreshTaskType(): any {
- return this.http.get(host.host + "/ser/refreshTaskType", {
- headers: this.headers,
- });
- }
- //楼栋配置保存接口
- saveBuildings(data) {
- return this.http.post(
- host.host + "/simple/data/addListData/workOrderGradeBuilding",
- data,
- { headers: this.headers }
- );
- }
- //删除接口
- delBuildings(data) {
- return this.http.post(
- host.host + "/simple/data/rmvData/workOrderGradeBuilding",
- data,
- { headers: this.headers }
- );
- }
- //获取配置文件的接口
- systemConfiguration(data) {
- return this.http.post(
- host.host + "/simple/data/fetchDataList/systemConfiguration",
- data,
- { headers: this.headers }
- );
- }
- //检查信息,患者信息
- listMsgByMain(type, data) {
- return this.http.post(host.host + "/nurse/" + type, data, {
- headers: this.headers,
- });
- }
- //院区系统配置修改
- changeHospitalSysConfig(data) {
- return this.http.post(
- host.host + "/simple/data/addListData/hospitalConfig",
- data,
- { headers: this.headers }
- );
- }
- //护士端获取综合日志
- listDeptOrderRecord(data) {
- return this.http.post(host.host + "/nurse/listDeptOrderRecord", data, {
- headers: this.headers,
- });
- }
- //自动同步国家法定节假日
- syncWorkDay(data) {
- return this.http.post(host.host + "/configuration/syncWorkDay", data, {
- headers: this.headers,
- });
- }
- //删除用户(包含企业微信用户)
- rmvDataAndWeChatNum(data, flag) {
- return this.http.post(
- host.host + "/user/data/rmvDataAndWeChatNum/" + flag,
- data,
- {
- headers: this.headers,
- }
- );
- }
- }
|