wujingjing
2024-04-22 f106e4dffb8279cb90726e83e7edd631f4c77699
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
import { ElMessage } from 'element-plus';
import request from '/@/utils/request';
 
/**
 * @summary 获取状态KPI信息
 */
export const GetStatusKpiInfoStd = async (req: any = request) => {
    return req({
        url: '/Phm/Status/Preview/GetStatusKpiInfo@V1.0',
        method: 'GET',
    });
};
 
/**
 * 获取状态KPI信息
 * 报错时返回 undefined
 * @returns
 */
export const getStatusKpiInfoStd = async (req: any = request) => {
    const res = await GetStatusKpiInfoStd(req).catch(() => {
        return undefined;
    });
 
    if (res?.Code === 0) {
        const resData = res.Data as any;
        return resData;
    } else {
        ElMessage.error('获取KPI信息失败' + (res?.Message ? `,${JSON.stringify(res.Message)}` : ''));
        return undefined;
    }
};
 
/**
 * @summary 获取设备状态列表
 */
export const GetEquipmentStatusListStd = async (params, req: any = request) => {
    return req({
        url: '/Phm/Status/Preview/GetEquipmentStatusList@V1.0',
        method: 'GET',
        params,
    });
};
 
/**
 * 获取设备状态列表
 * 报错时返回 undefined
 * @returns
 */
export const getEquipmentStatusListStd = async (params, req: any = request) => {
    const res = await GetEquipmentStatusListStd(params, req).catch(() => {
        return undefined;
    });
 
    if (res?.Code === 0) {
        const resData = (res.Data || []) as any[];
        return resData;
    } else {
        ElMessage.error('获取设备状态失败' + (res?.Message ? `,${JSON.stringify(res.Message)}` : ''));
        return undefined;
    }
};
 
/**
 * @summary 获取预警数量
 */
export const GetTrendAlarmCountListStd = async (params, req: any = request) => {
    return req({
        url: '/Phm/Status/Preview/GetTrendAlarmCountList@V1.0',
        method: 'GET',
        params,
    });
};
 
/**
 * 获取预警数量
 * 报错时返回 undefined
 * @returns
 */
export const getTrendAlarmCountListStd = async (params, req: any = request) => {
    const res = await GetTrendAlarmCountListStd(params, req).catch(() => {
        return undefined;
    });
 
    if (res?.Code === 0) {
        const resData = (res.Data || []) as any[];
        return resData;
    } else {
        ElMessage.error('获取预警数量失败' + (res?.Message ? `,${JSON.stringify(res.Message)}` : ''));
        return undefined;
    }
};
 
/**
 * @summary 获取故障报警列表
 */
export const GetFaultAlarmCountListStd = async (params, req: any = request) => {
    return req({
        url: '/Phm/Status/Preview/GetFaultAlarmCountList@V1.0',
        method: 'GET',
        params,
    });
};
 
/**
 * 获取故障报警列表
 * 报错时返回 undefined
 * @returns
 */
export const getFaultAlarmCountListStd = async (params, req: any = request) => {
    const res = await GetFaultAlarmCountListStd(params, req).catch(() => {
        return undefined;
    });
 
    if (res?.Code === 0) {
        const resData = (res.Data || []) as any[];
        return resData;
    } else {
        ElMessage.error('获取故障报警列表失败' + (res?.Message ? `,${JSON.stringify(res.Message)}` : ''));
        return undefined;
    }
};
 
/**
 * @summary 获取故障诊断数量列表
 */
export const GetFaultDiagnosisCountListStd = async (params, req: any = request) => {
    return req({
        url: '/Phm/Status/Preview/GetFaultDiagnosisCountList@V1.0',
        method: 'GET',
        params,
    });
};
 
/**
 * 获取故障诊断数量列表
 * 报错时返回 undefined
 * @returns
 */
export const getFaultDiagnosisCountListStd = async (params, req: any = request) => {
    const res = await GetFaultDiagnosisCountListStd(params, req).catch(() => {
        return undefined;
    });
 
    if (res?.Code === 0) {
        const resData = (res.Data || []) as any[];
        return resData;
    } else {
        ElMessage.error('获取故障诊断数量失败' + (res?.Message ? `,${JSON.stringify(res.Message)}` : ''));
        return undefined;
    }
};