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 +3 -1
- package/lib/db/db.js +14 -0
- package/lib/db/variables.js +1 -0
- package/lib/react_grid/react_grid.js +51 -38
- package/lib/react_grid/react_grid.less +5 -0
- package/package.json +1 -1
package/README.md
CHANGED
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,
|
package/lib/db/variables.js
CHANGED
|
@@ -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.
|
|
116
|
+
t.getOftenList(item.id);
|
|
117
117
|
} else if (item.portletCode !== 'tbgl') {
|
|
118
|
-
var
|
|
118
|
+
var _params = {
|
|
119
119
|
code: item.portletCode,
|
|
120
120
|
ppId: item.id
|
|
121
121
|
};
|
|
122
|
-
_db2.default.reactGrid.getComponentInfoListAll(
|
|
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.
|
|
180
|
-
if (
|
|
181
|
-
_this.setState(_defineProperty({}, 'cyyy' + '_' + id,
|
|
182
|
-
var appOftenListlocal = JSON.stringify(
|
|
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,
|
|
295
|
-
if (content.undo || content.approveundo || content.toBeAttendedCount || content.unreadPubMailCount) {
|
|
296
|
-
|
|
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 == '
|
|
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 == '
|
|
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
|
),
|