update: 大屏接口
This commit is contained in:
@@ -3,9 +3,12 @@ import { get, post } from '/@/api/request.ts';
|
||||
export enum Api {
|
||||
depart = '/health-watch/watch/watchDevice/getUnitList',
|
||||
getWatchDataByOrgCode = '/health-watch/watch/watchData/getWatchDataByOrgCode',
|
||||
|
||||
getWatchDataByOrgCodeNew = '/health-watch/watch/watchData/getWatchDataByOrgCode/v2',
|
||||
getMonitorList = '/health-watch/watch/watchMonitorData/getMonitorList',
|
||||
sleepApi = '/health-watch/watch/watchData/getSleep',
|
||||
stepApi = '/health-watch/watch/watchData/getSdc',
|
||||
stepNewApi = '/health-watch/watch/watchData/getSdc/v2',
|
||||
listCustom = 'health-watch/watch/watchMonitorData/listCustom',
|
||||
listCustomNew = 'health-watch/watch/watchMonitorData/largeScreen/listCustom',
|
||||
}
|
||||
@@ -16,12 +19,15 @@ export const allSecondaryDeparts = () => get(Api.depart);
|
||||
//左側
|
||||
export const getWatchDataByOrgCode = (params) => post(Api.getWatchDataByOrgCode, params);
|
||||
|
||||
export const getWatchDataByOrgCodeNew = (params) => post(Api.getWatchDataByOrgCodeNew, params);
|
||||
|
||||
//右-健康终端报警
|
||||
export const getMonitorList = (params: any) => get(Api.getMonitorList, params);
|
||||
// 右-睡眠
|
||||
export const getSleep = (params: any) => post(Api.sleepApi, params);
|
||||
// 右-步数
|
||||
export const getStep = (params: any) => post(Api.stepApi, params);
|
||||
export const getStepNew = (params: any) => post(Api.stepNewApi, params);
|
||||
|
||||
//副屏-预警
|
||||
export const getCustom = (params: any) => get(Api.listCustom, params);
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
import { onMounted, ref, watch } from 'vue';
|
||||
import { cloneDeep } from 'lodash-es';
|
||||
import ItemD from '/@/components/item-d/item-d.vue';
|
||||
import { getWatchDataByOrgCode } from '/@/components/secondaryScreen/commonApi.ts';
|
||||
import { getWatchDataByOrgCode, getWatchDataByOrgCodeNew } from '/@/components/secondaryScreen/commonApi.ts';
|
||||
import { useSpin } from '/@/components/body-d-left/bodyLeftHooks.ts';
|
||||
import { useSession, caching } from '/@/hooks/autoRefresh/caching.ts';
|
||||
|
||||
@@ -94,7 +94,8 @@
|
||||
async function init() {
|
||||
setSpin(true);
|
||||
try {
|
||||
const { code, result } = await getWatchDataByOrgCode(props);
|
||||
// const { code, result } = await getWatchDataByOrgCode(props);
|
||||
const { code, result } = await getWatchDataByOrgCodeNew(props);
|
||||
if (code == 200) {
|
||||
setValue(result);
|
||||
// setSession(PAGE2_LEFT, JSON.stringify(result));
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
import { useSpin } from '/@/components/body-d-left/bodyLeftHooks.ts';
|
||||
import { useStep } from '/@/components/secondaryScreen/screen-right/screenRightHooks.ts';
|
||||
import { screenPie } from '/@/components/item-d/pieCharts.ts';
|
||||
import { getStep } from '/@/components/secondaryScreen/commonApi.ts';
|
||||
import { getStep, getStepNew } from '/@/components/secondaryScreen/commonApi.ts';
|
||||
import { caching, useSession } from '/@/hooks/autoRefresh/caching.ts';
|
||||
|
||||
const props = defineProps({
|
||||
@@ -41,7 +41,8 @@
|
||||
orgCode: props.orgCode,
|
||||
type: props.type,
|
||||
};
|
||||
const { code, result } = await getStep(params);
|
||||
// const { code, result } = await getStep(params);
|
||||
const { code, result } = await getStepNew(params);
|
||||
if (code == 200) {
|
||||
setValue(result);
|
||||
setSession(PAGE2_RIGHT2, JSON.stringify(result));
|
||||
|
||||
Reference in New Issue
Block a user