dolphin-weex-bc 0.0.28 → 0.0.29

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/CHANGELOG.md CHANGED
@@ -1,4 +1,9 @@
1
1
  # 升级日志
2
+ ## 0.0.29
3
+
4
+ - [ ! ] 耗材业务组件解决多个家庭时后端返回排序不一致问题(前端兼容根据家庭排序)
5
+ - [ ! ] date: 2026/01/23
6
+
2
7
  ## 0.0.28
3
8
 
4
9
  - [ ! ] colmo耗材组件,修复服务按钮显示错误问题
@@ -3073,16 +3073,29 @@ var MaterialEvent = {
3073
3073
  case 7:
3074
3074
  allData = res.data;
3075
3075
  result = [];
3076
-
3077
- allData.forEach(function (item1) {
3078
- console.log('item444=====2' + JSON.stringify(item1.homeGroupId));
3079
- if (item1.applianceConsumablesList.length > 0) {
3080
- item1.applianceConsumablesList.forEach(function (item) {
3081
- item.homeGroupId = item1.homeGroupId;
3076
+ // allData.forEach(item1 => {
3077
+ // console.log('item444=====2' + JSON.stringify(item1.homeGroupId))
3078
+ // if (item1.applianceConsumablesList.length > 0) {
3079
+ // item1.applianceConsumablesList.forEach(item => {
3080
+ // item.homeGroupId = item1.homeGroupId
3081
+ // })
3082
+ // result = result.concat(item1.applianceConsumablesList)
3083
+ // }
3084
+ // })
3085
+ // 因为在多家庭的情况下后端可能对返回数据出现不一样的问题,前端做下兼容,默认跟家庭一致,加一层针对家庭的循环
3086
+
3087
+ if (params.homeGroupInfoList && params.homeGroupInfoList.length >= 1) {
3088
+ params.homeGroupInfoList.forEach(function (item) {
3089
+ allData.forEach(function (item1) {
3090
+ if (item.homegroupId == item1.homeGroupId && item1.applianceConsumablesList.length > 0) {
3091
+ item1.applianceConsumablesList.forEach(function (item2) {
3092
+ item2.homeGroupId = item1.homeGroupId;
3093
+ });
3094
+ result = result.concat(item1.applianceConsumablesList);
3095
+ }
3082
3096
  });
3083
- result = result.concat(item1.applianceConsumablesList);
3084
- }
3085
- });
3097
+ });
3098
+ }
3086
3099
  console.log('合并后数组3333===1' + JSON.stringify(result));
3087
3100
 
3088
3101
  if (!(result && result.length == 0)) {
@@ -3390,7 +3403,6 @@ var MaterialEvent = {
3390
3403
  var it = _step.value;
3391
3404
 
3392
3405
  console.log('consumables===it:1' + JSON.stringify(it));
3393
- if (it.model === 'null' || it.model === '/') it.model = ''; //兜底某些数据返回异常字符串
3394
3406
  if (isColmo) {
3395
3407
  it.chartData = _this15.setChartDataColmo(it);
3396
3408
  continue;
@@ -3444,7 +3456,7 @@ var MaterialEvent = {
3444
3456
  break;
3445
3457
  }
3446
3458
 
3447
- return _context13.abrupt('return', _this15.handleMaterialSeviceTypeColmo());
3459
+ return _context13.abrupt('return', _this15.handleMaterialSeviceType());
3448
3460
 
3449
3461
  case 5:
3450
3462
 
@@ -3819,23 +3831,6 @@ var MaterialEvent = {
3819
3831
  }
3820
3832
  },
3821
3833
 
3822
- // COLMO按钮类型 2保养换芯 3售后维修 4清洗服务
3823
- handleMaterialSeviceTypeColmo: function handleMaterialSeviceTypeColmo() {
3824
- this.deviceMaterialList.forEach(function (item, index) {
3825
- item.consumables.forEach(function (it) {
3826
- if (it.serviceSupport) {
3827
- if (it.serviceSupport && it.serviceSupport.bookingService && it.serviceSupport.bookingService.enable) {
3828
- it.btnType = 2;
3829
- if (it.serviceSupport.bookingService && it.serviceSupport.bookingService.serviceType == 2) {
3830
- it.btnType = 3;
3831
- }
3832
- } else if (it.serviceSupport && it.serviceSupport.washingService && it.serviceSupport.washingService.enable) {
3833
- it.btnType = 4;
3834
- }
3835
- }
3836
- });
3837
- });
3838
- },
3839
3834
 
3840
3835
  // 对每一种设备按照consumables中余量从最少到多排列
3841
3836
  // 排序函数 - 处理 remainingValueType=4的情况
@@ -65725,7 +65720,8 @@ exports.default = {
65725
65720
  console.log('传入的耗材' + JSON.stringify(val));
65726
65721
 
65727
65722
  if (val.length > 0) {
65728
- this.handleChartData(val);
65723
+ this.deviceMaterialList = val;
65724
+ // this.handleChartData(val)
65729
65725
  setTimeout(function () {
65730
65726
  _this.handleRenderEnd();
65731
65727
  }, 200);
@@ -65867,17 +65863,19 @@ exports.default = {
65867
65863
  }))();
65868
65864
  },
65869
65865
  handleChartData: function handleChartData(val) {
65870
- // let tempVal = JSON.parse(JSON.stringify(val))
65871
- // tempVal.forEach(item => {
65872
- // item.consumables.forEach(it => {
65873
- // it.chartData = MaterialEvent.setChartData(it, {
65874
- // isDiablo: this.isDiablo,
65875
- // isScale: this.isScale,
65876
- // needBackground: this.needBackground
65877
- // })
65878
- // })
65879
- // })
65880
- this.deviceMaterialList = val;
65866
+ var _this5 = this;
65867
+
65868
+ var tempVal = JSON.parse(JSON.stringify(val));
65869
+ val.forEach(function (item) {
65870
+ item.consumables.forEach(function (it) {
65871
+ it.chartData = _index2.default.setChartData(it, {
65872
+ isDiablo: _this5.isDiablo,
65873
+ isScale: _this5.isScale,
65874
+ needBackground: _this5.needBackground
65875
+ });
65876
+ });
65877
+ });
65878
+ this.deviceMaterialList = tempVal;
65881
65879
  },
65882
65880
  setWavePercent: function setWavePercent(item) {
65883
65881
  return _index2.default.setWavePercent(item, this.isDiablo, this.needBackground);
@@ -66034,11 +66032,11 @@ exports.default = {
66034
66032
  }
66035
66033
  },
66036
66034
  handleRenderEnd: function handleRenderEnd() {
66037
- var _this5 = this;
66035
+ var _this6 = this;
66038
66036
 
66039
66037
  setTimeout(function () {
66040
- dom.getComponentRect(_this5.$refs.materialBox, function (data) {
66041
- _this5.$emit('renderEnd', data.size.height);
66038
+ dom.getComponentRect(_this6.$refs.materialBox, function (data) {
66039
+ _this6.$emit('renderEnd', data.size.height);
66042
66040
  });
66043
66041
  }, 200);
66044
66042
  }