dolphin-weex-bc 0.0.28 → 0.0.30

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,15 @@
1
1
  # 升级日志
2
+
3
+ ## 0.0.30
4
+
5
+ - [ ! ] 耗材组件getAllMaterialList(),getMaterialList()增加识别是否colmo
6
+ - [ ! ] date: 2026/01/26
7
+
8
+ ## 0.0.29
9
+
10
+ - [ ! ] 耗材业务组件解决多个家庭时后端返回排序不一致问题(前端兼容根据家庭排序)
11
+ - [ ! ] date: 2026/01/23
12
+
2
13
  ## 0.0.28
3
14
 
4
15
  - [ ! ] colmo耗材组件,修复服务按钮显示错误问题
@@ -2777,6 +2777,7 @@ var MaterialEvent = {
2777
2777
  _this6.needOptimize = options.needOptimize;
2778
2778
  _this6.deviceMaterialList = [];
2779
2779
  _this6.sort = options.sort;
2780
+ isColmo = params.appId == 12017;
2780
2781
  return _context2.abrupt('return', new Promise(function () {
2781
2782
  var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(resolve, reject) {
2782
2783
  var homeGroupId, deviceList;
@@ -2826,7 +2827,7 @@ var MaterialEvent = {
2826
2827
  };
2827
2828
  }()));
2828
2829
 
2829
- case 7:
2830
+ case 8:
2830
2831
  case 'end':
2831
2832
  return _context2.stop();
2832
2833
  }
@@ -2848,6 +2849,7 @@ var MaterialEvent = {
2848
2849
  _this7.needBackground = options.needBackground;
2849
2850
  _this7.deviceMaterialList = [];
2850
2851
  _this7.sort = options.sort;
2852
+ isColmo = params.appId == 12017;
2851
2853
  return _context4.abrupt('return', new Promise(function () {
2852
2854
  var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(resolve, reject) {
2853
2855
  var deviceList, res;
@@ -2911,7 +2913,7 @@ var MaterialEvent = {
2911
2913
  };
2912
2914
  }()));
2913
2915
 
2914
- case 7:
2916
+ case 8:
2915
2917
  case 'end':
2916
2918
  return _context4.stop();
2917
2919
  }
@@ -3073,16 +3075,29 @@ var MaterialEvent = {
3073
3075
  case 7:
3074
3076
  allData = res.data;
3075
3077
  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;
3078
+ // allData.forEach(item1 => {
3079
+ // console.log('item444=====2' + JSON.stringify(item1.homeGroupId))
3080
+ // if (item1.applianceConsumablesList.length > 0) {
3081
+ // item1.applianceConsumablesList.forEach(item => {
3082
+ // item.homeGroupId = item1.homeGroupId
3083
+ // })
3084
+ // result = result.concat(item1.applianceConsumablesList)
3085
+ // }
3086
+ // })
3087
+ // 因为在多家庭的情况下后端可能对返回数据出现不一样的问题,前端做下兼容,默认跟家庭一致,加一层针对家庭的循环
3088
+
3089
+ if (params.homeGroupInfoList && params.homeGroupInfoList.length >= 1) {
3090
+ params.homeGroupInfoList.forEach(function (item) {
3091
+ allData.forEach(function (item1) {
3092
+ if (item.homegroupId == item1.homeGroupId && item1.applianceConsumablesList.length > 0) {
3093
+ item1.applianceConsumablesList.forEach(function (item2) {
3094
+ item2.homeGroupId = item1.homeGroupId;
3095
+ });
3096
+ result = result.concat(item1.applianceConsumablesList);
3097
+ }
3082
3098
  });
3083
- result = result.concat(item1.applianceConsumablesList);
3084
- }
3085
- });
3099
+ });
3100
+ }
3086
3101
  console.log('合并后数组3333===1' + JSON.stringify(result));
3087
3102
 
3088
3103
  if (!(result && result.length == 0)) {
@@ -3390,7 +3405,6 @@ var MaterialEvent = {
3390
3405
  var it = _step.value;
3391
3406
 
3392
3407
  console.log('consumables===it:1' + JSON.stringify(it));
3393
- if (it.model === 'null' || it.model === '/') it.model = ''; //兜底某些数据返回异常字符串
3394
3408
  if (isColmo) {
3395
3409
  it.chartData = _this15.setChartDataColmo(it);
3396
3410
  continue;
@@ -3444,7 +3458,7 @@ var MaterialEvent = {
3444
3458
  break;
3445
3459
  }
3446
3460
 
3447
- return _context13.abrupt('return', _this15.handleMaterialSeviceTypeColmo());
3461
+ return _context13.abrupt('return', _this15.handleMaterialSeviceType());
3448
3462
 
3449
3463
  case 5:
3450
3464
 
@@ -3819,23 +3833,6 @@ var MaterialEvent = {
3819
3833
  }
3820
3834
  },
3821
3835
 
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
3836
 
3840
3837
  // 对每一种设备按照consumables中余量从最少到多排列
3841
3838
  // 排序函数 - 处理 remainingValueType=4的情况
@@ -65725,7 +65722,8 @@ exports.default = {
65725
65722
  console.log('传入的耗材' + JSON.stringify(val));
65726
65723
 
65727
65724
  if (val.length > 0) {
65728
- this.handleChartData(val);
65725
+ this.deviceMaterialList = val;
65726
+ // this.handleChartData(val)
65729
65727
  setTimeout(function () {
65730
65728
  _this.handleRenderEnd();
65731
65729
  }, 200);
@@ -65867,17 +65865,19 @@ exports.default = {
65867
65865
  }))();
65868
65866
  },
65869
65867
  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;
65868
+ var _this5 = this;
65869
+
65870
+ var tempVal = JSON.parse(JSON.stringify(val));
65871
+ val.forEach(function (item) {
65872
+ item.consumables.forEach(function (it) {
65873
+ it.chartData = _index2.default.setChartData(it, {
65874
+ isDiablo: _this5.isDiablo,
65875
+ isScale: _this5.isScale,
65876
+ needBackground: _this5.needBackground
65877
+ });
65878
+ });
65879
+ });
65880
+ this.deviceMaterialList = tempVal;
65881
65881
  },
65882
65882
  setWavePercent: function setWavePercent(item) {
65883
65883
  return _index2.default.setWavePercent(item, this.isDiablo, this.needBackground);
@@ -66034,11 +66034,11 @@ exports.default = {
66034
66034
  }
66035
66035
  },
66036
66036
  handleRenderEnd: function handleRenderEnd() {
66037
- var _this5 = this;
66037
+ var _this6 = this;
66038
66038
 
66039
66039
  setTimeout(function () {
66040
- dom.getComponentRect(_this5.$refs.materialBox, function (data) {
66041
- _this5.$emit('renderEnd', data.size.height);
66040
+ dom.getComponentRect(_this6.$refs.materialBox, function (data) {
66041
+ _this6.$emit('renderEnd', data.size.height);
66042
66042
  });
66043
66043
  }, 200);
66044
66044
  }