nayota-show-sdk 1.3.37 → 1.3.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/energyCalculation.js +24 -1
- package/package.json +1 -1
package/api/energyCalculation.js
CHANGED
|
@@ -118,11 +118,34 @@ export function deleteMany(ids) {
|
|
|
118
118
|
})
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
+
/**
|
|
122
|
+
* 计算时间范围内的能耗数据
|
|
123
|
+
* @param {Object} data - 能耗计算数据
|
|
124
|
+
* @param {string} [data.startDate] - 开始日期
|
|
125
|
+
* @param {string} [data.endDate] - 结束日期
|
|
126
|
+
* @returns {Promise<Object>} 返回结果
|
|
127
|
+
* @returns {number} code - 返回码,0表示成功
|
|
128
|
+
* @returns {string} data - 提示词
|
|
129
|
+
* @example
|
|
130
|
+
* {
|
|
131
|
+
* "startDate": "2024-01-01",
|
|
132
|
+
* "endDate": "2024-01-31"
|
|
133
|
+
* }
|
|
134
|
+
*/
|
|
135
|
+
export function calculateRange(data) {
|
|
136
|
+
return requestShow({
|
|
137
|
+
url: '/energy-calculations/calculate-range',
|
|
138
|
+
method: 'post',
|
|
139
|
+
data
|
|
140
|
+
})
|
|
141
|
+
}
|
|
142
|
+
|
|
121
143
|
export default {
|
|
122
144
|
create,
|
|
123
145
|
list,
|
|
124
146
|
getOne,
|
|
125
147
|
updateOne,
|
|
126
148
|
deleteOne,
|
|
127
|
-
deleteMany
|
|
149
|
+
deleteMany,
|
|
150
|
+
calculateRange
|
|
128
151
|
}
|