@titaui/pc 1.10.12 → 1.10.15

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.
@@ -87,9 +87,7 @@ var CommunicationRecord = function CommunicationRecord(_ref) {
87
87
  userId: communicationTrack.publishUser.userId
88
88
  }), /*#__PURE__*/_react["default"].createElement("span", {
89
89
  className: "".concat(prefix, "__communication-time")
90
- }, /*#__PURE__*/_react["default"].createElement("span", {
91
- className: "".concat(prefix, "__communication-time-point")
92
- }, "\xB7"), communicationTrack.createDate)) : /*#__PURE__*/_react["default"].createElement("span", {
90
+ }, communicationTrack.createDate)) : /*#__PURE__*/_react["default"].createElement("span", {
93
91
  className: "".concat(prefix, "__communication-item")
94
92
  }, /*#__PURE__*/_react["default"].createElement(_ConvertUserName["default"], {
95
93
  userName: communicationTrack.publishUser.name,
@@ -101,9 +99,7 @@ var CommunicationRecord = function CommunicationRecord(_ref) {
101
99
  userId: communicationTrack.parentUser.userId
102
100
  }), /*#__PURE__*/_react["default"].createElement("span", {
103
101
  className: "".concat(prefix, "__communication-time")
104
- }, /*#__PURE__*/_react["default"].createElement("span", {
105
- className: "".concat(prefix, "__communication-time-point")
106
- }, "\xB7"), communicationTrack.createDate), /*#__PURE__*/_react["default"].createElement(_Portals["default"], null, /*#__PURE__*/_react["default"].createElement(_reactTooltip["default"], {
102
+ }, communicationTrack.createDate), /*#__PURE__*/_react["default"].createElement(_Portals["default"], null, /*#__PURE__*/_react["default"].createElement(_reactTooltip["default"], {
107
103
  html: true,
108
104
  className: "tt-react-tooltip",
109
105
  place: "top",
@@ -49,11 +49,7 @@
49
49
  font-weight: 400;
50
50
  color: #89919F;
51
51
  line-height: 18px;
52
- margin-left: 6px;
53
- }
54
-
55
- .titaui-communication__communication-time-point {
56
- margin-right: 4px;
52
+ margin-left: 12px;
57
53
  }
58
54
 
59
55
  .titaui-communication__communication-bottom {
@@ -65,7 +65,8 @@ var DynamicList = function DynamicList(_ref) {
65
65
  }]
66
66
  }, data.map(function (item) {
67
67
  return /*#__PURE__*/_react["default"].createElement("div", {
68
- className: "".concat(prefix, "__item-wrapper")
68
+ className: "".concat(prefix, "__item-wrapper"),
69
+ key: item.feedId
69
70
  }, /*#__PURE__*/_react["default"].createElement(_dynamicItem["default"], {
70
71
  data: item,
71
72
  onDeleteFeed: handleDeleteFeed,
@@ -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 === 1);
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.isRechargeList()) cb(_menus.PAGE_RECHARGE_LIST);else if (this.isRechargeStatistics()) cb(_menus.PAGE_RECHARGE_STATISTICS);
29
29
  }
30
30
  }, {
31
31
  key: "isChart",
@@ -33,6 +33,18 @@ var _default = /*#__PURE__*/function () {
33
33
  var pathname = this.history.location.pathname;
34
34
  return pathname.match(/demofree\/charts/);
35
35
  }
36
+ }, {
37
+ key: "isRechargeList",
38
+ value: function isRechargeList() {
39
+ var pathname = this.history.location.pathname;
40
+ return pathname.match(/demofree\/recharge\/list/);
41
+ }
42
+ }, {
43
+ key: "isRechargeStatistics",
44
+ value: function isRechargeStatistics() {
45
+ var pathname = this.history.location.pathname;
46
+ return pathname.match(/demofree\/recharge\/statistics/);
47
+ }
36
48
  }, {
37
49
  key: "isUnAssigned",
38
50
  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_STATISTICS = exports.PAGE_RECHARGE_LIST = 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,13 @@ 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_LIST = "rechargeList";
43
+ exports.PAGE_RECHARGE_LIST = PAGE_RECHARGE_LIST;
44
+ var PAGE_RECHARGE_STATISTICS = "rechargeStatistics";
45
+ exports.PAGE_RECHARGE_STATISTICS = PAGE_RECHARGE_STATISTICS;
33
46
 
34
47
  var DemoMenuData = /*#__PURE__*/function () {
35
- function DemoMenuData() {
36
- var isManager = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
37
-
48
+ function DemoMenuData(isManager) {
38
49
  _classCallCheck(this, DemoMenuData);
39
50
 
40
51
  this.isManager = isManager;
@@ -43,46 +54,65 @@ var DemoMenuData = /*#__PURE__*/function () {
43
54
  label: "任务状态",
44
55
  key: "demofree",
45
56
  href: this.isManager ? "#/demofree/list?selected=unassigned" : "#/demofree/list?selected=assigned",
46
- isShow: true,
57
+ isShow: this.isManager !== EManagerType.ReCharge,
47
58
  children: [{
48
59
  icon: "",
49
60
  label: "未分配",
50
61
  key: "unassigned",
51
62
  href: "#/demofree/list?selected=unassigned",
52
- isShow: this.isManager
63
+ isShow: this.isManager === EManagerType.Manager
53
64
  }, {
54
65
  icon: "",
55
66
  label: "已分配",
56
67
  key: "assigned",
57
68
  href: "#/demofree/list?selected=assigned",
58
- isShow: true
69
+ isShow: this.isManager !== EManagerType.ReCharge
59
70
  }, {
60
71
  icon: "",
61
72
  label: "已预约",
62
73
  key: "reserved",
63
74
  href: "#/demofree/list?selected=reserved",
64
- isShow: true
75
+ isShow: this.isManager !== EManagerType.ReCharge
65
76
  }, {
66
77
  icon: "",
67
78
  label: "已完成",
68
79
  key: "done",
69
80
  href: "#/demofree/list?selected=done",
70
- isShow: true
81
+ isShow: this.isManager !== EManagerType.ReCharge
71
82
  }, {
72
83
  icon: "",
73
84
  label: "已忽略",
74
85
  key: "ignore",
75
86
  href: "#/demofree/list?selected=ignore",
76
- isShow: this.isManager
87
+ isShow: this.isManager === EManagerType.Manager
77
88
  }]
78
89
  }, {
79
90
  icon: "KH-help",
80
91
  label: "预约演示报表",
81
92
  key: "charts",
82
93
  href: "#/demofree/charts",
83
- isShow: this.isManager,
94
+ isShow: this.isManager === EManagerType.Manager,
84
95
  children: [],
85
96
  type: _index.MENU_ITEM_NOE
97
+ }, {
98
+ icon: "KH-help",
99
+ label: "客户续费",
100
+ key: "recharge",
101
+ href: "#/demofree/recharge",
102
+ isShow: this.isManager === EManagerType.ReCharge || this.isManager === EManagerType.Manager,
103
+ children: [{
104
+ icon: "",
105
+ label: "到期客户",
106
+ key: PAGE_RECHARGE_LIST,
107
+ href: "#/demofree/recharge/list",
108
+ isShow: this.isManager === EManagerType.ReCharge || this.isManager === EManagerType.Manager
109
+ }, {
110
+ icon: "",
111
+ label: "数据统计",
112
+ key: PAGE_RECHARGE_STATISTICS,
113
+ href: "#/demofree/recharge/statistics",
114
+ isShow: this.isManager === EManagerType.ReCharge || this.isManager === EManagerType.Manager
115
+ }]
86
116
  }];
87
117
  }
88
118
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@titaui/pc",
3
- "version": "1.10.12",
3
+ "version": "1.10.15",
4
4
  "nameCN": "",
5
5
  "description": "",
6
6
  "main": "lib/index.js",