@titaui/pc 1.10.13 → 1.10.14
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.
|
@@ -64,7 +64,7 @@ var DemoMenus = function DemoMenus(props) {
|
|
|
64
64
|
setExpandedKeys = _useState4[1];
|
|
65
65
|
|
|
66
66
|
var _useState5 = (0, _react.useState)(function () {
|
|
67
|
-
okrMenusData.current = new _menus["default"]();
|
|
67
|
+
okrMenusData.current = new _menus["default"](isManager);
|
|
68
68
|
return okrMenusData.current.getMenus();
|
|
69
69
|
}),
|
|
70
70
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
@@ -72,7 +72,7 @@ var DemoMenus = function DemoMenus(props) {
|
|
|
72
72
|
setMenus = _useState6[1];
|
|
73
73
|
|
|
74
74
|
(0, _react.useEffect)(function () {
|
|
75
|
-
okrMenusData.current = new _menus["default"](isManager
|
|
75
|
+
okrMenusData.current = new _menus["default"](isManager);
|
|
76
76
|
setMenus(okrMenusData.current.getMenus());
|
|
77
77
|
setExpandedKeys(["demofree"]);
|
|
78
78
|
}, [isManager]);
|
|
@@ -25,7 +25,7 @@ var _default = /*#__PURE__*/function () {
|
|
|
25
25
|
_createClass(_default, [{
|
|
26
26
|
key: "highlight",
|
|
27
27
|
value: function highlight(cb) {
|
|
28
|
-
if (this.isUnAssigned()) cb(_menus.PAGE_UNASSIGNED_DEMOFREE);else if (this.isAssigned()) cb(_menus.PAGE_ASSIGNED_DEMOFREE);else if (this.isReserved()) cb(_menus.PAGE_RESERVED_DEMOFREE);else if (this.isDone()) cb(_menus.PAGE_DONE_DEMOFREE);else if (this.isIgnore()) cb(_menus.PAGE_IGNORED_DEMOFREE);else if (this.isChart()) cb(_menus.PAGE_CHARTS_DEMOFREE);
|
|
28
|
+
if (this.isUnAssigned()) cb(_menus.PAGE_UNASSIGNED_DEMOFREE);else if (this.isAssigned()) cb(_menus.PAGE_ASSIGNED_DEMOFREE);else if (this.isReserved()) cb(_menus.PAGE_RESERVED_DEMOFREE);else if (this.isDone()) cb(_menus.PAGE_DONE_DEMOFREE);else if (this.isIgnore()) cb(_menus.PAGE_IGNORED_DEMOFREE);else if (this.isChart()) cb(_menus.PAGE_CHARTS_DEMOFREE);else if (this.isRecharge()) cb(_menus.PAGE_RECHARGE_DEMOFREE);
|
|
29
29
|
}
|
|
30
30
|
}, {
|
|
31
31
|
key: "isChart",
|
|
@@ -33,6 +33,12 @@ var _default = /*#__PURE__*/function () {
|
|
|
33
33
|
var pathname = this.history.location.pathname;
|
|
34
34
|
return pathname.match(/demofree\/charts/);
|
|
35
35
|
}
|
|
36
|
+
}, {
|
|
37
|
+
key: "isRecharge",
|
|
38
|
+
value: function isRecharge() {
|
|
39
|
+
var pathname = this.history.location.pathname;
|
|
40
|
+
return pathname.match(/demofree\/recharge/);
|
|
41
|
+
}
|
|
36
42
|
}, {
|
|
37
43
|
key: "isUnAssigned",
|
|
38
44
|
value: function isUnAssigned() {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.defaultRefObject = exports["default"] = exports.PAGE_UNASSIGNED_DEMOFREE = exports.PAGE_RESERVED_DEMOFREE = exports.PAGE_IGNORED_DEMOFREE = exports.PAGE_DONE_DEMOFREE = exports.PAGE_CHARTS_DEMOFREE = exports.PAGE_ASSIGNED_DEMOFREE = void 0;
|
|
6
|
+
exports.defaultRefObject = exports["default"] = exports.PAGE_UNASSIGNED_DEMOFREE = exports.PAGE_RESERVED_DEMOFREE = exports.PAGE_RECHARGE_DEMOFREE = exports.PAGE_IGNORED_DEMOFREE = exports.PAGE_DONE_DEMOFREE = exports.PAGE_CHARTS_DEMOFREE = exports.PAGE_ASSIGNED_DEMOFREE = void 0;
|
|
7
7
|
|
|
8
8
|
var _index = require("../../components/menu-tree/tree-node/index");
|
|
9
9
|
|
|
@@ -13,6 +13,15 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
13
13
|
|
|
14
14
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
15
15
|
|
|
16
|
+
var EManagerType;
|
|
17
|
+
|
|
18
|
+
(function (EManagerType) {
|
|
19
|
+
EManagerType[EManagerType["Manager"] = 1] = "Manager";
|
|
20
|
+
EManagerType[EManagerType["Supervisor"] = 2] = "Supervisor";
|
|
21
|
+
EManagerType[EManagerType["Sales"] = 0] = "Sales";
|
|
22
|
+
EManagerType[EManagerType["ReCharge"] = 3] = "ReCharge";
|
|
23
|
+
})(EManagerType || (EManagerType = {}));
|
|
24
|
+
|
|
16
25
|
var defaultRefObject = {
|
|
17
26
|
menus: [],
|
|
18
27
|
getMenus: function getMenus() {}
|
|
@@ -30,11 +39,11 @@ var PAGE_IGNORED_DEMOFREE = "ignore";
|
|
|
30
39
|
exports.PAGE_IGNORED_DEMOFREE = PAGE_IGNORED_DEMOFREE;
|
|
31
40
|
var PAGE_CHARTS_DEMOFREE = "charts";
|
|
32
41
|
exports.PAGE_CHARTS_DEMOFREE = PAGE_CHARTS_DEMOFREE;
|
|
42
|
+
var PAGE_RECHARGE_DEMOFREE = "recharge";
|
|
43
|
+
exports.PAGE_RECHARGE_DEMOFREE = PAGE_RECHARGE_DEMOFREE;
|
|
33
44
|
|
|
34
45
|
var DemoMenuData = /*#__PURE__*/function () {
|
|
35
|
-
function DemoMenuData() {
|
|
36
|
-
var isManager = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
37
|
-
|
|
46
|
+
function DemoMenuData(isManager) {
|
|
38
47
|
_classCallCheck(this, DemoMenuData);
|
|
39
48
|
|
|
40
49
|
this.isManager = isManager;
|
|
@@ -43,44 +52,52 @@ var DemoMenuData = /*#__PURE__*/function () {
|
|
|
43
52
|
label: "任务状态",
|
|
44
53
|
key: "demofree",
|
|
45
54
|
href: this.isManager ? "#/demofree/list?selected=unassigned" : "#/demofree/list?selected=assigned",
|
|
46
|
-
isShow:
|
|
55
|
+
isShow: this.isManager !== EManagerType.ReCharge,
|
|
47
56
|
children: [{
|
|
48
57
|
icon: "",
|
|
49
58
|
label: "未分配",
|
|
50
59
|
key: "unassigned",
|
|
51
60
|
href: "#/demofree/list?selected=unassigned",
|
|
52
|
-
isShow: this.isManager
|
|
61
|
+
isShow: this.isManager === EManagerType.Manager
|
|
53
62
|
}, {
|
|
54
63
|
icon: "",
|
|
55
64
|
label: "已分配",
|
|
56
65
|
key: "assigned",
|
|
57
66
|
href: "#/demofree/list?selected=assigned",
|
|
58
|
-
isShow:
|
|
67
|
+
isShow: this.isManager !== EManagerType.ReCharge
|
|
59
68
|
}, {
|
|
60
69
|
icon: "",
|
|
61
70
|
label: "已预约",
|
|
62
71
|
key: "reserved",
|
|
63
72
|
href: "#/demofree/list?selected=reserved",
|
|
64
|
-
isShow:
|
|
73
|
+
isShow: this.isManager !== EManagerType.ReCharge
|
|
65
74
|
}, {
|
|
66
75
|
icon: "",
|
|
67
76
|
label: "已完成",
|
|
68
77
|
key: "done",
|
|
69
78
|
href: "#/demofree/list?selected=done",
|
|
70
|
-
isShow:
|
|
79
|
+
isShow: this.isManager !== EManagerType.ReCharge
|
|
71
80
|
}, {
|
|
72
81
|
icon: "",
|
|
73
82
|
label: "已忽略",
|
|
74
83
|
key: "ignore",
|
|
75
84
|
href: "#/demofree/list?selected=ignore",
|
|
76
|
-
isShow: this.isManager
|
|
85
|
+
isShow: this.isManager === EManagerType.Manager
|
|
77
86
|
}]
|
|
78
87
|
}, {
|
|
79
88
|
icon: "KH-help",
|
|
80
89
|
label: "预约演示报表",
|
|
81
90
|
key: "charts",
|
|
82
91
|
href: "#/demofree/charts",
|
|
83
|
-
isShow: this.isManager,
|
|
92
|
+
isShow: this.isManager === EManagerType.Manager,
|
|
93
|
+
children: [],
|
|
94
|
+
type: _index.MENU_ITEM_NOE
|
|
95
|
+
}, {
|
|
96
|
+
icon: "KH-help",
|
|
97
|
+
label: "客户续费",
|
|
98
|
+
key: "recharge",
|
|
99
|
+
href: "#/demofree/recharge",
|
|
100
|
+
isShow: this.isManager === EManagerType.ReCharge || this.isManager === EManagerType.Manager,
|
|
84
101
|
children: [],
|
|
85
102
|
type: _index.MENU_ITEM_NOE
|
|
86
103
|
}];
|