fmui-base 2.0.59 → 2.0.61

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/lib/db/db.js CHANGED
@@ -987,6 +987,13 @@ context.create('portal', {
987
987
  duration: 800
988
988
  });
989
989
  }
990
+ },
991
+ // 移动应用保存更新点击次数接口
992
+ saveAppCount: {
993
+ mockUrl: 'query/saveAppCount.json',
994
+ url: _variables2.default.URLS.saveAppCount,
995
+ method: 'POST',
996
+ willFetch: function willFetch() {}
990
997
  }
991
998
  });
992
999
 
@@ -115,7 +115,8 @@ exports.default = {
115
115
  getNewHomePageTodoData: portalAllUrlPrefix + "getNewHomePageTodoData" + '?token=' + getLoginUserInfo().token,
116
116
  getNewHomePageCollectAppInfoList: portalAllUrlPrefix + "getNewHomePageCollectAppInfoList" + '?token=' + getLoginUserInfo().token,
117
117
  getNewHomePageRemindCount: portalAllUrlPrefix + "getNewHomePageRemindCount" + '?token=' + getLoginUserInfo().token,
118
- getComAppInfo: portalAllUrlPrefix + 'getComAppInfo?token=' + getLoginUserInfo().token //获取首页常用应用
118
+ getComAppInfo: portalAllUrlPrefix + 'getComAppInfo?token=' + getLoginUserInfo().token, //获取首页常用应用
119
+ saveAppCount: portalAllUrlPrefix + "saveAppCount" + '?token=' + getLoginUserInfo().token //移动应用保存更新点击次数接口
119
120
 
120
121
  },
121
122
  nodataIcon: context + "/mobile/fmui/images/noData.png",
@@ -187,9 +187,9 @@ var Page = function (_React$Component2) {
187
187
  //this.initData();
188
188
 
189
189
 
190
- /*// 子组件初始化
191
- initState() {
192
- }*/
190
+ /*// 子组件初始化
191
+ initState() {
192
+ }*/
193
193
 
194
194
  //初始化数据
195
195
 
@@ -109,6 +109,8 @@ var MyGrid = function (_React$Component) {
109
109
  if (item.portletCode == 'banner') {
110
110
  _this.setState(_defineProperty({}, item.portletCode + '_' + item.id, JSON.parse(item.personalSetting)));
111
111
  _this.getRemindCount();
112
+ } else if (item.portletCode == 'image') {
113
+ _this.setState(_defineProperty({}, item.portletCode + '_' + item.id, JSON.parse(item.personalSetting)));
112
114
  } else if (item.portletCode == 'cyyy') {
113
115
  t.getShoucangAppInfo(item.id);
114
116
  t.getComAppInfo(item.id);
@@ -221,6 +223,9 @@ var MyGrid = function (_React$Component) {
221
223
  bannerPicPath: '',
222
224
  activeIndex: 2,
223
225
  undo: 0, //待办数量
226
+ approveundo: 0, //审批数量
227
+ toBeAttendedCount: 0, //会议数量
228
+ unreadPubMailCount: 0, //未读公共邮件
224
229
  appOftenList: [], //常用应用
225
230
  collectAppInfoList: [], //收藏应用
226
231
  bssx: [], // 办事事项
@@ -286,10 +291,16 @@ var MyGrid = function (_React$Component) {
286
291
  value: function getRemindCount() {
287
292
  var _this2 = this;
288
293
 
289
- _db2.default.reactGrid.getNewHomePageRemindCount({ codes: "undo" }).then(function (content) {
290
- if (content.undo) {
294
+ _db2.default.reactGrid.getNewHomePageRemindCount({ codes: "undo,unreadMaild,unreadPubMail,toBeAttended" }).then(function (content) {
295
+ if (content.undo || content.approveundo || content.toBeAttendedCount || content.unreadPubMailCount) {
296
+ console.log('====================================');
297
+ console.log(content, 'contentcontentcontent');
298
+ console.log('====================================');
291
299
  _this2.setState({
292
- undo: content.undo
300
+ undo: content.undo,
301
+ approveundo: content.approveundo,
302
+ toBeAttendedCount: content.toBeAttendedCount,
303
+ unreadPubMailCount: content.unreadPubMailCount
293
304
  });
294
305
  }
295
306
  });
@@ -387,10 +398,13 @@ var MyGrid = function (_React$Component) {
387
398
 
388
399
  }, {
389
400
  key: 'newPageSkip',
390
- value: function newPageSkip(dingUrl, wxUrl, mhUrl, cocallUrl) {
401
+ value: function newPageSkip(dingUrl, wxUrl, mhUrl, cocallUrl, id) {
391
402
  var dingVal = "DING";
392
403
  var wxVal = "WX";
393
404
  var mhVal = "MH";
405
+ _db2.default.portal.saveAppCount({ mobileAppId: id }).then(function (content) {}).catch(function (err) {
406
+ console.log(err);
407
+ });
394
408
 
395
409
  var data = getLoginUserInfo();
396
410
  var thirdMenuType = data.thirdMenuType;
@@ -611,6 +625,11 @@ var MyGrid = function (_React$Component) {
611
625
  componentContent = _react2.default.createElement(
612
626
  'div',
613
627
  { className: 'react-grid-banner' },
628
+ _react2.default.createElement(
629
+ 'div',
630
+ { className: 'react-grid-banner-img' },
631
+ _react2.default.createElement('img', { src: pathUrl })
632
+ ),
614
633
  _react2.default.createElement(
615
634
  'div',
616
635
  { className: 'global-search' },
@@ -653,8 +672,8 @@ var MyGrid = function (_React$Component) {
653
672
  { className: 'react-grid-banner-item' },
654
673
  _react2.default.createElement(
655
674
  _Badge2.default,
656
- { count: item == 'daiban' ? t.state.undo : '' },
657
- _react2.default.createElement('i', { className: 'theme-color iconfont-ywtb ' + todoInfo.icon })
675
+ { count: item == 'daiban' ? t.state.undo : '', className: item + 'color' },
676
+ _react2.default.createElement('i', { className: 'iconfont-ywtb ' + todoInfo.icon })
658
677
  )
659
678
  ),
660
679
  _react2.default.createElement(
@@ -667,23 +686,24 @@ var MyGrid = function (_React$Component) {
667
686
  )
668
687
  );
669
688
  // backgroundImage直接判断有无会报错,单独return
670
- return _react2.default.createElement(
671
- 'div',
672
- { className: 'react-grid-component', key: item.id, style: {
673
- borderTopLeftRadius: _styleSetting.otherSet.radius.topLeft + 'px',
674
- borderTopRightRadius: _styleSetting.otherSet.radius.topRight + 'px',
675
- borderBottomLeftRadius: _styleSetting.otherSet.radius.bottomLeft + 'px',
676
- borderBottomRightRadius: _styleSetting.otherSet.radius.bottomRight + 'px',
677
- paddingLeft: _styleSetting.otherSet.paddingSet.pl + 'px',
678
- paddingright: _styleSetting.otherSet.paddingSet.pr + 'px',
679
- paddingTop: _styleSetting.otherSet.paddingSet.pt + 'px',
680
- paddingBottom: _styleSetting.otherSet.paddingSet.pb + 'px',
681
- backgroundColor: _styleSetting.otherSet.bgColor,
682
- backgroundImage: 'url(' + pathUrl + ')'
683
- } },
684
- _styleSetting.titleSet.titleStatus == 1 ? componentHead : '',
685
- componentContent
686
- );
689
+ {
690
+ return _react2.default.createElement(
691
+ 'div',
692
+ { className: 'react-grid-component banner', key: item.id, style: {
693
+ borderTopLeftRadius: _styleSetting.otherSet.radius.topLeft + 'px',
694
+ borderTopRightRadius: _styleSetting.otherSet.radius.topRight + 'px',
695
+ borderBottomLeftRadius: _styleSetting.otherSet.radius.bottomLeft + 'px',
696
+ borderBottomRightRadius: _styleSetting.otherSet.radius.bottomRight + 'px',
697
+ paddingLeft: _styleSetting.otherSet.paddingSet.pl + 'px',
698
+ paddingright: _styleSetting.otherSet.paddingSet.pr + 'px',
699
+ paddingTop: _styleSetting.otherSet.paddingSet.pt + 'px',
700
+ paddingBottom: _styleSetting.otherSet.paddingSet.pb + 'px',
701
+ backgroundColor: _styleSetting.otherSet.bgColor
702
+ } },
703
+ _styleSetting.titleSet.titleStatus == 1 ? componentHead : '',
704
+ componentContent
705
+ );
706
+ }
687
707
  }
688
708
  if (item.portletCode === 'cyyy') {
689
709
  componentContent = _react2.default.createElement(
@@ -709,7 +729,11 @@ var MyGrid = function (_React$Component) {
709
729
  _react2.default.createElement(
710
730
  'div',
711
731
  { className: 'iconblock t-iconBC' + ele.iconColor },
712
- _react2.default.createElement('i', { className: 'iconfont-ywtb icon-ywtb-' + ele.icon })
732
+ _react2.default.createElement(
733
+ _Badge2.default,
734
+ { count: ele.name == '会议' ? t.state.toBeAttendedCount * 1 : ele.name == '审批' ? t.state.approveundo : ele.name == '公共邮件' ? t.state.unreadPubMailCount * 1 : '' },
735
+ _react2.default.createElement('i', { className: 'iconfont-ywtb icon-ywtb-' + ele.icon })
736
+ )
713
737
  ),
714
738
  _react2.default.createElement(
715
739
  'p',
@@ -720,10 +744,10 @@ var MyGrid = function (_React$Component) {
720
744
  }),
721
745
  _react2.default.createElement(
722
746
  'div',
723
- { className: t.state[item.portletCode + '_' + item.id] && t.state[item.portletCode + '_' + item.id].length > 0 ? 'systemItem' : 't-DN', onClick: t.jumpPage.bind(this, "homepage/home/applistSetting", personalSetting.cols * 1, item.id) },
747
+ { className: t.state[item.portletCode + '_' + item.id] && t.state[item.portletCode + '_' + item.id].length > 0 ? 'systemItem' : 't-DN', onClick: t.jumpPage.bind(this, "/apppage/1", personalSetting.cols * 1, item.id) },
724
748
  _react2.default.createElement(
725
749
  'div',
726
- { className: 'iconblock t-iconBCred' },
750
+ { className: 'iconblock t-gengduo' },
727
751
  _react2.default.createElement('i', { className: 'iconfont-ywtb' + ' icon-ywtb-gengduo' })
728
752
  ),
729
753
  _react2.default.createElement(
@@ -755,7 +779,11 @@ var MyGrid = function (_React$Component) {
755
779
  _react2.default.createElement(
756
780
  'div',
757
781
  { className: 'iconblock t-iconBC' + ele.iconColor },
758
- _react2.default.createElement('i', { className: 'iconfont-ywtb icon-ywtb-' + ele.icon })
782
+ _react2.default.createElement(
783
+ _Badge2.default,
784
+ { count: ele.name == '会议' ? t.state.toBeAttendedCount * 1 : ele.name == '审批' ? t.state.approveundo : ele.name == '公共邮件' ? t.state.unreadPubMailCount * 1 : '' },
785
+ _react2.default.createElement('i', { className: 'iconfont-ywtb icon-ywtb-' + ele.icon })
786
+ )
759
787
  ),
760
788
  _react2.default.createElement(
761
789
  'p',
@@ -769,7 +797,7 @@ var MyGrid = function (_React$Component) {
769
797
  { className: 'systemItem', onClick: t.jumpPage.bind(this, "/appCollect") },
770
798
  _react2.default.createElement(
771
799
  'div',
772
- { className: 'iconblock t-iconBCred' },
800
+ { className: 'iconblock t-gengduo' },
773
801
  _react2.default.createElement('i', { className: 'iconfont-ywtb' + ' icon-ywtb-gengduo' })
774
802
  ),
775
803
  _react2.default.createElement(
@@ -788,13 +816,13 @@ var MyGrid = function (_React$Component) {
788
816
  );
789
817
  }
790
818
  if (item.portletCode === 'bssx') {
791
- var bssxShowList = personalSetting.showModule;
819
+ var bssxShowList = personalSetting.codes;
792
820
  // let styleSetting = JSON.parse(item.styleSetting)
793
821
 
794
- var perList = '';
822
+ var commonList = '';
795
823
  if (t.state[item.portletCode + '_' + item.id]) {
796
- if (t.state[item.portletCode + '_' + item.id].perList && t.state[item.portletCode + '_' + item.id].perList.length > 0) {
797
- perList = t.state[item.portletCode + '_' + item.id].perList.map(function (item) {
824
+ if (t.state[item.portletCode + '_' + item.id].common && t.state[item.portletCode + '_' + item.id].common.length > 0) {
825
+ commonList = t.state[item.portletCode + '_' + item.id].common.map(function (item) {
798
826
  return _react2.default.createElement(
799
827
  'div',
800
828
  { className: 'banshi-item', onClick: function onClick() {
@@ -815,17 +843,17 @@ var MyGrid = function (_React$Component) {
815
843
  );
816
844
  });
817
845
  } else {
818
- perList = _react2.default.createElement(
846
+ commonList = _react2.default.createElement(
819
847
  'div',
820
848
  null,
821
849
  _react2.default.createElement('img', { className: 't-W100 t-PL10 t-PR10', src: '../../../fmui/images/home/nodata.png' })
822
850
  );
823
851
  }
824
852
  }
825
- var orgList = '';
853
+ var colectionList = '';
826
854
  if (t.state[item.portletCode + '_' + item.id]) {
827
- if (t.state[item.portletCode + '_' + item.id].orgList && t.state[item.portletCode + '_' + item.id].orgList.length > 0) {
828
- orgList = t.state[item.portletCode + '_' + item.id].orgList.map(function (item) {
855
+ if (t.state[item.portletCode + '_' + item.id].colection && t.state[item.portletCode + '_' + item.id].colection.length > 0) {
856
+ colectionList = t.state[item.portletCode + '_' + item.id].colection.map(function (item) {
829
857
  return _react2.default.createElement(
830
858
  'div',
831
859
  { className: 'banshi-item', onClick: function onClick() {
@@ -846,42 +874,42 @@ var MyGrid = function (_React$Component) {
846
874
  );
847
875
  });
848
876
  } else {
849
- orgList = _react2.default.createElement(
877
+ colectionList = _react2.default.createElement(
850
878
  'div',
851
879
  null,
852
880
  _react2.default.createElement('img', { className: 't-W100 t-PL10 t-PR10', src: '../../../fmui/images/home/nodata.png' })
853
881
  );
854
882
  }
855
883
  }
856
- var bssxPerTab = '';
857
- if (bssxShowList.indexOf('personWork') > -1) {
858
- bssxPerTab = _react2.default.createElement(
884
+ var bssxCommonTab = '';
885
+ if (bssxShowList.indexOf('common') > -1) {
886
+ bssxCommonTab = _react2.default.createElement(
859
887
  _Tab2.default.Item,
860
888
  { title: _react2.default.createElement(
861
889
  'div',
862
890
  { className: '', style: { color: styleSetting.titleSet.titleColor, fontWeight: styleSetting.titleSet.titleWeight == 1 ? 700 : '', fontSize: styleSetting.titleSet.titleSize } },
863
- '\u4E2A\u4EBA\u529E\u4E8B'
891
+ '\u5E38\u7528\u4E8B\u9879'
864
892
  ), key: 0 },
865
893
  _react2.default.createElement(
866
894
  'div',
867
895
  { className: 'banshi-list' },
868
- perList
896
+ commonList
869
897
  )
870
898
  );
871
899
  }
872
- var bssxOrgTab = '';
873
- if (bssxShowList.indexOf('deptWork') > -1) {
874
- bssxOrgTab = _react2.default.createElement(
900
+ var bssxColectionTab = '';
901
+ if (bssxShowList.indexOf('colection') > -1) {
902
+ bssxColectionTab = _react2.default.createElement(
875
903
  _Tab2.default.Item,
876
904
  { key: 1, title: _react2.default.createElement(
877
905
  'div',
878
906
  { className: '', style: { color: styleSetting.titleSet.titleColor, fontWeight: styleSetting.titleSet.titleWeight == 1 ? 700 : '', fontSize: styleSetting.titleSet.titleSize } },
879
- '\u90E8\u95E8\u529E\u4E8B'
907
+ '\u6211\u7684\u6536\u85CF'
880
908
  ) },
881
909
  _react2.default.createElement(
882
910
  'div',
883
911
  { className: 'banshi-list' },
884
- orgList
912
+ colectionList
885
913
  )
886
914
  );
887
915
  }
@@ -896,9 +924,9 @@ var MyGrid = function (_React$Component) {
896
924
  ),
897
925
  _react2.default.createElement(
898
926
  _Tab2.default,
899
- { activeKey: bssxShowList.indexOf('personWork') > -1 ? "0" : "1" },
900
- bssxPerTab,
901
- bssxOrgTab
927
+ { activeKey: bssxShowList.indexOf('common') > -1 ? "0" : "1" },
928
+ bssxCommonTab,
929
+ bssxColectionTab
902
930
  )
903
931
  );
904
932
  }
@@ -1479,19 +1507,48 @@ var MyGrid = function (_React$Component) {
1479
1507
  )
1480
1508
  );
1481
1509
  if (t.state[item.portletCode + '_' + item.id] && t.state[item.portletCode + '_' + item.id].length > 0) {
1482
- componentContent = _react2.default.createElement(
1483
- _Grid2.default,
1484
- { col: personalSetting.cols * 1, className: 'sxbl_buttons' },
1485
- t.state[item.portletCode + '_' + item.id].map(function (item) {
1486
- return _react2.default.createElement(
1487
- 'button',
1488
- { onClick: function onClick() {
1489
- _umi.history.push('/officeguid' + ('?id=' + item.id + '&code=' + item.code));
1490
- } },
1491
- item.name
1492
- );
1493
- })
1494
- );
1510
+ // 文字模式
1511
+ if (personalSetting.styleType == '1') {
1512
+ componentContent = _react2.default.createElement(
1513
+ _Grid2.default,
1514
+ { col: personalSetting.cols * 1, className: 'sxbl_buttons' },
1515
+ t.state[item.portletCode + '_' + item.id].map(function (item) {
1516
+ return _react2.default.createElement(
1517
+ 'button',
1518
+ { onClick: function onClick() {
1519
+ _umi.history.push('/officeguid' + ('?id=' + item.id + '&code=' + item.code));
1520
+ } },
1521
+ item.name
1522
+ );
1523
+ })
1524
+ );
1525
+ }
1526
+
1527
+ if (personalSetting.styleType == '2') {
1528
+ // 卡片模式
1529
+ componentContent = _react2.default.createElement(
1530
+ _Grid2.default,
1531
+ { col: personalSetting.cols * 1, className: 'lcfq-list' },
1532
+ t.state[item.portletCode + '_' + item.id].map(function (item) {
1533
+ return _react2.default.createElement(
1534
+ 'div',
1535
+ { className: 'lcfq-list-item', onClick: function onClick() {
1536
+ _umi.history.push('/officeguid' + ('?id=' + item.id + '&code=' + item.code));
1537
+ } },
1538
+ _react2.default.createElement(
1539
+ 'div',
1540
+ { className: 'lcfq-list-item-icon' },
1541
+ _react2.default.createElement('i', { className: "iconfont-ywtb icon-ywtb-" + item.icon })
1542
+ ),
1543
+ _react2.default.createElement(
1544
+ 'div',
1545
+ { className: 'lcfq-list-item-text' },
1546
+ item.name
1547
+ )
1548
+ );
1549
+ })
1550
+ );
1551
+ }
1495
1552
  }
1496
1553
  }
1497
1554
  if (item.portletCode === 'tbgl') {
@@ -1611,7 +1668,7 @@ var MyGrid = function (_React$Component) {
1611
1668
  { title: '\u6807\u9898', code: item.code, className: 't-image-slide-item t-R10', style: { backgroundImage: 'url(' + imgUrlPath + ')' } },
1612
1669
  _react2.default.createElement(
1613
1670
  'p',
1614
- { className: 't-FS20 t-ML20 t-PT20 t-MB10' },
1671
+ { className: 't-FS20 t-PT20 t-MB10', style: { textAlign: 'center' } },
1615
1672
  item.name
1616
1673
  )
1617
1674
  );
@@ -1627,9 +1684,41 @@ var MyGrid = function (_React$Component) {
1627
1684
  );
1628
1685
  }
1629
1686
  }
1687
+ if (item.portletCode === 'image') {
1688
+ var tppathUrl = "";
1689
+ var tpUrlId = "";
1690
+ componentHead = _react2.default.createElement(
1691
+ 'div',
1692
+ null,
1693
+ _react2.default.createElement(
1694
+ 'p',
1695
+ { className: styleSetting.titleSet.titleStatus == 1 && styleSetting.otherSet.toolbarShow == 1 ? "rightMore" : 't-DN', onClick: t.skip2More.bind(this, item.portletCode) },
1696
+ '\u66F4\u591A',
1697
+ _react2.default.createElement('i', { className: 'iconfont-ywtb icon-ywtb-tiaozhuan' })
1698
+ ),
1699
+ _react2.default.createElement(
1700
+ _Tab2.default,
1701
+ { activeKey: '0', className: 't-MB16' },
1702
+ _react2.default.createElement(_Tab2.default.Item, { title: _react2.default.createElement(
1703
+ 'div',
1704
+ { className: '', style: { color: styleSetting.titleSet.titleColor, fontWeight: styleSetting.titleSet.titleWeight == 1 ? 700 : '', fontSize: styleSetting.titleSet.titleSize } },
1705
+ item.title
1706
+ ), key: '0' })
1707
+ )
1708
+ );
1709
+ if (t.state[item.portletCode + '_' + item.id] && t.state[item.portletCode + '_' + item.id].imgId) {
1710
+ tpUrlId = t.state[item.portletCode + '_' + item.id].imgId;
1711
+ tppathUrl = localStorage.getItem('context') + '/api/m/plugin/attachment/mobile/viewImage?token=' + localStorage.getItem('token') + '&fid=' + tpUrlId;
1712
+ componentContent = _react2.default.createElement(
1713
+ 'div',
1714
+ { className: 'tp-content' },
1715
+ _react2.default.createElement('img', { src: tppathUrl, alt: '' })
1716
+ );
1717
+ }
1718
+ }
1630
1719
  return _react2.default.createElement(
1631
1720
  'div',
1632
- { className: styleSetting.titleSet.titleStatus == 1 ? 'react-grid-component' : 'noTitle', key: item.id, style: {
1721
+ { className: styleSetting.titleSet.titleStatus == 1 ? 'react-grid-component' : 'react-grid-component noTitle', key: item.id, style: {
1633
1722
  borderTopLeftRadius: styleSetting.otherSet.radius.topLeft + 'px',
1634
1723
  borderTopRightRadius: styleSetting.otherSet.radius.topRight + 'px',
1635
1724
  borderBottomLeftRadius: styleSetting.otherSet.radius.bottomLeft + 'px',