|
@@ -6,7 +6,7 @@ import { getUserInfo, setQueryConfig } from '@/utils'
|
|
|
import { duoduoenvService, objectService, setupService, testApi, weachatService } from '@/config'
|
|
|
|
|
|
const comInfo = getUserInfo()
|
|
|
-const comParams: string = setQueryConfig(comInfo)
|
|
|
+const comParams: string = ""
|
|
|
|
|
|
// https://sagacare-h5.tenants.link/api/company/config/245e7060643811eb934c0237aedb39a6
|
|
|
export const getCompanyInfo = (companyInfo: RequestParams) => {
|
|
@@ -16,70 +16,65 @@ export const getWeather = (params: string) => {
|
|
|
return https().request<RootWeatherObject<OutherWeather>>(`${objectService}weather/getCurrent?${params}`, Method.GET, undefined, ContentType.json)
|
|
|
}
|
|
|
export const getSpaceInfo = (data: any) => {
|
|
|
- return https().request<RootWeatherObject<SpaceModel>>(`${duoduoenvService}space/property?${comParams}`, Method.POST, data, ContentType.json)
|
|
|
+ return https().request<RootWeatherObject<SpaceModel>>(`${duoduoenvService}space/property`, Method.POST, data, ContentType.json)
|
|
|
}
|
|
|
|
|
|
// 获取会议室场景
|
|
|
export const getMeetingSceneHttp = (params: any) => {
|
|
|
- return https().request<any>(`${duoduoenvService}meeting/room/scene/getMeetingScene/V2?${comParams}&spaceId=${params.spaceId}`, Method.GET, undefined, ContentType.json)
|
|
|
+ return https().request<any>(`${duoduoenvService}meeting/room/scene/getMeetingScene/V2?spaceId=${params.spaceId}`, Method.GET, undefined, ContentType.json)
|
|
|
}
|
|
|
// 获取设备信息
|
|
|
export const getEquipmentListHttp = (params: any) => {
|
|
|
- return https().request<any>(`${duoduoenvService}object/equipment/findForServe?${comParams}&spaceId=${params.spaceId}`, Method.POST, undefined, ContentType.json)
|
|
|
+ return https().request<any>(`${duoduoenvService}object/equipment/findForServe?spaceId=${params.spaceId}`, Method.POST, undefined, ContentType.json)
|
|
|
}
|
|
|
// 查询定制时间
|
|
|
export const getSetTimeHttp = (params: any) => {
|
|
|
- return https().request<any>(`${duoduoenvService}customScene/queryCustom?${comParams}&spaceId=${params.spaceId}`, Method.GET, undefined, ContentType.json)
|
|
|
+ return https().request<any>(`${duoduoenvService}customScene/queryCustom?spaceId=${params.spaceId}`, Method.GET, undefined, ContentType.json)
|
|
|
}
|
|
|
// 空调 - 调节文案/空调信息
|
|
|
export const getFeedbackDocumentsHttp = (data: any) => {
|
|
|
- return https().request<any>(`${duoduoenvService}custom/feedback/documents?${comParams}`, Method.POST, data, ContentType.json)
|
|
|
+ return https().request<any>(`${duoduoenvService}custom/feedback/documents`, Method.POST, data, ContentType.json)
|
|
|
}
|
|
|
|
|
|
// 空调调节
|
|
|
export const changeTempHttp = (params: any) => {
|
|
|
- return https().request<RootObject<any>>(`${duoduoenvService}custom/feedbackCreate/v2?${comParams}`, Method.POST, params, ContentType.json)
|
|
|
+ return https().request<RootObject<any>>(`${duoduoenvService}custom/feedbackCreate/v2`, Method.POST, params, ContentType.json)
|
|
|
}
|
|
|
// 查询灯的状态(优先查采集的状态)
|
|
|
export const getLampHttp = (params: any) => {
|
|
|
- return https({ timeout: 1000 }).request<RootObject<any>>(`${duoduoenvService}light/status/query?${comParams}&spaceId=${params.spaceId}`, Method.GET, undefined, ContentType.json)
|
|
|
+ return https({ timeout: 1000 }).request<RootObject<any>>(`${duoduoenvService}light/status/query?spaceId=${params.spaceId}`, Method.GET, undefined, ContentType.json)
|
|
|
}
|
|
|
|
|
|
// 批量操作 灯
|
|
|
export const setallLampHttp = (data: any) => {
|
|
|
- // return https().httpClient.post<Array<any>>(`${duoduoenvService}light/onoff/set?${comParams}`, data)
|
|
|
return post(`${duoduoenvService}light/onoff/set?${comParams}`, data)
|
|
|
}
|
|
|
// 设置窗帘
|
|
|
export const setEquipeHttp = (data: any) => {
|
|
|
- // return https().httpClient.post<Array<any>>(`${duoduoenvService}object/eqp/infocode/set?${comParams}`, data)
|
|
|
- return post(`${duoduoenvService}object/eqp/infocode/set?${comParams}`, data)
|
|
|
+ return post(`${duoduoenvService}object/eqp/infocode/set`, data)
|
|
|
}
|
|
|
|
|
|
// 指令失败的时候轮询查询灯的状态
|
|
|
export const getStatusHttp = (data: any) => {
|
|
|
- // return https().request<RootObject<any>>(`${duoduoenvService}light/onoff/setSatus?${comParams}`, Method.POST, params, ContentType.json)
|
|
|
- // return https().httpClient.post<Array<any>>(`${duoduoenvService}light/onoff/setSatus?${comParams}`, data)
|
|
|
- return post(`${duoduoenvService}light/onoff/setSatus?${comParams}`, data)
|
|
|
+ return post(`${duoduoenvService}light/onoff/setSatus`, data)
|
|
|
}
|
|
|
|
|
|
// 获取窗帘数据列表
|
|
|
export const getObjectDataEqpGroupHttp = (params: any) => {
|
|
|
- return https().request<RootObject<any>>(`${duoduoenvService}object/objectDataEqpGroup/query?${comParams}`, Method.POST, params, ContentType.json)
|
|
|
+ return https().request<RootObject<any>>(`${duoduoenvService}object/objectDataEqpGroup/query`, Method.POST, params, ContentType.json)
|
|
|
}
|
|
|
|
|
|
// 切换场景
|
|
|
export const switchoverSceneHttp = (params: any) => {
|
|
|
- return https().request<RootObject<any>>(`${duoduoenvService}meeting/room/scene/switchover?${comParams}`, Method.POST, params, ContentType.json)
|
|
|
+ return https().request<RootObject<any>>(`${duoduoenvService}meeting/room/scene/switchover`, Method.POST, params, ContentType.json)
|
|
|
}
|
|
|
|
|
|
export const changeSetTimeHttp = (params: any) => {
|
|
|
- return https().request<RootObject<any>>(`${duoduoenvService}customScene/create?${comParams}`, Method.POST, params, ContentType.json)
|
|
|
+ return https().request<RootObject<any>>(`${duoduoenvService}customScene/create`, Method.POST, params, ContentType.json)
|
|
|
}
|
|
|
// 详情页面的图表数据
|
|
|
export const getChartListHTTP = (params: any) => {
|
|
|
- // return https().request<RootObject<any>>(`${duoduoenvService}spaceAdjust/queryPropertyData?${comParams}&${params}`, Method.GET, undefined, ContentType.json)
|
|
|
- return https().request<RootObject<any>>(`/test1/spaceAdjust/queryPropertyData?${comParams}&${params}`, Method.GET, undefined, ContentType.json)
|
|
|
+ return https().request<RootObject<any>>(`/test1/spaceAdjust/queryPropertyData?${params}`, Method.GET, undefined, ContentType.json)
|
|
|
}
|
|
|
|
|
|
// 查询建筑的信息
|
|
@@ -132,35 +127,34 @@ export const permanentSpace = (params: any) => {
|
|
|
* 获取常驻空间
|
|
|
*/
|
|
|
export const getPermanentSpace = () => {
|
|
|
- // return https().request<any>(`${testApi}permanentSpace/query?${comParams}`, Method.GET, undefined, ContentType.json)
|
|
|
- return https().request<any>(`${setupService}permanentSpace/query?${comParams}`, Method.GET, undefined, ContentType.json)
|
|
|
+ return https().request<any>(`${setupService}permanentSpace/query`, Method.GET, undefined, ContentType.json)
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 删除常驻空间
|
|
|
*/
|
|
|
export const delPermanentSpace = (params: any) => {
|
|
|
- return https().request<any>(`${setupService}permanentSpace/delete?${comParams}&${params}`)
|
|
|
+ return https().request<any>(`${setupService}permanentSpace/delete?${params}`)
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 获取用户使用权限
|
|
|
*/
|
|
|
export const getUserControlAuth = () => {
|
|
|
- return https().request<any>(`${setupService}permanentSpace/queryZJ?${comParams}`, Method.GET, undefined, ContentType.json)
|
|
|
+ return https().request<any>(`${setupService}permanentSpace/queryZJ`, Method.GET, undefined, ContentType.json)
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 获取空间运行模式
|
|
|
*/
|
|
|
export const getSpaceMode = () => {
|
|
|
- return https().request<any>(`${objectService}object/equipment/querySpaceModeSet?${comParams}`, Method.GET, undefined, ContentType.json)
|
|
|
+ return https().request<any>(`${objectService}object/equipment/querySpaceModeSet`, Method.GET, undefined, ContentType.json)
|
|
|
}
|
|
|
/**
|
|
|
* 获取空调设备温度
|
|
|
*/
|
|
|
export const getSpaceTemp = () => {
|
|
|
- return https().request<any>(`${objectService}object/equipment/querySpaceTempSet?${comParams}`, Method.GET, undefined, ContentType.json)
|
|
|
+ return https().request<any>(`${objectService}object/equipment/querySpaceTempSet`, Method.GET, undefined, ContentType.json)
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -169,14 +163,14 @@ export const getSpaceTemp = () => {
|
|
|
* @returns
|
|
|
*/
|
|
|
export const querySpaceSceneConfig = (params: any) => {
|
|
|
- return https().request<any>(`${setupService}scene/querySpaceSceneConfig?${comParams}&${params}`, Method.GET, undefined, ContentType.json)
|
|
|
+ return https().request<any>(`${setupService}scene/querySpaceSceneConfig?${params}`, Method.GET, undefined, ContentType.json)
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 查询加班记录
|
|
|
*/
|
|
|
export const queryCustomAndScence = (params: any) => {
|
|
|
- return https().request<any>(`${duoduoenvService}customScene/queryCustomAndScence?${comParams}&${params}`, Method.GET, undefined, ContentType.json)
|
|
|
+ return https().request<any>(`${duoduoenvService}customScene/queryCustomAndScence?${params}`, Method.GET, undefined, ContentType.json)
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -184,42 +178,42 @@ export const queryCustomAndScence = (params: any) => {
|
|
|
* @param params
|
|
|
*/
|
|
|
export const saveBatchCustomScene = (data: any) => {
|
|
|
- return post(`${duoduoenvService}customScene/saveBatchCustomScene?${comParams}`, data)
|
|
|
+ return post(`${duoduoenvService}customScene/saveBatchCustomScene`, data)
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 查询默认位置
|
|
|
*/
|
|
|
export const getDefaultLocation = (params: any) => {
|
|
|
- return https().request<any>(`${testApi}padSpace/getDefaultLocation?${comParams}&${params}`, Method.GET, undefined, ContentType.json)
|
|
|
+ return https().request<any>(`${testApi}padSpace/getDefaultLocation?${params}`, Method.GET, undefined, ContentType.json)
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 查询空间列表
|
|
|
*/
|
|
|
export const getPadSpaceList = (params: any) => {
|
|
|
- return https().request<any>(`${testApi}padSpace/getPadSpaceList?${comParams}&${params}`, Method.GET, undefined, ContentType.json)
|
|
|
+ return https().request<any>(`${testApi}padSpace/getPadSpaceList?${params}`, Method.GET, undefined, ContentType.json)
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 设置成办公空间
|
|
|
*/
|
|
|
export const saveWorkSpace = (params: any) => {
|
|
|
- return https().request<any>(`${testApi}padSpace/saveWorkSpace?${comParams}`, Method.POST, params, ContentType.json)
|
|
|
+ return https().request<any>(`${testApi}padSpace/saveWorkSpace`, Method.POST, params, ContentType.json)
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 查询平板下面的办公空间
|
|
|
*/
|
|
|
export const queryWorkSpace = (params: any) => {
|
|
|
- return https().request<any>(`${testApi}padSpace/queryWorkSpace?${comParams}`, Method.POST, params, ContentType.json)
|
|
|
+ return https().request<any>(`${testApi}padSpace/queryWorkSpace`, Method.POST, params, ContentType.json)
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 查询客户列表
|
|
|
*/
|
|
|
export const queryCustomerservice = (params: any) => {
|
|
|
- return https().request<RootObject<any>>(`${weachatService}/wechat-service-duoduoenv/duoduoenv/customerservice/query?${comParams}`, Method.POST, params, ContentType.json)
|
|
|
+ return https().request<RootObject<any>>(`${weachatService}/wechat-service-duoduoenv/duoduoenv/customerservice/query`, Method.POST, params, ContentType.json)
|
|
|
}
|
|
|
|
|
|
|