@ray-js/lamp-schedule-core 1.0.4-beta-9 → 1.0.4-beta-10
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.
|
@@ -175,7 +175,8 @@ export const getTimerListWithFlush = (dispatch, actions) => {
|
|
|
175
175
|
const onDpChangeFn = data => {
|
|
176
176
|
var _data$dps;
|
|
177
177
|
// 专门处理 timer_report dp 变化
|
|
178
|
-
|
|
178
|
+
const timerReportId = 38;
|
|
179
|
+
if (data !== null && data !== void 0 && (_data$dps = data.dps) !== null && _data$dps !== void 0 && _data$dps[timerReportId]) {
|
|
179
180
|
var _data$dps2;
|
|
180
181
|
const {
|
|
181
182
|
rtcTimerList = []
|
|
@@ -184,9 +185,13 @@ const onDpChangeFn = data => {
|
|
|
184
185
|
actions,
|
|
185
186
|
dispatch
|
|
186
187
|
} = getTimerReducer();
|
|
187
|
-
const dpValue = data === null || data === void 0 || (_data$dps2 = data.dps) === null || _data$dps2 === void 0 ? void 0 : _data$dps2[
|
|
188
|
+
const dpValue = data === null || data === void 0 || (_data$dps2 = data.dps) === null || _data$dps2 === void 0 ? void 0 : _data$dps2[timerReportId];
|
|
188
189
|
const dpParsedValue = timerReportParser.parser(dpValue);
|
|
189
|
-
|
|
190
|
+
// 如果 timerReport 有删除id,需要同步删除对应的 rtcTimerList
|
|
191
|
+
const rtcTimerListFiltered = rtcTimerList.filter(item => {
|
|
192
|
+
return dpParsedValue === null || dpParsedValue === void 0 ? void 0 : dpParsedValue.find(i => +i.id === +item.timerId);
|
|
193
|
+
});
|
|
194
|
+
const timerList = rtcTimerListFiltered.map(item => {
|
|
190
195
|
var _dpParsedValue$find$s, _dpParsedValue$find;
|
|
191
196
|
return _objectSpread(_objectSpread({}, item), {}, {
|
|
192
197
|
status: (_dpParsedValue$find$s = dpParsedValue === null || dpParsedValue === void 0 || (_dpParsedValue$find = dpParsedValue.find(i => +i.id === +item.timerId)) === null || _dpParsedValue$find === void 0 ? void 0 : _dpParsedValue$find.status) !== null && _dpParsedValue$find$s !== void 0 ? _dpParsedValue$find$s : false
|