|
|
@@ -4,10 +4,7 @@ import { observer, observable } from "mobx-react";
|
|
4
|
4
|
import { useHistory, useLocation } from "react-router-dom";
|
|
5
|
5
|
import { UserOutlined, QuestionCircleOutlined } from "@ant-design/icons";
|
|
6
|
6
|
import {
|
|
7
|
|
- getResourceTree,
|
|
8
|
7
|
getUserResourceTree,
|
|
9
|
|
- getAllReportResource,
|
|
10
|
|
- getMenuDesc,
|
|
11
|
8
|
} from "../../api";
|
|
12
|
9
|
import { getUnReadMessageNum } from "@apis/personal";
|
|
13
|
10
|
import { saveMenu } from "@apis/enter.js";
|
|
|
@@ -342,7 +339,7 @@ export default observer(function (props) {
|
|
342
|
339
|
//更新 小红点数量
|
|
343
|
340
|
getUnReadNum();
|
|
344
|
341
|
//获取用户未读消息和未处理消息
|
|
345
|
|
- messageTipList();
|
|
|
342
|
+ // messageTipList();
|
|
346
|
343
|
};
|
|
347
|
344
|
|
|
348
|
345
|
const close_xxpop = () => {
|
|
|
@@ -454,11 +451,6 @@ export default observer(function (props) {
|
|
454
|
451
|
|
|
455
|
452
|
//获取 问题反馈-问题报表-树结构
|
|
456
|
453
|
const getProbReport = () => {
|
|
457
|
|
- getAllReportResource().then(({ data, resultCode }) => {
|
|
458
|
|
- if (+resultCode === 0) {
|
|
459
|
|
- setProbReport(handleData(data));
|
|
460
|
|
- }
|
|
461
|
|
- });
|
|
462
|
454
|
};
|
|
463
|
455
|
//递归-问题报表
|
|
464
|
456
|
const handleData = (data) => {
|
|
|
@@ -516,7 +508,7 @@ export default observer(function (props) {
|
|
516
|
508
|
//获取小红点实时未读数量
|
|
517
|
509
|
getUnReadNum();
|
|
518
|
510
|
//重新获取待办列表
|
|
519
|
|
- messageTipList();
|
|
|
511
|
+ // messageTipList();
|
|
520
|
512
|
};
|
|
521
|
513
|
|
|
522
|
514
|
//消息公告-一键已读
|
|
|
@@ -526,7 +518,7 @@ export default observer(function (props) {
|
|
526
|
518
|
setReadStatus({ ...config }).then(({ data, resultCode }) => {
|
|
527
|
519
|
if (+resultCode === 0) {
|
|
528
|
520
|
getUnReadNum();
|
|
529
|
|
- messageTipList();
|
|
|
521
|
+ // messageTipList();
|
|
530
|
522
|
}
|
|
531
|
523
|
});
|
|
532
|
524
|
};
|
|
|
@@ -572,68 +564,15 @@ export default observer(function (props) {
|
|
572
|
564
|
) {
|
|
573
|
565
|
$store.sysMenu.setIsShowLeftMenuSearch(true);
|
|
574
|
566
|
}
|
|
575
|
|
- getUserResourceTree().then(({ data, resultCode }) => {
|
|
576
|
|
- //测试菜单问题
|
|
577
|
|
- if (+resultCode === 0) {
|
|
578
|
|
- const list = data.map((item, index) => {
|
|
579
|
|
- return item;
|
|
580
|
|
- });
|
|
581
|
|
- $store.sysMenu.setMenuList(
|
|
582
|
|
- list.filter((item) => item.resourceName !== "测试模块化与权限")
|
|
583
|
|
- );
|
|
584
|
|
-
|
|
585
|
|
- // 计算菜单显示
|
|
586
|
|
- let el = menuRef.current || {};
|
|
587
|
|
- let tagCount = Math.floor(el.offsetWidth / 80);
|
|
588
|
|
- let rendNum = el.offsetWidth % 80;
|
|
589
|
|
-
|
|
590
|
|
- if (rendNum < 85) {
|
|
591
|
|
- --tagCount;
|
|
592
|
|
- }
|
|
593
|
|
- // console.log('tagCount',tagCount)
|
|
594
|
|
-
|
|
595
|
|
- $store.sysMenu.setNorList(
|
|
596
|
|
- $store.sysMenu.menuList.slice(0, Math.max(0, tagCount))
|
|
597
|
|
- );
|
|
598
|
|
- // //加载首页通知
|
|
599
|
|
- // const home_f = utils.findNodeTree($store.sysMenu.menuList, '/home/index', "resourceUrl");
|
|
600
|
|
- // if (home_f && home_f.resourceId) {
|
|
601
|
|
- // listUserModuleBulletinsNew({
|
|
602
|
|
- // pageSize:2,
|
|
603
|
|
- // pageNum:1,
|
|
604
|
|
- // effectStatus:1,
|
|
605
|
|
- // displayArea:home_f.resourceId
|
|
606
|
|
- // }).then((res) => {
|
|
607
|
|
- // if (res?.data && res?.data?.records) {
|
|
608
|
|
- // //首页特殊处理 展示在首页的通知栏
|
|
609
|
|
- // $store.app.setShowTips( res?.data?.records);
|
|
610
|
|
- // for (let index = 0; index < 1; index++) {
|
|
611
|
|
- // const element = res?.data?.records[index];
|
|
612
|
|
- // if (isTimes('', element.effectStartTime, element.effectEndTime)) {
|
|
613
|
|
- // this.ModelBox.setState({ showContactModalVisible: true, activeItem: element });
|
|
614
|
|
- // break
|
|
615
|
|
- // }
|
|
616
|
|
- // }
|
|
617
|
|
- // }
|
|
618
|
|
- // })
|
|
619
|
|
- // }
|
|
620
|
|
-
|
|
621
|
|
-
|
|
622
|
|
- if ($store.sysMenu.menuList.length > tagCount) {
|
|
623
|
|
- $store.sysMenu.setShowMore(true);
|
|
624
|
|
- $store.sysMenu.setMoreList($store.sysMenu.menuList.slice(tagCount));
|
|
625
|
|
- }
|
|
626
|
|
- }
|
|
627
|
|
- });
|
|
628
|
567
|
//获取问题反馈-问题报表-树结构
|
|
629
|
568
|
getProbReport();
|
|
630
|
569
|
//获取用户未读消息和未处理消息
|
|
631
|
|
- messageTipList();
|
|
632
|
|
- getUnReadMessageNum().then(({ data, resultCode }) => {
|
|
633
|
|
- if (+resultCode === 0) {
|
|
634
|
|
- $store.app.setNewsCount(+data);
|
|
635
|
|
- }
|
|
636
|
|
- });
|
|
|
570
|
+ // messageTipList();
|
|
|
571
|
+ // getUnReadMessageNum().then(({ data, resultCode }) => {
|
|
|
572
|
+ // if (+resultCode === 0) {
|
|
|
573
|
+ // $store.app.setNewsCount(+data);
|
|
|
574
|
+ // }
|
|
|
575
|
+ // });
|
|
637
|
576
|
console.log($store.app.avator);
|
|
638
|
577
|
}, []);
|
|
639
|
578
|
|
|
|
@@ -684,12 +623,12 @@ export default observer(function (props) {
|
|
684
|
623
|
//获取 未读消息的数量
|
|
685
|
624
|
const getUnReadNum = () => {
|
|
686
|
625
|
let accountId = sessionStorage.getItem("accountId");
|
|
687
|
|
- getUnReadMessageNum(accountId).then(({ data, resultCode }) => {
|
|
688
|
|
- if (+resultCode === 0) {
|
|
689
|
|
- setUnReadNum(data);
|
|
690
|
|
- $store.app.setNewsCount(+data);
|
|
691
|
|
- }
|
|
692
|
|
- });
|
|
|
626
|
+ // getUnReadMessageNum(accountId).then(({ data, resultCode }) => {
|
|
|
627
|
+ // if (+resultCode === 0) {
|
|
|
628
|
+ // setUnReadNum(data);
|
|
|
629
|
+ // $store.app.setNewsCount(+data);
|
|
|
630
|
+ // }
|
|
|
631
|
+ // });
|
|
693
|
632
|
};
|
|
694
|
633
|
|
|
695
|
634
|
/**控制输入字数 */
|