fmui-base 2.0.62 → 2.0.64

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/README.md CHANGED
@@ -3,7 +3,9 @@
3
3
  ---npm publish
4
4
 
5
5
  ## 更新日志
6
- - 2.0.62: 移动端批示意见常用语编辑跳转
6
+ - 2.0.64:移动端门户常用应用修改
7
+ - 2.0.63:移动端门户常用应用更换接口
8
+ - 2.0.62:移动端批示意见常用语编辑跳转
7
9
  - 2.0.61:移动端门户常用应用角标显示问题
8
10
  - 2.0.60:移动端部件修改
9
11
  - 2.0.59:待办待阅数量问题修改
package/lib/db/db.js CHANGED
@@ -921,6 +921,20 @@ context.create('reactGrid', {
921
921
  }
922
922
  },
923
923
 
924
+ // 常用应用(频次)
925
+ getNewComAppInfo: {
926
+ url: _variables2.default.URLS.getNewComAppInfo,
927
+ method: 'GET',
928
+ header: {
929
+ Authorization: 'Bearer ' + getLoginUserInfo().token
930
+ },
931
+ willFetch: function willFetch() {
932
+ _Toast2.default.show({
933
+ content: _react2.default.createElement(_loading2.default, null),
934
+ duration: 800
935
+ });
936
+ }
937
+ },
924
938
  getNewHomePageTodoData: {
925
939
  // mockUrl: 'query/getNewHomePageTodoData.json',
926
940
  url: _variables2.default.URLS.getNewHomePageTodoData,
@@ -112,6 +112,7 @@ exports.default = {
112
112
 
113
113
  getPortalPage: portalUrlPrefix + "getPortalPage" + '?token=' + getLoginUserInfo().token, //移动门户部件详情
114
114
  getComponentInfoListAll: portalAllUrlPrefix + "getComponentInfoList" + '?token=' + getLoginUserInfo().token, //获取首页部件信息
115
+ getNewComAppInfo: portalAllUrlPrefix + "getNewComAppInfo" + '?token=' + getLoginUserInfo().token, //首页部件常用应用
115
116
  getNewHomePageTodoData: portalAllUrlPrefix + "getNewHomePageTodoData" + '?token=' + getLoginUserInfo().token,
116
117
  getNewHomePageCollectAppInfoList: portalAllUrlPrefix + "getNewHomePageCollectAppInfoList" + '?token=' + getLoginUserInfo().token,
117
118
  getNewHomePageRemindCount: portalAllUrlPrefix + "getNewHomePageRemindCount" + '?token=' + getLoginUserInfo().token,
@@ -113,13 +113,13 @@ var MyGrid = function (_React$Component) {
113
113
  _this.setState(_defineProperty({}, item.portletCode + '_' + item.id, JSON.parse(item.personalSetting)));
114
114
  } else if (item.portletCode == 'cyyy') {
115
115
  t.getShoucangAppInfo(item.id);
116
- t.getComAppInfo(item.id);
116
+ t.getOftenList(item.id);
117
117
  } else if (item.portletCode !== 'tbgl') {
118
- var params = {
118
+ var _params = {
119
119
  code: item.portletCode,
120
120
  ppId: item.id
121
121
  };
122
- _db2.default.reactGrid.getComponentInfoListAll(params).then(function (res) {
122
+ _db2.default.reactGrid.getComponentInfoListAll(_params).then(function (res) {
123
123
  _this.setState(_defineProperty({}, item.portletCode + '_' + item.id, res));
124
124
  });
125
125
  }
@@ -138,6 +138,18 @@ var MyGrid = function (_React$Component) {
138
138
  duration: 2000
139
139
  });
140
140
  });
141
+
142
+ var params = {};
143
+ _db2.default.reactGrid.getNewHomePageTodoData(params).then(function (content) {
144
+ var openModule = content.hpOpenModule ? content.hpOpenModule : "";
145
+ localStorage.setItem('hpOpenModule', openModule);
146
+ var todoData = content.todoData != null ? content.todoData.entity : {};
147
+ var pageTitle = todoData.pageTitle;
148
+ if (!pageTitle || pageTitle == '') {
149
+ pageTitle = '一网通办管理平台';
150
+ }
151
+ setPageTitle(pageTitle);
152
+ });
141
153
  };
142
154
 
143
155
  _this.getShoucangAppInfo = function (id) {
@@ -148,26 +160,6 @@ var MyGrid = function (_React$Component) {
148
160
  }).catch(function (error) {});
149
161
  };
150
162
 
151
- _this.getComAppInfo = function (id) {
152
- var userId = getLoginUserInfo().userId;
153
- var userAppOftenList = [];
154
- var params = { userId: userId };
155
- _db2.default.reactGrid.getComAppInfo(params).then(function (result) {
156
- if (result.data) {
157
- _this.setState(_defineProperty({}, 'cyyy' + '_' + id, JSON.parse(result.data)));
158
- localStorage.setItem(['cyyy' + '_' + id], result.data);
159
- userAppOftenList = JSON.parse(result.data);
160
- }
161
- if (userAppOftenList.length < 1) {
162
- // 没有用户设置,取系统默认值
163
- _this.getOftenList(id);
164
- }
165
- }).catch(function (error) {
166
- _this.getOftenList();
167
- console.error(error);
168
- });
169
- };
170
-
171
163
  _this.getOftenList = function (id) {
172
164
  var data = getLoginUserInfo();
173
165
  var thirdMenuType = data.thirdMenuType;
@@ -176,11 +168,12 @@ var MyGrid = function (_React$Component) {
176
168
  thirdMenuType = 'DING';
177
169
  }
178
170
  params.showClient = thirdMenuType;
179
- _db2.default.reactGrid.getComponentInfoListAll(params).then(function (result) {
180
- if (result.data) {
181
- _this.setState(_defineProperty({}, 'cyyy' + '_' + id, result.data));
182
- var appOftenListlocal = JSON.stringify(result.data);
183
- localStorage.setItem(['cyyy' + '_' + id], appOftenListlocal);
171
+ _db2.default.reactGrid.getNewComAppInfo(params).then(function (content) {
172
+ if (content.data) {
173
+ _this.setState(_defineProperty({}, 'cyyy' + '_' + id, content.data));
174
+ var appOftenListlocal = JSON.stringify(content.data);
175
+ // localStorage.setItem(['cyyy' + '_' + id], appOftenListlocal);
176
+ localStorage.setItem('appOftenList', appOftenListlocal);
184
177
  }
185
178
  }).catch(function (error) {
186
179
  console.error(error);
@@ -225,6 +218,7 @@ var MyGrid = function (_React$Component) {
225
218
  undo: 0, //待办数量
226
219
  approveundo: 0, //审批数量
227
220
  toBeAttendedCount: 0, //会议数量
221
+ unreadMailCount: 0, //未读邮件
228
222
  unreadPubMailCount: 0, //未读公共邮件
229
223
  appOftenList: [], //常用应用
230
224
  collectAppInfoList: [], //收藏应用
@@ -283,7 +277,27 @@ var MyGrid = function (_React$Component) {
283
277
 
284
278
 
285
279
  // 获取用户设置常用应用
286
-
280
+ // getComAppInfo = (id) => {
281
+ // let userId = getLoginUserInfo().userId;
282
+ // var userAppOftenList = [];
283
+ // var params = { userId: userId };
284
+ // DB.reactGrid.getComAppInfo(params).then((result) => {
285
+ // if (result.data) {
286
+ // this.setState({
287
+ // ['cyyy' + '_' + id]: JSON.parse(result.data)
288
+ // });
289
+ // localStorage.setItem(['cyyy' + '_' + id], result.data);
290
+ // userAppOftenList = JSON.parse(result.data);
291
+ // }
292
+ // if (userAppOftenList.length < 1) {
293
+ // // 没有用户设置,取系统默认值
294
+ // this.getOftenList(id);
295
+ // }
296
+ // }).catch((error) => {
297
+ // this.getOftenList();
298
+ // console.error(error);
299
+ // });
300
+ // }
287
301
  // 获取默认系统常用应用
288
302
 
289
303
  }, {
@@ -291,13 +305,12 @@ var MyGrid = function (_React$Component) {
291
305
  value: function getRemindCount() {
292
306
  var _this2 = this;
293
307
 
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('====================================');
308
+ _db2.default.reactGrid.getNewHomePageRemindCount({ codes: "undo,unreadMail,unreadPubMail,toBeAttended,approveundo" }).then(function (content) {
309
+ if (content.undo || content.approveundo || content.toBeAttendedCount || content.unreadPubMailCount || content.unreadMailCount) {
310
+
299
311
  _this2.setState({
300
312
  undo: content.undo,
313
+ unreadMailCount: content.unreadMailCount,
301
314
  approveundo: content.approveundo,
302
315
  toBeAttendedCount: content.toBeAttendedCount,
303
316
  unreadPubMailCount: content.unreadPubMailCount
@@ -725,13 +738,13 @@ var MyGrid = function (_React$Component) {
725
738
  t.state[item.portletCode + '_' + item.id].map(function (ele) {
726
739
  return _react2.default.createElement(
727
740
  'div',
728
- { className: 'systemItem', onClick: t.newPageSkip.bind(t, ele.dingUrl, ele.wxUrl, ele.mhUrl, ele.cocallUrl) },
741
+ { className: 'systemItem', onClick: t.newPageSkip.bind(t, ele.dingUrl, ele.wxUrl, ele.mhUrl, ele.cocallUrl, ele.id) },
729
742
  _react2.default.createElement(
730
743
  'div',
731
744
  { className: 'iconblock t-iconBC' + ele.iconColor },
732
745
  _react2.default.createElement(
733
746
  _Badge2.default,
734
- { count: ele.name == '会议' ? t.state.toBeAttendedCount * 1 : ele.name == '审批' ? t.state.approveundo : ele.name == '公共邮件' ? t.state.unreadPubMailCount * 1 : '' },
747
+ { count: ele.name == '会议' ? t.state.toBeAttendedCount * 1 : ele.name == '审批' ? t.state.approveundo : ele.name == '公共邮箱' ? t.state.unreadPubMailCount * 1 : ele.name == '邮件' ? t.state.unreadMailCount : '' },
735
748
  _react2.default.createElement('i', { className: 'iconfont-ywtb icon-ywtb-' + ele.icon })
736
749
  )
737
750
  ),
@@ -775,13 +788,13 @@ var MyGrid = function (_React$Component) {
775
788
  t.state['wdsc' + '_' + item.id].map(function (ele) {
776
789
  return _react2.default.createElement(
777
790
  'div',
778
- { className: 'systemItem', onClick: t.newPageSkip.bind(t, ele.dingUrl, ele.wxUrl, ele.mhUrl, ele.cocallUrl) },
791
+ { className: 'systemItem', onClick: t.newPageSkip.bind(t, ele.dingUrl, ele.wxUrl, ele.mhUrl, ele.cocallUrl, ele.id) },
779
792
  _react2.default.createElement(
780
793
  'div',
781
794
  { className: 'iconblock t-iconBC' + ele.iconColor },
782
795
  _react2.default.createElement(
783
796
  _Badge2.default,
784
- { count: ele.name == '会议' ? t.state.toBeAttendedCount * 1 : ele.name == '审批' ? t.state.approveundo : ele.name == '公共邮件' ? t.state.unreadPubMailCount * 1 : '' },
797
+ { count: ele.name == '会议' ? t.state.toBeAttendedCount * 1 : ele.name == '审批' ? t.state.approveundo : ele.name == '公共邮箱' ? t.state.unreadPubMailCount * 1 : ele.name == '邮件' ? t.state.unreadMailCount : '' },
785
798
  _react2.default.createElement('i', { className: 'iconfont-ywtb icon-ywtb-' + ele.icon })
786
799
  )
787
800
  ),
@@ -394,6 +394,11 @@
394
394
  .t-badge {
395
395
  width: 100%;
396
396
  }
397
+
398
+ .t-badge .badge-inner {
399
+ line-height: 13px;
400
+ border: 2px solid #fff;
401
+ }
397
402
  }
398
403
 
399
404
  .react-app-collect {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fmui-base",
3
- "version": "2.0.62",
3
+ "version": "2.0.64",
4
4
  "title": "fmui-base",
5
5
  "description": "fmui移动端组件",
6
6
  "main": "lib/index.js",