@titaui/pc 1.6.11 → 1.6.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.
Files changed (188) hide show
  1. package/lib/components/button/icon-btn/index.css +2 -0
  2. package/lib/components/button/index.js +1 -9
  3. package/lib/components/button/rect-btn/index.css +41 -8
  4. package/lib/components/button/rect-btn/index.js +8 -8
  5. package/lib/components/button/text-btn/index.css +33 -0
  6. package/lib/components/button/text-btn/index.js +52 -2
  7. package/lib/components/dynamic/components/title/index.css +2 -2
  8. package/lib/components/dynamic/constant.js +2 -1
  9. package/lib/components/dynamic/dynamic-item/dynamic-create-o/index.js +8 -0
  10. package/lib/components/dynamic/dynamic-item/dynamic-milestone/img/dynamic-milestone.png +0 -0
  11. package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.css +7 -1
  12. package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.js +4 -21
  13. package/lib/components/dynamic/dynamic-item/dynamic-progress/index.css +4 -0
  14. package/lib/components/dynamic/dynamic-item/dynamic-progress/index.js +4 -2
  15. package/lib/components/dynamic/dynamic-item/dynamic-project/img/dynamic-project.png +0 -0
  16. package/lib/components/dynamic/dynamic-item/dynamic-project/index.css +7 -1
  17. package/lib/components/dynamic/dynamic-item/dynamic-project/index.js +4 -7
  18. package/lib/components/dynamic/dynamic-item/dynamic-task/constant.js +1 -35
  19. package/lib/components/dynamic/dynamic-item/dynamic-task/img/dynamic-task.png +0 -0
  20. package/lib/components/dynamic/dynamic-item/dynamic-task/index.css +7 -1
  21. package/lib/components/dynamic/dynamic-item/dynamic-task/index.js +17 -7
  22. package/lib/components/dynamic/dynamic-like-ranking/index.css +1 -2
  23. package/lib/components/dynamic/dynamic-like-ranking/index.js +11 -6
  24. package/lib/components/dynamic/dynamic-liking/index.css +0 -1
  25. package/lib/components/dynamic/dynamic-liking/item.js +2 -20
  26. package/lib/components/dynamic/dynamic.js +4 -1
  27. package/lib/components/dynamic/new-ui.css +206 -0
  28. package/lib/components/dynamic/quick-operation/components/create-announcement/index.js +2 -2
  29. package/lib/components/dynamic/quick-operation/components/create-okr/index.js +2 -2
  30. package/lib/components/dynamic/quick-operation/components/create-share/index.js +2 -2
  31. package/lib/components/dynamic/quick-operation/components/create-task/index.js +2 -2
  32. package/lib/components/dynamic/quick-operation/img/okr.png +0 -0
  33. package/lib/components/dynamic/quick-operation/img/send-announcement.png +0 -0
  34. package/lib/components/dynamic/quick-operation/img/send-share.png +0 -0
  35. package/lib/components/dynamic/quick-operation/img/task.png +0 -0
  36. package/lib/components/dynamic/util.js +1 -1
  37. package/lib/components/file-list/components/single-file/index.css +2 -2
  38. package/lib/components/file-list/components/single-file/index.js +1 -1
  39. package/lib/components/form/form-fields/radios/index.css +5 -0
  40. package/lib/components/form/form-fields/radios/index.js +34 -5
  41. package/lib/components/help-card/image/canceled.svg +13 -0
  42. package/lib/components/help-card/image/helpzx.svg +8 -0
  43. package/lib/components/help-card/image/kefu.svg +18 -0
  44. package/lib/components/help-card/image/kefu1.svg +8 -0
  45. package/lib/components/help-card/image/okr-shequ.svg +14 -0
  46. package/lib/components/help-card/image/question.svg +20 -0
  47. package/lib/components/help-card/image/yuyueyanshi.svg +8 -0
  48. package/lib/components/help-card/index.css +219 -0
  49. package/lib/components/help-card/index.js +286 -0
  50. package/lib/components/help-card/request-api.js +34 -0
  51. package/lib/components/img-viewer/index.css +4 -0
  52. package/lib/components/img-viewer/index.js +2 -1
  53. package/lib/components/menus/components/drag-resize/index.css +4 -4
  54. package/lib/components/menus/components/drag-resize/index.js +35 -30
  55. package/lib/components/menus/components/flip-menu-card/index.css +7 -2
  56. package/lib/components/menus/components/flip-menu-card/index.js +17 -15
  57. package/lib/components/menus/components/menu-card/index.js +1 -6
  58. package/lib/components/menus/components/menu-close-btn/index.css +2 -1
  59. package/lib/components/menus/components/menu-tree/images/loading-node.gif +0 -0
  60. package/lib/components/menus/components/menu-tree/index.js +4 -3
  61. package/lib/components/menus/components/menu-tree/tree-node/avatar/index.css +50 -0
  62. package/lib/components/menus/components/menu-tree/tree-node/avatar/index.js +72 -0
  63. package/lib/components/menus/components/menu-tree/tree-node/compony-node/index.js +3 -1
  64. package/lib/components/menus/components/menu-tree/tree-node/depart-node/index.js +8 -4
  65. package/lib/components/menus/components/menu-tree/tree-node/follower-node/index.css +48 -0
  66. package/lib/components/menus/components/menu-tree/tree-node/follower-node/index.js +65 -0
  67. package/lib/components/menus/components/menu-tree/tree-node/index.css +72 -0
  68. package/lib/components/menus/components/menu-tree/tree-node/index.js +19 -0
  69. package/lib/components/{button/admin-button/primary.js → menus/components/menu-tree/tree-node/loading-node.js} +7 -14
  70. package/lib/components/menus/components/menu-tree/tree-node/no-follower-node.js +24 -0
  71. package/lib/components/menus/components/menu-tree/tree-node/user-concern-node.js +7 -3
  72. package/lib/components/menus/components/menu-tree/tree-node/user-node/index.css +3 -0
  73. package/lib/components/menus/components/menu-tree/tree-node/user-node/index.js +9 -42
  74. package/lib/components/menus/export-modules/appraisal-menus/datas.js +45 -18
  75. package/lib/components/menus/export-modules/depart-menus/index.js +34 -7
  76. package/lib/components/menus/export-modules/okr-menus/datas.js +102 -2
  77. package/lib/components/menus/export-modules/okr-menus/index.css +0 -3
  78. package/lib/components/menus/export-modules/okr-menus/index.js +73 -20
  79. package/lib/components/menus/export-modules/subordinate-menus/index.js +3 -2
  80. package/lib/components/menus/request-apis.js +22 -5
  81. package/lib/components/nav-top/components/menu/index.js +7 -5
  82. package/lib/components/nav-top/components/user-message/components/inform/index.css +28 -6
  83. package/lib/components/nav-top/components/user-message/components/inform/index.js +184 -22
  84. package/lib/components/nav-top/components/user-message/components/red-pack/index.css +40 -0
  85. package/lib/components/nav-top/components/user-message/components/red-pack/index.js +105 -0
  86. package/lib/components/nav-top/components/user-message/components/red-pack/request-api.js +14 -0
  87. package/lib/components/nav-top/components/user-message/components/remind/index.css +25 -8
  88. package/lib/components/nav-top/components/user-message/components/remind/index.js +74 -21
  89. package/lib/components/nav-top/components/user-message/components/reply/index.css +27 -6
  90. package/lib/components/nav-top/components/user-message/components/reply/index.js +129 -24
  91. package/lib/components/nav-top/components/user-message/components/tab-title/index.js +4 -8
  92. package/lib/components/nav-top/components/user-message/components/todos/index.css +25 -12
  93. package/lib/components/nav-top/components/user-message/components/todos/index.js +147 -23
  94. package/lib/components/nav-top/components/user-message/constant.js +11 -1
  95. package/lib/components/nav-top/components/user-message/images/loading.gif +0 -0
  96. package/lib/components/nav-top/components/user-message/images/msg-reward.png +0 -0
  97. package/lib/components/nav-top/components/user-message/index.css +37 -0
  98. package/lib/components/nav-top/components/user-message/index.js +86 -72
  99. package/lib/components/nav-top/components/user-message/msg/index.js +17 -24
  100. package/lib/components/nav-top/components/user-message/utils.js +14 -0
  101. package/lib/components/nav-top/components/user-own-menu/index.js +3 -4
  102. package/lib/components/nav-top/components/user-own-menu/utils.js +77 -0
  103. package/lib/components/nav-top/constant.js +1 -1
  104. package/lib/components/nav-top/index.js +12 -12
  105. package/lib/components/nav-top/request.apis.js +52 -0
  106. package/lib/components/nav-top/utils.js +10 -70
  107. package/lib/components/okr-filter-drawer/filter-button.js +1 -0
  108. package/lib/components/okr-filter-drawer/filter-form.js +163 -0
  109. package/lib/components/okr-filter-drawer/index.css +45 -0
  110. package/lib/components/okr-filter-drawer/index.js +42 -0
  111. package/lib/components/pagination/index.css +6 -12
  112. package/lib/components/photo-card/components/card/index.css +78 -105
  113. package/lib/components/photo-card/components/card/index.js +133 -40
  114. package/lib/components/photo-card/data.js +5 -5
  115. package/lib/components/photo-card/images/assistant.svg +40 -0
  116. package/lib/components/photo-card/images/back-manager.svg +40 -0
  117. package/lib/components/photo-card/images/boss.svg +38 -0
  118. package/lib/components/photo-card/images/depart-leader.svg +40 -0
  119. package/lib/components/photo-card/images/super-manager.svg +40 -0
  120. package/lib/components/photo-card/index.css +12 -12
  121. package/lib/components/photo-card/index.js +17 -13
  122. package/lib/components/point-demo/drop-down-box/index.css +98 -0
  123. package/lib/components/point-demo/drop-down-box/index.js +159 -0
  124. package/lib/components/point-demo/image/demo-bcg.png +0 -0
  125. package/lib/components/point-demo/image/down.svg +14 -0
  126. package/lib/components/point-demo/image/icon-canceled.svg +7 -0
  127. package/lib/components/point-demo/image/logo.svg +64 -0
  128. package/lib/components/point-demo/index.css +348 -0
  129. package/lib/components/point-demo/index.js +657 -0
  130. package/lib/components/point-demo/input/index.css +74 -0
  131. package/lib/components/point-demo/input/index.js +176 -0
  132. package/lib/components/point-demo/point-demo.js +93 -0
  133. package/lib/components/point-demo/popup/index.css +7 -0
  134. package/lib/components/point-demo/popup/index.js +113 -0
  135. package/lib/components/point-demo/popup/placement.js +44 -0
  136. package/lib/components/point-demo/popup/rc-trigger.css +127 -0
  137. package/lib/components/tree/index.js +0 -2
  138. package/lib/components/update-modal/img/background.png +0 -0
  139. package/lib/components/update-modal/img/rocket.png +0 -0
  140. package/lib/components/update-modal/index.css +80 -0
  141. package/lib/components/update-modal/index.js +83 -0
  142. package/lib/components/update-modal/request-api.js +17 -0
  143. package/lib/hooks/useLocalStorage.js +37 -0
  144. package/lib/index.js +22 -2
  145. package/lib/pages/aha2021/index.css +16 -1
  146. package/lib/pages/aha2021/index.js +15 -5
  147. package/lib/pages/new-okr-list/context.js +14 -0
  148. package/lib/{components/button/export-button/index.js → pages/new-okr-list/header/create-okr.js} +24 -44
  149. package/lib/pages/new-okr-list/header/depart-title.js +19 -0
  150. package/lib/pages/new-okr-list/header/filter.js +58 -0
  151. package/lib/pages/new-okr-list/header/index.css +31 -0
  152. package/lib/pages/new-okr-list/header/index.js +94 -0
  153. package/lib/pages/new-okr-list/header/user-title.js +19 -0
  154. package/lib/pages/new-okr-list/index.css +10 -0
  155. package/lib/pages/new-okr-list/index.js +127 -0
  156. package/lib/pages/new-okr-list/keyword-search/index.css +71 -0
  157. package/lib/{components/button/admin-button/drop-down-arrow.js → pages/new-okr-list/keyword-search/index.js} +54 -47
  158. package/lib/pages/new-okr-list/list/index.css +0 -0
  159. package/lib/pages/new-okr-list/list/index.js +48 -0
  160. package/lib/pages/new-okr-list/precls.js +8 -0
  161. package/lib/pages/new-okr-list/request-api.js +57 -0
  162. package/lib/pages/new-okr-list/theme.css +3 -0
  163. package/lib/pages/okr-map/hooks/useStorage.js +1 -1
  164. package/lib/pages/okr-map/utils.js +11 -7
  165. package/lib/pages/personal-info/index.js +5 -3
  166. package/lib/utils/bs-global.js +16 -1
  167. package/package.json +2 -1
  168. package/lib/components/button/admin-button/default.js +0 -35
  169. package/lib/components/button/admin-button/index.css +0 -86
  170. package/lib/components/button/admin-button/index.js +0 -40
  171. package/lib/components/button/admin-button/secondary.js +0 -35
  172. package/lib/components/button/export-button/index.css +0 -51
  173. package/lib/components/dynamic/dynamic-item/components/icon/index.css +0 -10
  174. package/lib/components/dynamic/dynamic-item/components/icon/index.js +0 -35
  175. package/lib/components/dynamic/dynamic-item/dynamic-milestone/img/milestone.png +0 -0
  176. package/lib/components/dynamic/dynamic-item/dynamic-project/img/project.png +0 -0
  177. package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-cancel.png +0 -0
  178. package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-delay.png +0 -0
  179. package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-done.png +0 -0
  180. package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-pause.png +0 -0
  181. package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-progress.png +0 -0
  182. package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-unaccept.png +0 -0
  183. package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-unstart.png +0 -0
  184. package/lib/components/dynamic/quick-operation/img/create-announcement.png +0 -0
  185. package/lib/components/dynamic/quick-operation/img/create-okr.png +0 -0
  186. package/lib/components/dynamic/quick-operation/img/create-share.png +0 -0
  187. package/lib/components/dynamic/quick-operation/img/create-task.png +0 -0
  188. package/lib/components/nav-top/mock.js +0 -36
@@ -0,0 +1,77 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getOwnSet = void 0;
7
+
8
+ var _auth = require("../../../../utils/auth");
9
+
10
+ var _bsGlobal = require("../../../../utils/bs-global");
11
+
12
+ var _manage = _interopRequireDefault(require("../../images/manage.svg"));
13
+
14
+ var _ownHome = _interopRequireDefault(require("../../images/own-home.svg"));
15
+
16
+ var _set = _interopRequireDefault(require("../../images/set.svg"));
17
+
18
+ var _open = _interopRequireDefault(require("../../images/open.svg"));
19
+
20
+ var _qiyeO = _interopRequireDefault(require("../../images/qiye-o.svg"));
21
+
22
+ var _exit = _interopRequireDefault(require("../../images/exit.svg"));
23
+
24
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
25
+
26
+ var userId = (0, _bsGlobal.getUserInfo)().Id;
27
+ var apiServer = (0, _bsGlobal.getBSGlobal)("apiPath");
28
+ var tm = (0, _bsGlobal.getBSGlobal)("tm");
29
+ var isBoss = new _auth.BaseAuth().isBoss();
30
+ var isManager = new _auth.BaseAuth().isManager();
31
+
32
+ var getOwnSet = function getOwnSet() {
33
+ var ownhandle = [{
34
+ id: "ownHome",
35
+ url: _ownHome["default"],
36
+ title: "个人信息",
37
+ objUrl: "".concat(apiServer, "/u/").concat(userId, "/Home/#user-info")
38
+ }, {
39
+ id: "ownSet",
40
+ url: _set["default"],
41
+ title: "个人设置",
42
+ objUrl: "".concat(apiServer, "/u/").concat(userId, "/Home/#setting")
43
+ }];
44
+ var limit = [{
45
+ id: "manage",
46
+ url: _manage["default"],
47
+ title: "企业管理后台",
48
+ objUrl: "".concat(tm)
49
+ }, {
50
+ id: "open",
51
+ url: _open["default"],
52
+ title: "开启高级设置",
53
+ objUrl: "".concat(tm, "/").concat(userId, "/TmHome#?iTalentFrameType=iframe&iTalentFrame=%2F%2Fadmin.tita.gift%2F500000036%2FindexV2%23%2FadvancedSettings")
54
+ }, {
55
+ id: "role",
56
+ url: _qiyeO["default"],
57
+ title: "企业管理规定",
58
+ objUrl: "".concat(apiServer, "/u/").concat(userId, "/Home#setting?id=15709")
59
+ }];
60
+ var exit = [{
61
+ id: "Logout",
62
+ url: _exit["default"],
63
+ title: "退出登录",
64
+ objUrl: "".concat(apiServer, "/Account/Logout")
65
+ }];
66
+ var newOwnSet = [];
67
+ newOwnSet.push(ownhandle);
68
+
69
+ if (isBoss || isManager) {
70
+ newOwnSet.push(limit);
71
+ }
72
+
73
+ newOwnSet.push(exit);
74
+ return newOwnSet;
75
+ };
76
+
77
+ exports.getOwnSet = getOwnSet;
@@ -34,7 +34,7 @@ exports.popupAlignPhoto = popupAlignPhoto;
34
34
  var path = {
35
35
  todoPath: "todo/Get?app_type=-1&app_id=-1&page_num=1&page_size=50&status=1&pageNum=1",
36
36
  remindPath: "remind/get",
37
- informPath: "messages/Get?page_size=20&page_num=1&status=2&app_type=-1&app_id=-1",
37
+ informPath: "messages/Get?page_size=1000&page_num=1&status=1&app_type=-1&app_id=-1",
38
38
  replyPath: "comment/messages?page_num=1&page_size=20&status=2"
39
39
  };
40
40
  exports.path = path;
@@ -21,8 +21,6 @@ var _userOwnMenu = _interopRequireDefault(require("./components/user-own-menu"))
21
21
 
22
22
  var _menu = _interopRequireDefault(require("./components/menu"));
23
23
 
24
- var _mock = require("./mock");
25
-
26
24
  var _userMessage = _interopRequireDefault(require("./components/user-message"));
27
25
 
28
26
  var _home = _interopRequireDefault(require("./images/home.png"));
@@ -31,6 +29,8 @@ var _version = _interopRequireDefault(require("./components/version"));
31
29
 
32
30
  var _constant = require("./constant");
33
31
 
32
+ var _utils = require("./utils");
33
+
34
34
  require("./index.css");
35
35
 
36
36
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -64,14 +64,13 @@ var _getUserInfo = (0, _bsGlobal.getUserInfo)(),
64
64
  var preCls = "titaui-nav-top";
65
65
 
66
66
  var NavTop = function NavTop() {
67
- var _useState = (0, _react.useState)(_mock.menuData),
68
- _useState2 = _slicedToArray(_useState, 2),
69
- menu = _useState2[0],
70
- setMenu = _useState2[1];
67
+ var _useState = (0, _react.useState)((0, _utils.getMenus)()),
68
+ _useState2 = _slicedToArray(_useState, 1),
69
+ menu = _useState2[0];
71
70
 
72
71
  var versionInfo = (0, _bsGlobal.getBSGlobal)("tenantAuthentication");
73
72
 
74
- var _useState3 = (0, _react.useState)(""),
73
+ var _useState3 = (0, _react.useState)(-1),
75
74
  _useState4 = _slicedToArray(_useState3, 2),
76
75
  activeMenuId = _useState4[0],
77
76
  setActiveMenuId = _useState4[1];
@@ -81,7 +80,7 @@ var NavTop = function NavTop() {
81
80
 
82
81
  if (hash) {
83
82
  var activeMenu = menu.find(function (item) {
84
- return hash.includes(item.hash);
83
+ return hash.includes(item.href.split('#')[1]);
85
84
  });
86
85
 
87
86
  if (activeMenu) {
@@ -91,16 +90,17 @@ var NavTop = function NavTop() {
91
90
  };
92
91
 
93
92
  (0, _react.useEffect)(function () {
93
+ handleHashChange();
94
94
  window.addEventListener("hashchange", handleHashChange);
95
+ return function () {
96
+ window.removeEventListener("hashchange", handleHashChange);
97
+ };
95
98
  }, []);
96
- (0, _react.useEffect)(function () {
97
- handleHashChange();
98
- }, [menu]);
99
99
  return /*#__PURE__*/_react["default"].createElement("div", {
100
100
  className: (0, _classnames["default"])("".concat(preCls))
101
101
  }, /*#__PURE__*/_react["default"].createElement("a", {
102
102
  className: (0, _classnames["default"])("".concat(preCls, "__left")),
103
- href: "#".concat(menu[0].hash)
103
+ href: "#".concat(menu[0].href)
104
104
  }, /*#__PURE__*/_react["default"].createElement("img", {
105
105
  src: Logo,
106
106
  className: (0, _classnames["default"])("".concat(preCls, "__left-logo"))
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getMessages = exports.getInforms = exports.getReminds = exports.getReplys = exports.getData = exports.getTodos = void 0;
7
+
8
+ var _request = require("../../utils/request");
9
+
10
+ var _constant = require("./constant");
11
+
12
+ var getTodos = function getTodos(pageNum) {
13
+ return (0, _request.rget)("v1")("todo/Get?app_type=-1&app_id=-1&page_num=".concat(pageNum, "&page_size=20&status=1"));
14
+ };
15
+
16
+ exports.getTodos = getTodos;
17
+
18
+ var getData = function getData(url, saveData) {
19
+ return (0, _request.rget)("v1")(url).then(function (res) {
20
+ saveData(res.Data);
21
+ });
22
+ };
23
+
24
+ exports.getData = getData;
25
+
26
+ var getReplys = function getReplys(pageNum) {
27
+ return (0, _request.rget)("v1")("comment/messages?page_num=".concat(pageNum, "&page_size=20&status=2"));
28
+ };
29
+
30
+ exports.getReplys = getReplys;
31
+
32
+ var getReminds = function getReminds() {
33
+ return (0, _request.rget)("v2")(_constant.path.remindPath);
34
+ };
35
+
36
+ exports.getReminds = getReminds;
37
+
38
+ var getInforms = function getInforms(pageNum) {
39
+ return (0, _request.rget)("v1")("messages/Get?page_size=20&page_num=".concat(pageNum, "&status=1&app_type=-1&app_id=-1"));
40
+ };
41
+
42
+ exports.getInforms = getInforms;
43
+
44
+ var getMessages = function getMessages() {
45
+ var nowTime = new Date();
46
+ var year = nowTime.getFullYear();
47
+ var month = nowTime.getMonth() + 1;
48
+ var date = nowTime.getDate();
49
+ return (0, _request.rget)("v1")("RemindV2/Get?dateTime=".concat(year, "/").concat(month, "/").concat(date));
50
+ };
51
+
52
+ exports.getMessages = getMessages;
@@ -3,75 +3,15 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.getOwnSet = void 0;
7
-
8
- var _auth = require("../../utils/auth");
9
-
10
- var _bsGlobal = require("../../utils/bs-global");
11
-
12
- var _manage = _interopRequireDefault(require("./images/manage.png"));
13
-
14
- var _ownHome = _interopRequireDefault(require("./images/own-home.svg"));
15
-
16
- var _set = _interopRequireDefault(require("./images/set.svg"));
17
-
18
- var _open = _interopRequireDefault(require("./images/open.svg"));
19
-
20
- var _qiyeO = _interopRequireDefault(require("./images/qiye-o.svg"));
21
-
22
- var _exit = _interopRequireDefault(require("./images/exit.svg"));
23
-
24
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
25
-
26
- var userId = (0, _bsGlobal.getUserInfo)().Id;
27
- var apiServer = (0, _bsGlobal.getBSGlobal)("apiPath");
28
- var tm = (0, _bsGlobal.getBSGlobal)("tm");
29
- var isBoss = new _auth.BaseAuth().isBoss();
30
- var isManager = new _auth.BaseAuth().isManager();
31
-
32
- var getOwnSet = function getOwnSet() {
33
- var ownhandle = [{
34
- id: "ownHome",
35
- url: _ownHome["default"],
36
- title: "个人信息",
37
- objUrl: "".concat(apiServer, "/u/").concat(userId, "/Home/#user-info")
38
- }, {
39
- id: "ownSet",
40
- url: _set["default"],
41
- title: "个人设置",
42
- objUrl: "".concat(apiServer, "/u/").concat(userId, "/Home/#setting")
43
- }];
44
- var limit = [{
45
- id: "manage",
46
- url: _manage["default"],
47
- title: "企业管理后台",
48
- objUrl: "".concat(tm)
49
- }, {
50
- id: "open",
51
- url: _open["default"],
52
- title: "开启高级设置",
53
- objUrl: "".concat(tm, "/").concat(userId, "/TmHome#?iTalentFrameType=iframe&iTalentFrame=%2F%2Fadmin.tita.gift%2F500000036%2FindexV2%23%2FadvancedSettings")
54
- }, {
55
- id: "role",
56
- url: _qiyeO["default"],
57
- title: "企业管理规定",
58
- objUrl: "".concat(apiServer, "/u/").concat(userId, "/Home#setting?id=15709")
59
- }];
60
- var exit = [{
61
- id: "Logout",
62
- url: _exit["default"],
63
- title: "退出登录",
64
- objUrl: "".concat(apiServer, "/Account/Logout")
65
- }];
66
- var newOwnSet = [];
67
- newOwnSet.push(ownhandle);
68
-
69
- if (isBoss || isManager) {
70
- newOwnSet.push(limit);
71
- }
72
-
73
- newOwnSet.push(exit);
74
- return newOwnSet;
6
+ exports.getMenus = void 0;
7
+
8
+ var getMenus = function getMenus() {
9
+ // @ts-ignore
10
+ var navs = BSGlobal.newNavigation;
11
+ navs.sort(function (pre, next) {
12
+ return pre.orderId - next.orderId;
13
+ });
14
+ return navs;
75
15
  };
76
16
 
77
- exports.getOwnSet = getOwnSet;
17
+ exports.getMenus = getMenus;
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1,163 @@
1
+ "use strict";
2
+
3
+ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports["default"] = void 0;
9
+
10
+ var _react = _interopRequireWildcard(require("react"));
11
+
12
+ var _checkbox = _interopRequireDefault(require("../checkbox"));
13
+
14
+ var _button = require("../button");
15
+
16
+ var _form = _interopRequireWildcard(require("../form"));
17
+
18
+ require("./index.css");
19
+
20
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
21
+
22
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
23
+
24
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
25
+
26
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
27
+
28
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
29
+
30
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
31
+
32
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
33
+
34
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
35
+
36
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
37
+
38
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
39
+
40
+ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
41
+
42
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
43
+
44
+ function _objectDestructuringEmpty(obj) { if (obj == null) throw new TypeError("Cannot destructure undefined"); }
45
+
46
+ var preCls = "tita-filter__form";
47
+
48
+ var Filter = function Filter(_ref) {
49
+ _objectDestructuringEmpty(_ref);
50
+
51
+ var _useState = (0, _react.useState)({
52
+ targetType: "",
53
+ targetCategory: "",
54
+ targetSort: ""
55
+ }),
56
+ _useState2 = _slicedToArray(_useState, 2),
57
+ formFieldValues = _useState2[0],
58
+ setFormFieldValues = _useState2[1];
59
+
60
+ var formContainerRef = (0, _react.useRef)();
61
+ var formRef = (0, _react.useRef)();
62
+
63
+ var onFieldsChangeHandler = function onFieldsChangeHandler(fields) {
64
+ setFormFieldValues(_objectSpread({}, fields));
65
+ };
66
+
67
+ var resetValues = function resetValues() {
68
+ setFormFieldValues({
69
+ targetType: "",
70
+ targetCategory: "",
71
+ targetSort: ""
72
+ });
73
+ };
74
+
75
+ var handleRemember = function handleRemember(checked) {
76
+ if (checked) {} else {
77
+ console.log(1223);
78
+ }
79
+ };
80
+
81
+ var targetTypeList = [{
82
+ label: "公司",
83
+ value: 1
84
+ }, {
85
+ label: "部门",
86
+ value: 2
87
+ }, {
88
+ label: "团队",
89
+ value: 3
90
+ }, {
91
+ label: "个人",
92
+ value: 4
93
+ }];
94
+ var targetCategoryList = [{
95
+ label: "承诺型",
96
+ value: 1
97
+ }, {
98
+ label: "愿景型",
99
+ value: 2
100
+ }];
101
+ var targetSortList = [{
102
+ label: "创建时间最早",
103
+ value: 1
104
+ }, {
105
+ label: "创建时间最晚",
106
+ value: 2
107
+ }, {
108
+ label: "更新时间最早",
109
+ value: 3
110
+ }, {
111
+ label: "更新时间最晚",
112
+ value: 4
113
+ }, {
114
+ label: "按负责人排序",
115
+ value: 5
116
+ }];
117
+ return /*#__PURE__*/_react["default"].createElement("div", {
118
+ className: "".concat(preCls)
119
+ }, /*#__PURE__*/_react["default"].createElement("div", {
120
+ className: "".concat(preCls, "__content")
121
+ }, /*#__PURE__*/_react["default"].createElement(_form["default"], {
122
+ ref: formRef,
123
+ getFormContainer: function getFormContainer() {
124
+ return formContainerRef.current;
125
+ },
126
+ onFieldsChange: onFieldsChangeHandler
127
+ }, /*#__PURE__*/_react["default"].createElement(_form.FormFields.Radios, {
128
+ name: "targetType",
129
+ label: "\u76EE\u6807\u7C7B\u578B",
130
+ radios: targetTypeList,
131
+ value: formFieldValues.targetType,
132
+ radioClass: "".concat(preCls, "-radio")
133
+ }), /*#__PURE__*/_react["default"].createElement(_form.FormFields.Radios, {
134
+ name: "targetCategory",
135
+ label: "\u76EE\u6807\u7C7B\u578B",
136
+ radios: targetCategoryList,
137
+ value: formFieldValues.targetCategory,
138
+ radioClass: "".concat(preCls, "-radio")
139
+ }), /*#__PURE__*/_react["default"].createElement(_form.FormFields.Radios, {
140
+ name: "targetSort",
141
+ label: "\u76EE\u6807\u7C7B\u578B",
142
+ radios: targetSortList,
143
+ value: formFieldValues.targetSort,
144
+ radioClass: "".concat(preCls, "-radio")
145
+ }))), /*#__PURE__*/_react["default"].createElement("div", {
146
+ className: "".concat(preCls, "__footer")
147
+ }, /*#__PURE__*/_react["default"].createElement("span", {
148
+ className: "".concat(preCls, "__footer-checkbox")
149
+ }, /*#__PURE__*/_react["default"].createElement(_checkbox["default"], {
150
+ onChange: handleRemember
151
+ }), /*#__PURE__*/_react["default"].createElement("span", {
152
+ className: "".concat(preCls, "__footer-checkbox-text")
153
+ }, "\u8BB0\u4F4F\u9009\u62E9")), /*#__PURE__*/_react["default"].createElement(_button.RectBtn, {
154
+ className: "".concat(preCls, "__footer-reset"),
155
+ onClick: resetValues
156
+ }, "\u91CD\u7F6E"), /*#__PURE__*/_react["default"].createElement(_button.RectBtn, {
157
+ className: "".concat(preCls, "__footer-sure"),
158
+ type: "primary"
159
+ }, "\u786E\u5B9A")));
160
+ };
161
+
162
+ var _default = Filter;
163
+ exports["default"] = _default;
@@ -0,0 +1,45 @@
1
+ .tita-filter__form {
2
+ height: calc(100% - 57px);
3
+ display: flex;
4
+ flex-direction: column;
5
+ justify-content: space-between;
6
+ padding: 20px 32px 18px;
7
+ box-sizing: border-box;
8
+ }
9
+
10
+ .tita-filter__form .titaui-form-field {
11
+ margin-top: 16px;
12
+ }
13
+
14
+ .tita-filter__form .titaui-form-field:nth-of-type(1) {
15
+ margin-top: unset;
16
+ }
17
+
18
+ .tita-filter__form .form-field-radio__label {
19
+ margin-bottom: 16px;
20
+ }
21
+
22
+ .tita-filter__form-radio {
23
+ width: 154px;
24
+ height: 22px;
25
+ margin-bottom: 12px;
26
+ }
27
+
28
+ .tita-filter__form__footer {
29
+ display: flex;
30
+ align-items: center;
31
+ }
32
+
33
+ .tita-filter__form__footer-checkbox {
34
+ display: inline-flex;
35
+ align-items: center;
36
+ }
37
+
38
+ .tita-filter__form__footer-checkbox-text {
39
+ margin-left: 3px;
40
+ }
41
+
42
+ .tita-filter__form__footer-reset {
43
+ margin-left: 40px;
44
+ margin-right: 12px;
45
+ }
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+
3
+ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports["default"] = void 0;
9
+
10
+ var _react = _interopRequireWildcard(require("react"));
11
+
12
+ var _drawer = _interopRequireDefault(require("../drawer"));
13
+
14
+ var _filterForm = _interopRequireDefault(require("./filter-form"));
15
+
16
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
17
+
18
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
19
+
20
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
21
+
22
+ var Filter = function Filter(_ref) {
23
+ var _ref$visible = _ref.visible,
24
+ visible = _ref$visible === void 0 ? false : _ref$visible,
25
+ _ref$setVisible = _ref.setVisible,
26
+ setVisible = _ref$setVisible === void 0 ? function () {} : _ref$setVisible;
27
+
28
+ var closeFilterDrawer = function closeFilterDrawer() {
29
+ return setVisible(false);
30
+ };
31
+
32
+ return /*#__PURE__*/_react["default"].createElement(_react.Fragment, null, /*#__PURE__*/_react["default"].createElement(_drawer["default"], {
33
+ visible: visible,
34
+ onClose: closeFilterDrawer,
35
+ width: 372
36
+ }, /*#__PURE__*/_react["default"].createElement(_drawer["default"].Header, {
37
+ content: "\u9AD8\u7EA7\u7B5B\u9009"
38
+ }), /*#__PURE__*/_react["default"].createElement(_filterForm["default"], null)));
39
+ };
40
+
41
+ var _default = Filter;
42
+ exports["default"] = _default;
@@ -72,7 +72,7 @@
72
72
  }
73
73
 
74
74
  .titaui-pagination-options-quick-jumper {
75
- margin-left: 8px;
75
+ margin-left: 4px;
76
76
  display: inline-flex;
77
77
  align-items: center;
78
78
  white-space: nowrap;
@@ -83,7 +83,7 @@
83
83
  margin: 0 8px;
84
84
  padding: 0 4px;
85
85
  border: 1px solid #E9ECF0;
86
- border-radius: 4px;
86
+ border-radius: 8px;
87
87
  transition: all .3s ease;
88
88
  box-sizing: border-box;
89
89
  }
@@ -99,7 +99,7 @@
99
99
  margin: 0 4px;
100
100
  padding: 0 6px;
101
101
  border: 1px solid #E9ECF0;
102
- border-radius: 4px;
102
+ border-radius: 8px;
103
103
  background: #FFFFFF;
104
104
  }
105
105
 
@@ -130,12 +130,12 @@
130
130
  }
131
131
 
132
132
  .titaui-pagination__size--md .titaui-pagination__select {
133
- margin-left: 12px;
133
+ margin-left: 4px;
134
134
  }
135
135
 
136
136
  .titaui-pagination__size--md .titaui-pagination__select-selector {
137
137
  border: 1px solid #E9ECF0 !important;
138
- border-radius: 4px;
138
+ border-radius: 8px;
139
139
  background: #ffffff;
140
140
  transition: all .3s ease;
141
141
  }
@@ -200,12 +200,7 @@
200
200
  cursor: not-allowed;
201
201
  }
202
202
 
203
- .titaui-pagination__select {
204
- width: 98px !important;
205
- }
206
-
207
203
  .titaui-pagination__select-selector {
208
- width: 98px;
209
204
  height: 28px !important;
210
205
  margin: 0;
211
206
  box-sizing: border-box;
@@ -245,9 +240,8 @@
245
240
  }
246
241
 
247
242
  .titaui-pagination__select-dropdown {
248
- width: 98px !important;
249
243
  border: none !important;
250
- border-radius: 4px;
244
+ border-radius: 8px;
251
245
  }
252
246
 
253
247
  .titaui-pagination__select-item-option {