easy3wui 1.5.89-beta9 → 1.5.89

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.
@@ -683,7 +683,7 @@ var Easy3wFormPagePC = exports.Easy3wFormPagePC = function (_Component) {
683
683
  var strValue = value;
684
684
  value = _comonConfig.dataDesensitizationFlag ? dataDesensitizationEyeFlag ? value : (0, _easy3wui.Easy3wGetDesensitization)(value) : value;
685
685
  if (fieldType === 'mobile' && value) {
686
- var e3wMobileNation = _this.fetchMobileInfo(strValue, fieldId);
686
+ var e3wMobileNation = _this.fetchMobileInfo(strValue, fieldId) || '+86';
687
687
  value = e3wMobileNation ? e3wMobileNation + ' ' + value : value;
688
688
  // console.log('valuevaluevaluevalue', value, e3wMobileNation);
689
689
  }
@@ -1390,15 +1390,20 @@ var Easy3wFormPagePC = exports.Easy3wFormPagePC = function (_Component) {
1390
1390
  }, _this.getColItem = function (colObj, formItemLayout, disableCheckFlag) {
1391
1391
  var allReadFlag = _this.props.allReadFlag;
1392
1392
  var fieldType = colObj.fieldType,
1393
- readFlag = colObj.readFlag,
1394
1393
  disableFlag = colObj.disableFlag,
1395
1394
  cmptPros = colObj.cmptPros;
1395
+ var readFlag = colObj.readFlag;
1396
1396
 
1397
1397
  var _ref6 = cmptPros || {},
1398
1398
  disabled = _ref6.disabled,
1399
1399
  templateArray = _ref6.templateArray,
1400
1400
  isRead = _ref6.isRead;
1401
1401
 
1402
+ var isApprovalFlag = document.body.innerHTML.includes('data-e3wpagetype="approval"');
1403
+ if (isApprovalFlag && disableFlag && (fieldType === 'input' || fieldType === 'textarea' || fieldType === 'checkBox' || fieldType === 'radio')) {
1404
+ colObj.readFlag = true;
1405
+ readFlag = true;
1406
+ }
1402
1407
  var itemArea = _this.getItemArea(colObj);
1403
1408
  var itemValue = _this.getItemValue(colObj);
1404
1409
  var afterBtns = _this.getAfterBtn(colObj);
@@ -1652,7 +1657,8 @@ var Easy3wFormPagePC = exports.Easy3wFormPagePC = function (_Component) {
1652
1657
  required = item.required,
1653
1658
  _item$cmptPros4 = item.cmptPros,
1654
1659
  cmptPros = _item$cmptPros4 === undefined ? {} : _item$cmptPros4,
1655
- value = item.value;
1660
+ value = item.value,
1661
+ readFlag = item.readFlag;
1656
1662
  var disabled = cmptPros.disabled;
1657
1663
 
1658
1664
  var addonBeforeCmptPros = item.addonBeforeCmptPros || {};
@@ -1666,18 +1672,18 @@ var Easy3wFormPagePC = exports.Easy3wFormPagePC = function (_Component) {
1666
1672
  disabled: disabled
1667
1673
  }, addonBeforeCmptPros)
1668
1674
  });
1669
- var strMobileAssociation = '+86';
1675
+ var strMobileAssociation = '';
1670
1676
  if (value) {
1671
- strMobileAssociation = _this.fetchMobileInfo(value, fieldId);
1677
+ strMobileAssociation = _this.fetchMobileInfo(value, fieldId) || '+86';
1672
1678
  // value = e3wMobileNation ? `${e3wMobileNation} ${value}` : value;
1673
1679
  // console.log('valuevaluevaluevalue', value, e3wMobileNation);
1674
1680
  }
1675
1681
  var decoratorObj = {
1676
1682
  rules: [{ required: required, message: '请选择区号' }],
1677
- initialValue: strMobileAssociation
1683
+ initialValue: readFlag ? 'easy3wView' : strMobileAssociation
1678
1684
  };
1679
1685
  return _react2['default'].createElement(_input2['default'], (0, _extends3['default'])({
1680
- addonBefore: _this.props.form.getFieldDecorator(fieldId + 'AddonBefore', (0, _extends3['default'])({}, decoratorObj))(itemArea),
1686
+ addonBefore: _this.props.form.getFieldDecorator(readFlag ? fieldId + 'AddonBeforeEasy3wView' : fieldId + 'AddonBefore', (0, _extends3['default'])({}, decoratorObj))(itemArea),
1681
1687
  onBlur: function onBlur(e) {
1682
1688
  return _this.onBlurMobile(e, fieldId);
1683
1689
  }
@@ -1708,6 +1714,7 @@ var Easy3wFormPagePC = exports.Easy3wFormPagePC = function (_Component) {
1708
1714
  xhr.send(data); // 发送请求
1709
1715
  }
1710
1716
  }, _this.fetchMobileInfo = function (value, fieldId) {
1717
+ var e3wMobileNation = void 0;
1711
1718
  if (_comonConfig.easy3w4fMobileLibFetchUrl) {
1712
1719
  // 同步请求,直接返回查询到的 e3wMobileNation(而非 Promise)
1713
1720
  var cacheKey = fieldId + '-' + value;
@@ -1715,7 +1722,6 @@ var Easy3wFormPagePC = exports.Easy3wFormPagePC = function (_Component) {
1715
1722
  // 已查询过,直接返回缓存结果
1716
1723
  return _this[cacheKey];
1717
1724
  }
1718
- var e3wMobileNation = void 0;
1719
1725
  var xhr = new XMLHttpRequest();
1720
1726
  xhr.open('POST', _comonConfig.easy3w4fMobileLibFetchUrl, false); // 同步请求
1721
1727
  xhr.setRequestHeader('Content-Type', 'application/json'); // 设置请求头
@@ -1739,8 +1745,9 @@ var Easy3wFormPagePC = exports.Easy3wFormPagePC = function (_Component) {
1739
1745
  // 缓存结果,避免重复请求
1740
1746
  _this[cacheKey] = e3wMobileNation;
1741
1747
  // 直接返回数据
1742
- return e3wMobileNation;
1743
1748
  }
1749
+ e3wMobileNation = e3wMobileNation || '+86';
1750
+ return e3wMobileNation;
1744
1751
  }, _this.selectHandler = function (item) {
1745
1752
  var cmptPros = item.cmptPros;
1746
1753
  var optionLst = cmptPros.optionLst;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easy3wui",
3
- "version": "1.5.89-beta9",
3
+ "version": "1.5.89",
4
4
  "description": "easy3wui components for react",
5
5
  "keywords": [
6
6
  "react",