@titaui/pc 1.11.27-beta.8 → 1.11.29
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/lib/components/avatar/name-avatar/index.css +0 -1
- package/lib/components/avatar/name-avatar/index.js +13 -22
- package/lib/components/avatar/text-avatar/index.css +7 -0
- package/lib/components/avatar/text-avatar/index.js +32 -7
- package/lib/components/button/icon-btn/index.js +17 -8
- package/lib/components/button/rect-btn/index.css +11 -45
- package/lib/components/button/rect-btn/index.js +13 -19
- package/lib/components/change-okr-modal/Item.js +14 -14
- package/lib/components/change-okr-modal/index.js +1 -2
- package/lib/components/create-okr-modal/index.js +1 -3
- package/lib/components/create-okr-modal/request-api.js +1 -1
- package/lib/components/dialog-confirm/index.css +2 -2
- package/lib/components/drawer/headerAction.js +1 -5
- package/lib/components/drawer/headerDrop.js +4 -42
- package/lib/components/drawer/index.css +0 -33
- package/lib/components/drawer/index.js +3 -26
- package/lib/components/drop-selector/index.js +25 -10
- package/lib/components/dynamic/advertise/components/next-btn/index.css +27 -0
- package/lib/components/dynamic/advertise/components/next-btn/index.js +32 -0
- package/lib/components/dynamic/advertise/components/pre-btn/index.css +26 -0
- package/lib/components/dynamic/advertise/components/pre-btn/index.js +32 -0
- package/lib/components/dynamic/advertise/index.css +21 -0
- package/lib/components/dynamic/advertise/index.js +126 -0
- package/lib/components/dynamic/advertise/interface.js +5 -0
- package/lib/components/dynamic/advertise/util.js +28 -0
- package/lib/components/dynamic/components/dynamic-search-input/index.css +81 -0
- package/lib/components/dynamic/components/dynamic-search-input/index.js +203 -0
- package/lib/components/dynamic/components/first-level-tabs/index.css +101 -0
- package/lib/components/dynamic/components/first-level-tabs/index.js +131 -0
- package/lib/components/dynamic/constant.js +33 -32
- package/lib/components/dynamic/dynamic-item/dynamic-ai-dialy/dynamic-footer.js +9 -9
- package/lib/components/dynamic/dynamic-item/dynamic-ai-dialy/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-interview/img/wifi.svg +24 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview/index.css +51 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview/index.js +50 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview/interview-content.js +65 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview-share/img/wifi.svg +24 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview-share/index.css +61 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview-share/index.js +61 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview-share/interview-content.js +69 -0
- package/lib/components/dynamic/dynamic-item/dynamic-kr/index.js +5 -5
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.js +6 -6
- package/lib/components/dynamic/dynamic-item/dynamic-progress/index.js +10 -10
- package/lib/components/dynamic/dynamic-item/dynamic-reply/index.js +13 -13
- package/lib/components/dynamic/dynamic-item/dynamic-task/index.js +9 -9
- package/lib/components/dynamic/dynamic-item/index.js +50 -32
- package/lib/components/dynamic/dynamic-like-ranking/image/like-ranking.svg +23 -0
- package/lib/components/dynamic/dynamic-like-ranking/image/ranking-1.png +0 -0
- package/lib/components/dynamic/dynamic-like-ranking/image/ranking-2.png +0 -0
- package/lib/components/dynamic/dynamic-like-ranking/image/ranking-3.png +0 -0
- package/lib/components/dynamic/dynamic-like-ranking/image/ranking-empty.png +0 -0
- package/lib/components/dynamic/dynamic-like-ranking/index.css +146 -0
- package/lib/components/dynamic/dynamic-like-ranking/index.js +180 -0
- package/lib/components/dynamic/dynamic-like-ranking/item.js +105 -0
- package/lib/components/dynamic/dynamic-like-ranking/mock.js +84 -0
- package/lib/components/dynamic/dynamic-liking/image/like-dynamic.svg +30 -0
- package/lib/components/dynamic/dynamic-liking/index.css +81 -0
- package/lib/{pages/new-okr-list/header/operate-record.js → components/dynamic/dynamic-liking/index.js} +39 -91
- package/lib/components/dynamic/dynamic-liking/item.js +75 -0
- package/lib/components/dynamic/dynamic-liking/mock.js +83 -0
- package/lib/components/dynamic/dynamic-list/index.js +7 -15
- package/lib/components/dynamic/dynamic-topping/image/quotation-mark.svg +16 -0
- package/lib/components/dynamic/dynamic-topping/image/top-icon.svg +30 -0
- package/lib/components/dynamic/dynamic-topping/index.css +141 -0
- package/lib/components/dynamic/dynamic-topping/index.js +82 -0
- package/lib/components/dynamic/dynamic-topping/interface.js +5 -0
- package/lib/components/dynamic/dynamic-topping/item.js +153 -0
- package/lib/components/dynamic/dynamic-topping/request-api.js +36 -0
- package/lib/components/dynamic/dynamic.css +173 -0
- package/lib/components/dynamic/dynamic.js +428 -0
- package/lib/components/dynamic/export-module/index.js +37 -0
- package/lib/components/dynamic/img/dynamic-top.svg +14 -0
- package/lib/components/dynamic/index.js +12 -9
- package/lib/components/dynamic/my-team/img/add-subordinate.png +0 -0
- package/lib/components/dynamic/my-team/img/line.png +0 -0
- package/lib/components/dynamic/my-team/img/team.png +0 -0
- package/lib/components/dynamic/my-team/index.css +184 -0
- package/lib/components/dynamic/my-team/index.js +263 -0
- package/lib/components/dynamic/my-team/request-api.js +52 -0
- package/lib/components/dynamic/my-team/util.js +20 -0
- package/lib/components/dynamic/new-ui.css +192 -0
- package/lib/components/dynamic/online-broadcast/components/broadcast-item/index.css +58 -0
- package/lib/components/dynamic/online-broadcast/components/broadcast-item/index.js +68 -0
- package/lib/components/dynamic/online-broadcast/data.js +77 -0
- package/lib/components/dynamic/online-broadcast/img/broadcast.svg +14 -0
- package/lib/components/dynamic/online-broadcast/img/new.png +0 -0
- package/lib/components/dynamic/online-broadcast/img/preview.png +0 -0
- package/lib/components/dynamic/online-broadcast/index.css +46 -0
- package/lib/components/dynamic/online-broadcast/index.js +61 -0
- package/lib/components/dynamic/online-broadcast/interfact.js +5 -0
- package/lib/components/dynamic/quick-operation/components/create-announcement/index.css +25 -0
- package/lib/components/dynamic/quick-operation/components/create-announcement/index.js +39 -0
- package/lib/components/dynamic/quick-operation/components/create-okr/index.css +25 -0
- package/lib/components/dynamic/quick-operation/components/create-okr/index.js +39 -0
- package/lib/components/dynamic/quick-operation/components/create-share/index.css +25 -0
- package/lib/components/dynamic/quick-operation/components/create-share/index.js +39 -0
- package/lib/components/dynamic/quick-operation/components/create-task/index.css +25 -0
- package/lib/components/dynamic/quick-operation/components/create-task/index.js +44 -0
- package/lib/components/dynamic/quick-operation/img/new-announcement.png +0 -0
- package/lib/components/dynamic/quick-operation/img/new-okr.png +0 -0
- package/lib/components/dynamic/quick-operation/img/new-share.png +0 -0
- package/lib/components/dynamic/quick-operation/img/new-task.png +0 -0
- package/lib/components/dynamic/quick-operation/index.css +51 -0
- package/lib/components/dynamic/quick-operation/index.js +120 -0
- package/lib/components/dynamic/request-api.js +68 -7
- package/lib/components/e-priority/index.js +8 -8
- package/lib/components/eReport/eReportShare/index.js +11 -11
- package/lib/components/form/form-fields/date/index.css +24 -0
- package/lib/components/form/form-fields/date/index.js +102 -0
- package/lib/components/form/form-fields/input/index.js +10 -10
- package/lib/components/form/form-fields/user/index.css +23 -3
- package/lib/components/form/form-fields/user/index.js +18 -8
- package/lib/components/form/form-fields/user/user-input.js +15 -6
- package/lib/components/form/index.js +10 -3
- package/lib/components/grid-layout/sub-employee-okr/person-okr.js +5 -5
- package/lib/components/icon-button-list/index.js +3 -3
- package/lib/components/img-viewer/index.css +3 -3
- package/lib/components/img-viewer/index.js +11 -11
- package/lib/components/menus/components/menu-tree/images/interview-menu/my-interview.svg +16 -0
- package/lib/components/menus/components/menu-tree/images/interview-menu/template.svg +16 -0
- package/lib/components/menus/components/menu-tree/images/interview-menu/todo.svg +16 -0
- package/lib/components/menus/components/menu-tree/index.css +4 -2
- package/lib/components/menus/components/menu-tree/tree-node/index.css +85 -1
- package/lib/components/menus/export-modules/interview-menus/constant.js +30 -0
- package/lib/components/menus/export-modules/interview-menus/handle-highlight.js +63 -0
- package/lib/components/menus/export-modules/interview-menus/index.css +7 -0
- package/lib/components/menus/export-modules/interview-menus/index.js +128 -0
- package/lib/components/menus/index.js +11 -5
- package/lib/components/nav-top/components/menu/index.js +14 -14
- package/lib/components/nav-top/components/user-message/components/inform/inform-item.js +25 -19
- package/lib/components/nav-top/components/user-message/components/remind/remind-item.js +48 -10
- package/lib/components/nav-top/components/user-message/constant.js +1 -0
- package/lib/components/nav-top/components/user-message/hrMessage.js +22 -19
- package/lib/components/nav-top/components/user-message/index.js +23 -20
- package/lib/components/nav-top/index.js +4 -8
- package/lib/components/nav-top/request.apis.js +3 -1
- package/lib/components/okr-detail/base-info/other-infos/date-cycle/index.js +4 -20
- package/lib/components/okr-detail/base-info/other-infos/principal/index.js +1 -9
- package/lib/components/okr-detail/components/header/index.js +3 -10
- package/lib/components/okr-detail/components/header/o-name.js +3 -10
- package/lib/components/okr-detail/components/o-classify.js +1 -5
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-priority-dropdown.js +7 -7
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.js +10 -14
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/range-picker-pop.js +10 -0
- package/lib/components/okr-detail/detail-header/actions.js +23 -23
- package/lib/components/okr-detail/detail-header/delete-confirm/delete-confirm.js +43 -98
- package/lib/components/okr-detail/detail-header/delete-confirm/style.js +38 -0
- package/lib/components/okr-detail/detail-header/index.css +0 -11
- package/lib/components/okr-detail/detail-header/index.js +234 -228
- package/lib/components/okr-detail/index.js +21 -40
- package/lib/components/okr-detail/okr-list/index.js +8 -11
- package/lib/components/okr-detail/request-apis.js +4 -10
- package/lib/components/okr-flow/child-node/index.css +6 -6
- package/lib/components/okr-flow/child-node/work-node.js +21 -21
- package/lib/components/okr-flow/export-modal/index.js +33 -19
- package/lib/components/okr-flow/export-modules/okr-search-panel/index.js +14 -14
- package/lib/components/okr-flow/okr-map/index.js +5 -5
- package/lib/components/okr-flow/request-apis.js +4 -4
- package/lib/components/okr-flow/root-node/index.js +25 -24
- package/lib/components/okr-flow/utils/index.js +5 -5
- package/lib/components/okr-flow/utils/tree-handler.js +17 -17
- package/lib/components/okr-period-selector/index.js +5 -9
- package/lib/components/okr-period-selector/select-cycle.js +19 -23
- package/lib/components/okrcase-library/okrcases-components/submitOkr-dialog.js +30 -30
- package/lib/components/operation-records/index.js +1 -1
- package/lib/components/operation-records/style.js +1 -1
- package/lib/components/pagination/index.css +3 -3
- package/lib/components/pagination/select.css +58 -23
- package/lib/components/period-selector/index.css +3 -3
- package/lib/components/period-selector/index.js +11 -11
- package/lib/components/picker/components/panels/date-panel/date-body.js +118 -0
- package/lib/components/picker/components/panels/date-panel/date-head.js +87 -0
- package/lib/components/picker/components/panels/date-panel/index.css +14 -0
- package/lib/components/picker/components/panels/date-panel/index.js +49 -0
- package/lib/components/picker/components/panels/month-panel/index.css +27 -0
- package/lib/components/picker/components/panels/month-panel/index.js +63 -0
- package/lib/components/picker/components/panels/month-panel/month-body.js +89 -0
- package/lib/components/picker/components/panels/month-panel/month-head.js +47 -0
- package/lib/components/picker/components/panels/panel-body/index.js +53 -0
- package/lib/components/picker/components/panels/panel-head/index.js +48 -0
- package/lib/components/picker/components/panels/year-panel/index.css +23 -0
- package/lib/components/picker/components/panels/year-panel/index.js +65 -0
- package/lib/components/picker/components/panels/year-panel/year-body.js +92 -0
- package/lib/components/picker/components/panels/year-panel/year-head.js +35 -0
- package/lib/components/picker/components/picker-trigger/index.css +57 -0
- package/lib/components/picker/components/picker-trigger/index.js +94 -0
- package/lib/components/picker/context.js +15 -0
- package/lib/components/picker/index.css +121 -0
- package/lib/components/picker/index.js +13 -0
- package/lib/components/picker/picker-panels.js +182 -0
- package/lib/components/picker/picker.js +132 -0
- package/lib/components/picker/type.js +5 -0
- package/lib/components/picker/utils.js +28 -0
- package/lib/components/popup/index.js +4 -4
- package/lib/components/publish-dynamic-modal/publish-dynamic-modal.js +10 -16
- package/lib/components/radio/index.css +9 -9
- package/lib/components/scrollbar/scroll-mask/index.js +1 -1
- package/lib/components/superset-charts/utils/axios.js +5 -5
- package/lib/components/survey-model/index.css +18 -18
- package/lib/components/survey-model/instance.js +1 -1
- package/lib/components/task-relation-modal/request-api.js +1 -2
- package/lib/components/task-tree/helper.js +61 -0
- package/lib/components/task-tree/images/P1.svg +15 -0
- package/lib/components/task-tree/images/P2.svg +15 -0
- package/lib/components/task-tree/images/P3.svg +15 -0
- package/lib/components/task-tree/images/P4.svg +15 -0
- package/lib/components/task-tree/images/P5.svg +15 -0
- package/lib/components/task-tree/images/arrow.svg +9 -0
- package/lib/components/task-tree/images/empty-131.png +0 -0
- package/lib/components/task-tree/images/followed.svg +33 -0
- package/lib/components/task-tree/images/nice.svg +108 -0
- package/lib/components/task-tree/images/struc12.png +0 -0
- package/lib/components/task-tree/images/struc2.png +0 -0
- package/lib/components/task-tree/images/xialat-s.svg +13 -0
- package/lib/components/task-tree/index.js +22 -0
- package/lib/components/task-tree/mock.js +944 -0
- package/lib/components/task-tree/precls.js +8 -0
- package/lib/components/task-tree/request-apis.js +88 -0
- package/lib/components/task-tree/task-item-node/constant.js +45 -0
- package/lib/components/task-tree/task-item-node/e-empty.js +29 -0
- package/lib/components/task-tree/task-item-node/e-project.js +212 -0
- package/lib/components/task-tree/task-item-node/e-status-dropdown.js +94 -0
- package/lib/components/task-tree/task-item-node/e-task.js +426 -0
- package/lib/components/task-tree/task-item-node/get-process-color.js +62 -0
- package/lib/components/task-tree/task-item-node/index.css +289 -0
- package/lib/components/task-tree/task-item-node/task-node-render.js +43 -0
- package/lib/components/task-tree/task-tree.css +16 -0
- package/lib/components/task-tree/task-tree.js +49 -0
- package/lib/components/time-picker/index.css +123 -0
- package/lib/components/time-picker/index.js +13 -0
- package/lib/components/time-picker/time-picker-selector.js +138 -0
- package/lib/components/time-picker/time-picker.js +336 -0
- package/lib/components/time-picker/timer-picker-input.js +96 -0
- package/lib/components/time-picker/utils.js +52 -0
- package/lib/components/toast/index.js +3 -5
- package/lib/components/user-selector/select-tree/tree-nodes/tree-person-node/index.css +1 -0
- package/lib/components-v1/radio/radio.js +3 -3
- package/lib/components-v1/radio/style/index.css +8 -8
- package/lib/index.js +0 -40
- package/lib/pages/aha2021/index.js +5 -1
- package/lib/pages/new-okr-list/header/index.css +0 -45
- package/lib/pages/new-okr-list/header/index.js +16 -38
- package/lib/pages/new-okr-list/index.js +1 -3
- package/lib/pages/new-okr-list/list/index.js +2 -19
- package/lib/pages/new-okr-list/request-api.js +2 -8
- package/lib/pages/okr-map/export-modules/okr-map/header/index.js +24 -24
- package/lib/pages/okr-map/export-modules/okr-map/okr-map.js +31 -31
- package/lib/pages/okr-map/export-modules/share-okr-page/header/index.css +2 -2
- package/lib/pages/okr-map/export-modules/share-okr-page/header/index.js +11 -11
- package/lib/pages/okr-map/export-modules/share-okr-page/share-okr-map.js +8 -8
- package/lib/pages/okr-map/number-select/index.js +2 -2
- package/lib/pages/okr-map/unsupport-ie/index.js +5 -3
- package/lib/utils/auth.js +6 -6
- package/lib/utils/bs-global.js +12 -12
- package/lib/utils/format-time.js +1 -8
- package/lib/utils/hooks.js +72 -0
- package/lib/utils/open-data.js +27 -31
- package/package.json +6 -3
- package/.eslintignore +0 -3
- package/.eslintrc.js +0 -223
- package/.husky/pre-commit +0 -4
- package/.prettierignore +0 -31
- package/.prettierrc.js +0 -90
- package/.vscode/settings.json +0 -5
- package/lib/components/okr-detail/detail-header/constant.js +0 -53
- package/lib/components/okr-detail/detail-header/delete-confirm/index.css +0 -55
- package/lib/components/okr-detail/helper.js +0 -108
- package/lib/components/textarea/index.css +0 -142
- package/lib/components/textarea/index.js +0 -259
- package/lib/pages/new-okr-list/header/common.js +0 -52
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _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 _createOkr = _interopRequireDefault(require("./components/create-okr"));
|
|
13
|
+
|
|
14
|
+
var _createTask = _interopRequireDefault(require("./components/create-task"));
|
|
15
|
+
|
|
16
|
+
var _createShare = _interopRequireDefault(require("./components/create-share"));
|
|
17
|
+
|
|
18
|
+
var _createAnnouncement = _interopRequireDefault(require("./components/create-announcement"));
|
|
19
|
+
|
|
20
|
+
var _auth = require("../../../utils/auth");
|
|
21
|
+
|
|
22
|
+
var _createOkrModal = _interopRequireDefault(require("../../create-okr-modal"));
|
|
23
|
+
|
|
24
|
+
var _publishDynamicModal = _interopRequireDefault(require("../../publish-dynamic-modal/publish-dynamic-modal"));
|
|
25
|
+
|
|
26
|
+
var _toast = _interopRequireDefault(require("../../toast"));
|
|
27
|
+
|
|
28
|
+
var _bsGlobal = require("../../../utils/bs-global");
|
|
29
|
+
|
|
30
|
+
var _getLocale = require("../../../utils/getLocale");
|
|
31
|
+
|
|
32
|
+
require("./index.css");
|
|
33
|
+
|
|
34
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
35
|
+
|
|
36
|
+
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); }
|
|
37
|
+
|
|
38
|
+
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; }
|
|
39
|
+
|
|
40
|
+
var prefix = "titaui-pc-dynamic-quick-operation";
|
|
41
|
+
|
|
42
|
+
var DynamicQuickOperation = function DynamicQuickOperation(_ref) {
|
|
43
|
+
var _ref$showCreateOKr = _ref.showCreateOKr,
|
|
44
|
+
showCreateOKr = _ref$showCreateOKr === void 0 ? true : _ref$showCreateOKr,
|
|
45
|
+
_ref$showCreateTask = _ref.showCreateTask,
|
|
46
|
+
showCreateTask = _ref$showCreateTask === void 0 ? true : _ref$showCreateTask,
|
|
47
|
+
_ref$showCreateShare = _ref.showCreateShare,
|
|
48
|
+
showCreateShare = _ref$showCreateShare === void 0 ? true : _ref$showCreateShare,
|
|
49
|
+
_ref$showCreateAnnoun = _ref.showCreateAnnouncement,
|
|
50
|
+
showCreateAnnouncement = _ref$showCreateAnnoun === void 0 ? true : _ref$showCreateAnnoun;
|
|
51
|
+
var hasDynamicAnnouncementAuth = new _auth.DynamicManagerAuth().hasAuth();
|
|
52
|
+
var createTaskDivRef = (0, _react.useRef)(document.createElement("div"));
|
|
53
|
+
var isNewUI = (0, _bsGlobal.getBSGlobal)("tenantInfo").isNewIndex;
|
|
54
|
+
var newNavigation = (0, _bsGlobal.getBSGlobal)("newNavigation") || [];
|
|
55
|
+
var hasOKRApp = newNavigation.find(function (item) {
|
|
56
|
+
return item.appId === 113;
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
var handleShowCreateOKrModal = function handleShowCreateOKrModal() {
|
|
60
|
+
// @ts-ignore
|
|
61
|
+
window.showCreateOkrModal && window.showCreateOkrModal();
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
var handleShowCreateAnnouncement = function handleShowCreateAnnouncement() {
|
|
65
|
+
// @ts-ignore
|
|
66
|
+
window.showPublishAnnouncementDynamicModal && window.showPublishAnnouncementDynamicModal();
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
var handleShowCreatShare = function handleShowCreatShare() {
|
|
70
|
+
// @ts-ignore
|
|
71
|
+
window.showPublishShareDynamicModal && window.showPublishShareDynamicModal();
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
var handleCreateTaskClick = function handleCreateTaskClick() {
|
|
75
|
+
// @ts-ignore
|
|
76
|
+
window.openCreateTaskPop(createTaskDivRef.current, {
|
|
77
|
+
createParams: {
|
|
78
|
+
objId: "",
|
|
79
|
+
objType: 4,
|
|
80
|
+
AppId: 1,
|
|
81
|
+
AppType: 1,
|
|
82
|
+
TaskType: 0
|
|
83
|
+
}
|
|
84
|
+
}).then(function () {
|
|
85
|
+
_toast["default"].Success((0, _getLocale.getLocale)("Pro_tag_pop_Pubsuc"), {
|
|
86
|
+
canClose: false
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
setTimeout(function () {
|
|
90
|
+
// @ts-ignore 跳到我的发布页签
|
|
91
|
+
window.setTabsToPublish && window.setTabsToPublish();
|
|
92
|
+
}, 2000);
|
|
93
|
+
});
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
var handleAfterSuccess = function handleAfterSuccess() {
|
|
97
|
+
setTimeout(function () {
|
|
98
|
+
// @ts-ignore 跳到我的发布页签
|
|
99
|
+
window.setTabsToPublish && window.setTabsToPublish();
|
|
100
|
+
}, 2000);
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
104
|
+
className: prefix
|
|
105
|
+
}, showCreateOKr && (isNewUI && hasOKRApp || !isNewUI && (0, _bsGlobal.hasWebHead)("okr")) && /*#__PURE__*/_react["default"].createElement(_createOkr["default"], {
|
|
106
|
+
onClick: handleShowCreateOKrModal
|
|
107
|
+
}), showCreateTask && /*#__PURE__*/_react["default"].createElement(_createTask["default"], {
|
|
108
|
+
onClick: handleCreateTaskClick,
|
|
109
|
+
ref: createTaskDivRef
|
|
110
|
+
}), showCreateShare && /*#__PURE__*/_react["default"].createElement(_createShare["default"], {
|
|
111
|
+
onClick: handleShowCreatShare
|
|
112
|
+
}), showCreateAnnouncement && hasDynamicAnnouncementAuth && /*#__PURE__*/_react["default"].createElement(_createAnnouncement["default"], {
|
|
113
|
+
onClick: handleShowCreateAnnouncement
|
|
114
|
+
}), /*#__PURE__*/_react["default"].createElement(_createOkrModal["default"], {
|
|
115
|
+
onSuccess: handleAfterSuccess
|
|
116
|
+
}), /*#__PURE__*/_react["default"].createElement(_publishDynamicModal["default"], null));
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
var _default = DynamicQuickOperation;
|
|
120
|
+
exports["default"] = _default;
|
|
@@ -3,44 +3,105 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.topDynamic = exports.deleteDynamic = exports.collectDynamic = exports.cancelTopDynamic = exports.cancelCollectDynamic = void 0;
|
|
6
|
+
exports.topDynamic = exports.getRanking = exports.getPraise = exports.getMenu = exports.getLeastPariseInfo = exports.getDynamicFeedList = exports.getAdvertise = exports.deleteDynamic = exports.collectDynamic = exports.cancelTopDynamic = exports.cancelCollectDynamic = void 0;
|
|
7
7
|
|
|
8
8
|
var _request = require("../../utils/request");
|
|
9
9
|
|
|
10
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
11
|
+
|
|
12
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
13
|
+
|
|
14
|
+
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; }
|
|
15
|
+
|
|
10
16
|
// @ts-ignore
|
|
11
17
|
var userId = BSGlobal && BSGlobal.loginUserInfo.Id || 0;
|
|
12
18
|
|
|
13
19
|
var topDynamic = function topDynamic(_ref) {
|
|
14
20
|
var feedId = _ref.feedId;
|
|
15
|
-
return (0, _request.rget)(
|
|
21
|
+
return (0, _request.rget)("v2")("user/feednew/setTop?feedId=".concat(feedId));
|
|
16
22
|
};
|
|
17
23
|
|
|
18
24
|
exports.topDynamic = topDynamic;
|
|
19
25
|
|
|
20
26
|
var cancelTopDynamic = function cancelTopDynamic(_ref2) {
|
|
21
27
|
var feedId = _ref2.feedId;
|
|
22
|
-
return (0, _request.rget)(
|
|
28
|
+
return (0, _request.rget)("v2")("user/feednew/cancelTop?feedId=".concat(feedId));
|
|
23
29
|
};
|
|
24
30
|
|
|
25
31
|
exports.cancelTopDynamic = cancelTopDynamic;
|
|
26
32
|
|
|
27
33
|
var collectDynamic = function collectDynamic(_ref3) {
|
|
28
34
|
var feedId = _ref3.feedId;
|
|
29
|
-
return (0, _request.rput)(
|
|
35
|
+
return (0, _request.rput)("v2")("user/feed/Collect?feed_id=".concat(feedId));
|
|
30
36
|
};
|
|
31
37
|
|
|
32
38
|
exports.collectDynamic = collectDynamic;
|
|
33
39
|
|
|
34
40
|
var cancelCollectDynamic = function cancelCollectDynamic(_ref4) {
|
|
35
41
|
var feedId = _ref4.feedId;
|
|
36
|
-
return (0, _request.rdelete)(
|
|
42
|
+
return (0, _request.rdelete)("v2")("user/feed/CancelCollect?feed_id=".concat(feedId));
|
|
37
43
|
};
|
|
38
44
|
|
|
39
45
|
exports.cancelCollectDynamic = cancelCollectDynamic;
|
|
40
46
|
|
|
41
47
|
var deleteDynamic = function deleteDynamic(_ref5) {
|
|
42
48
|
var feedId = _ref5.feedId;
|
|
43
|
-
return (0, _request.rdelete)(
|
|
49
|
+
return (0, _request.rdelete)("v2")("user/feed/Delete?feed_id=".concat(feedId));
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
exports.deleteDynamic = deleteDynamic;
|
|
53
|
+
|
|
54
|
+
var getPraise = function getPraise(_ref6) {
|
|
55
|
+
var objId = _ref6.objId,
|
|
56
|
+
_ref6$start = _ref6.start,
|
|
57
|
+
start = _ref6$start === void 0 ? "" : _ref6$start,
|
|
58
|
+
_ref6$count = _ref6.count,
|
|
59
|
+
count = _ref6$count === void 0 ? 5 : _ref6$count,
|
|
60
|
+
_ref6$objType = _ref6.objType,
|
|
61
|
+
objType = _ref6$objType === void 0 ? 10 : _ref6$objType;
|
|
62
|
+
return (0, _request.rget)("v1")("praise/get?objId=".concat(objId, "&start=&count=").concat(count, "&objType=").concat(objType));
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
exports.getPraise = getPraise;
|
|
66
|
+
|
|
67
|
+
var getRanking = function getRanking(data) {
|
|
68
|
+
return (0, _request.rpost)("v1")("praise/getRanking", data);
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
exports.getRanking = getRanking;
|
|
72
|
+
|
|
73
|
+
var getLeastPariseInfo = function getLeastPariseInfo() {
|
|
74
|
+
return (0, _request.rget)("v1")("praise/getLeastPariseInfo?count=10");
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
exports.getLeastPariseInfo = getLeastPariseInfo;
|
|
78
|
+
|
|
79
|
+
var getMenu = function getMenu() {
|
|
80
|
+
return (0, _request.rget)("v2")("feed/FeedTabMenus");
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
exports.getMenu = getMenu;
|
|
84
|
+
|
|
85
|
+
var getDynamicFeedList = function getDynamicFeedList() {
|
|
86
|
+
var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
|
|
87
|
+
PageSize: 20,
|
|
88
|
+
PageNum: 1,
|
|
89
|
+
KeyWord: "",
|
|
90
|
+
ChannelIds: "",
|
|
91
|
+
Domain: "",
|
|
92
|
+
TitaHost: "",
|
|
93
|
+
RequestSource: 0,
|
|
94
|
+
CommentCount: 3
|
|
95
|
+
};
|
|
96
|
+
return (0, _request.rpost)("v2")("feed/feeds", _objectSpread(_objectSpread({}, data), {}, {
|
|
97
|
+
CommentCount: 3
|
|
98
|
+
}));
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
exports.getDynamicFeedList = getDynamicFeedList;
|
|
102
|
+
|
|
103
|
+
var getAdvertise = function getAdvertise() {
|
|
104
|
+
return (0, _request.rget)("v1")("operationAd/getByTerminalType?terminalType=1");
|
|
44
105
|
};
|
|
45
106
|
|
|
46
|
-
exports.
|
|
107
|
+
exports.getAdvertise = getAdvertise;
|
|
@@ -35,7 +35,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
35
35
|
|
|
36
36
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
37
37
|
|
|
38
|
-
var preCls =
|
|
38
|
+
var preCls = 'tita-okrdt-tree';
|
|
39
39
|
|
|
40
40
|
var EPriority = function EPriority(props) {
|
|
41
41
|
var onChange = props.onChange,
|
|
@@ -43,7 +43,7 @@ var EPriority = function EPriority(props) {
|
|
|
43
43
|
hasAuth = props.hasAuth,
|
|
44
44
|
status = props.status;
|
|
45
45
|
|
|
46
|
-
var _useState = (0, _react.useState)(
|
|
46
|
+
var _useState = (0, _react.useState)('1'),
|
|
47
47
|
_useState2 = _slicedToArray(_useState, 2),
|
|
48
48
|
level = _useState2[0],
|
|
49
49
|
setLevel = _useState2[1];
|
|
@@ -62,7 +62,7 @@ var EPriority = function EPriority(props) {
|
|
|
62
62
|
return /*#__PURE__*/_react["default"].createElement(_dropSelector["default"], {
|
|
63
63
|
onChange: onMenuClickHandler,
|
|
64
64
|
checked: level,
|
|
65
|
-
canEdit: hasAuth && status !==
|
|
65
|
+
canEdit: hasAuth && status !== '5',
|
|
66
66
|
limitHeight: false,
|
|
67
67
|
trigger: /*#__PURE__*/_react["default"].createElement("span", {
|
|
68
68
|
className: (0, _classnames["default"])("".concat(preCls, "__e-task-node-priority-p").concat(level))
|
|
@@ -71,23 +71,23 @@ var EPriority = function EPriority(props) {
|
|
|
71
71
|
name: "1"
|
|
72
72
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
73
73
|
className: (0, _classnames["default"])("".concat(preCls, "__e-task-node-priority-p1 ").concat(preCls, "__e-task-node-select-priority"))
|
|
74
|
-
}), (0, _getLocale.getLocale)(
|
|
74
|
+
}), (0, _getLocale.getLocale)('OKR_MyO_E_Butt_Highest')), /*#__PURE__*/_react["default"].createElement(_dropSelector["default"].IconItem, {
|
|
75
75
|
name: "2"
|
|
76
76
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
77
77
|
className: (0, _classnames["default"])("".concat(preCls, "__e-task-node-priority-p2 ").concat(preCls, "__e-task-node-select-priority"))
|
|
78
|
-
}), (0, _getLocale.getLocale)(
|
|
78
|
+
}), (0, _getLocale.getLocale)('OKR_MyO_E_Butt_High')), /*#__PURE__*/_react["default"].createElement(_dropSelector["default"].IconItem, {
|
|
79
79
|
name: "3"
|
|
80
80
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
81
81
|
className: (0, _classnames["default"])("".concat(preCls, "__e-task-node-priority-p3 ").concat(preCls, "__e-task-node-select-priority"))
|
|
82
|
-
}), (0, _getLocale.getLocale)(
|
|
82
|
+
}), (0, _getLocale.getLocale)('OKR_MyO_E_Butt_Middle')), /*#__PURE__*/_react["default"].createElement(_dropSelector["default"].IconItem, {
|
|
83
83
|
name: "4"
|
|
84
84
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
85
85
|
className: (0, _classnames["default"])("".concat(preCls, "__e-task-node-priority-p4 ").concat(preCls, "__e-task-node-select-priority"))
|
|
86
|
-
}), (0, _getLocale.getLocale)(
|
|
86
|
+
}), (0, _getLocale.getLocale)('OKR_MyO_E_Butt_Low')), /*#__PURE__*/_react["default"].createElement(_dropSelector["default"].IconItem, {
|
|
87
87
|
name: "5"
|
|
88
88
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
89
89
|
className: (0, _classnames["default"])("".concat(preCls, "__e-task-node-priority-p5 ").concat(preCls, "__e-task-node-select-priority"))
|
|
90
|
-
}), (0, _getLocale.getLocale)(
|
|
90
|
+
}), (0, _getLocale.getLocale)('OKR_MyO_E_Butt_Verylow')));
|
|
91
91
|
};
|
|
92
92
|
|
|
93
93
|
var _default = EPriority;
|
|
@@ -67,25 +67,25 @@ var EReportShare = /*#__PURE__*/function (_PureComponent) {
|
|
|
67
67
|
sentData.ObjType = 62;
|
|
68
68
|
sentData.ObjId = workId;
|
|
69
69
|
|
|
70
|
-
if (submitType ===
|
|
70
|
+
if (submitType === 'submit') {
|
|
71
71
|
_this.setState({
|
|
72
72
|
submitStatus: 2
|
|
73
73
|
});
|
|
74
74
|
|
|
75
|
-
var url = (0, _requestV.getApiUrl2)(
|
|
76
|
-
(0, _requestV.taker)(url,
|
|
75
|
+
var url = (0, _requestV.getApiUrl2)('user/feed/AddShare');
|
|
76
|
+
(0, _requestV.taker)(url, 'POST', sentData).then(function (res) {
|
|
77
77
|
if (res.Code == 1) {
|
|
78
78
|
_this.setState({
|
|
79
79
|
submitStatus: 1
|
|
80
80
|
});
|
|
81
81
|
|
|
82
|
-
onSubmit(
|
|
82
|
+
onSubmit('success');
|
|
83
83
|
} else {
|
|
84
84
|
_this.setState({
|
|
85
85
|
submitStatus: 0
|
|
86
86
|
});
|
|
87
87
|
|
|
88
|
-
onSubmit(
|
|
88
|
+
onSubmit('failed');
|
|
89
89
|
}
|
|
90
90
|
});
|
|
91
91
|
} else {
|
|
@@ -93,7 +93,7 @@ var EReportShare = /*#__PURE__*/function (_PureComponent) {
|
|
|
93
93
|
submitStatus: 0
|
|
94
94
|
});
|
|
95
95
|
|
|
96
|
-
onSubmit(
|
|
96
|
+
onSubmit('cancel');
|
|
97
97
|
}
|
|
98
98
|
};
|
|
99
99
|
|
|
@@ -122,12 +122,12 @@ var EReportShare = /*#__PURE__*/function (_PureComponent) {
|
|
|
122
122
|
submitStatus = _this$state.submitStatus,
|
|
123
123
|
popContainer = _this$state.popContainer; // let eReportURL = `${location.origin}${location.pathname}#okr/eReport?okrId=${eReportId}&back=#okr%2Fmanage%3Fwork_id%3D${workId}%26detail_type%3Detask`
|
|
124
124
|
|
|
125
|
-
var eReportURL = "".concat(location.origin).concat(location.pathname, "#okr/eReport?okrId=").concat(eReportId, "&
|
|
126
|
-
var defaultContent = this.isManager ? "@[\u6240\u6709\u540C\u4E8B:all_members] ".concat((0, _getLocale.getLocale)(
|
|
125
|
+
var eReportURL = "".concat(location.origin).concat(location.pathname, "#okr/eReport?okrId=").concat(eReportId, "&work_id=").concat(workId);
|
|
126
|
+
var defaultContent = this.isManager ? "@[\u6240\u6709\u540C\u4E8B:all_members] ".concat((0, _getLocale.getLocale)('Mod_Objective'), "\uFF1A").concat(workName, "\uFF08").concat(eReportDate, "\uFF09E\u5468\u62A5").concat(eReportURL, "\uFF0C\u70B9\u51FB\u94FE\u63A5\u5373\u53EF\u67E5\u770B\uFF5E") : "".concat((0, _getLocale.getLocale)('Mod_Objective'), "\uFF1A").concat(workName, "\uFF08").concat(eReportDate, "\uFF09E\u5468\u62A5").concat(eReportURL, "\uFF0C\u70B9\u51FB\u94FE\u63A5\u5373\u53EF\u67E5\u770B\uFF5E");
|
|
127
127
|
return /*#__PURE__*/_react["default"].createElement(_style.ModalWrapper, {
|
|
128
128
|
className: "".concat(className, " document-mouse-event-ignore"),
|
|
129
129
|
onClick: function onClick() {
|
|
130
|
-
return onSubmit(
|
|
130
|
+
return onSubmit('cancel');
|
|
131
131
|
}
|
|
132
132
|
}, /*#__PURE__*/_react["default"].createElement(_style.ModalContainer, {
|
|
133
133
|
width: "800px",
|
|
@@ -140,7 +140,7 @@ var EReportShare = /*#__PURE__*/function (_PureComponent) {
|
|
|
140
140
|
}, /*#__PURE__*/_react["default"].createElement("span", null, "\u53D1\u5206\u4EAB\uFF08@Ta\uFF09"), /*#__PURE__*/_react["default"].createElement(_style.PraiseRecordClose, {
|
|
141
141
|
className: "tu-icon-close",
|
|
142
142
|
onMouseDown: function onMouseDown() {
|
|
143
|
-
return onSubmit(
|
|
143
|
+
return onSubmit('cancel');
|
|
144
144
|
}
|
|
145
145
|
})), /*#__PURE__*/_react["default"].createElement(_context["default"].Provider, {
|
|
146
146
|
value: {
|
|
@@ -152,7 +152,7 @@ var EReportShare = /*#__PURE__*/function (_PureComponent) {
|
|
|
152
152
|
isShowRangeDropDown: false,
|
|
153
153
|
isShowSendSms: false,
|
|
154
154
|
isShowBtnCancel: false,
|
|
155
|
-
submitText: (0, _getLocale.getLocale)(
|
|
155
|
+
submitText: (0, _getLocale.getLocale)('OKR_MyO_KRP_Butt_Release'),
|
|
156
156
|
initialTextHeight: 96,
|
|
157
157
|
autoResizing: false,
|
|
158
158
|
privateValue: isVisible,
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
.form-field-date__label {
|
|
2
|
+
height: 22px;
|
|
3
|
+
margin-bottom: 5px;
|
|
4
|
+
font-size: 14px;
|
|
5
|
+
font-weight: 400;
|
|
6
|
+
line-height: 22px;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.form-field-date__label-text {
|
|
10
|
+
color: #3f4755;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.form-field-date__label-symbol {
|
|
14
|
+
color: red;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.form-field-date__pickers {
|
|
18
|
+
display: flex;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.form-field-date__pickers .tita-ui__picker-trigger {
|
|
22
|
+
flex: 1;
|
|
23
|
+
margin-right: 10px;
|
|
24
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
+
|
|
12
|
+
var _moment = _interopRequireDefault(require("moment"));
|
|
13
|
+
|
|
14
|
+
var _picker = _interopRequireDefault(require("../../../picker"));
|
|
15
|
+
|
|
16
|
+
var _timePicker = _interopRequireDefault(require("../../../time-picker"));
|
|
17
|
+
|
|
18
|
+
require("./index.css");
|
|
19
|
+
|
|
20
|
+
var _excluded = ["label", "layout", "require", "value", "onChange", "datePopupAlign", "timePopupAlign"];
|
|
21
|
+
|
|
22
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
23
|
+
|
|
24
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
25
|
+
|
|
26
|
+
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; }
|
|
27
|
+
|
|
28
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
29
|
+
|
|
30
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
31
|
+
|
|
32
|
+
var prefixCls = 'form-field-date';
|
|
33
|
+
|
|
34
|
+
var Date = function Date(props) {
|
|
35
|
+
var label = props.label,
|
|
36
|
+
layout = props.layout,
|
|
37
|
+
require = props.require,
|
|
38
|
+
_props$value = props.value,
|
|
39
|
+
value = _props$value === void 0 ? (0, _moment["default"])() : _props$value,
|
|
40
|
+
onChange = props.onChange,
|
|
41
|
+
datePopupAlign = props.datePopupAlign,
|
|
42
|
+
timePopupAlign = props.timePopupAlign,
|
|
43
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
|
44
|
+
|
|
45
|
+
var onDateChange = function onDateChange(date, type) {
|
|
46
|
+
var newDate;
|
|
47
|
+
|
|
48
|
+
switch (type) {
|
|
49
|
+
case 'date':
|
|
50
|
+
newDate = (0, _moment["default"])(value || (0, _moment["default"])()).set({
|
|
51
|
+
year: (0, _moment["default"])(date).year(),
|
|
52
|
+
month: (0, _moment["default"])(date).month(),
|
|
53
|
+
date: (0, _moment["default"])(date).date()
|
|
54
|
+
});
|
|
55
|
+
break;
|
|
56
|
+
|
|
57
|
+
case 'time':
|
|
58
|
+
newDate = (0, _moment["default"])(value || (0, _moment["default"])()).set({
|
|
59
|
+
hour: (0, _moment["default"])(date, 'HH:mm').hour(),
|
|
60
|
+
minute: (0, _moment["default"])(date, 'HH:mm').minute()
|
|
61
|
+
});
|
|
62
|
+
break;
|
|
63
|
+
|
|
64
|
+
default:
|
|
65
|
+
break;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
onChange(newDate);
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
72
|
+
className: (0, _classnames["default"])(prefixCls, _defineProperty({}, "".concat(prefixCls, "-row"), layout === 'row'))
|
|
73
|
+
}, !!label && /*#__PURE__*/_react["default"].createElement("div", {
|
|
74
|
+
className: "".concat(prefixCls, "__label")
|
|
75
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
76
|
+
className: "".concat(prefixCls, "__label-text")
|
|
77
|
+
}, label), require && /*#__PURE__*/_react["default"].createElement("span", {
|
|
78
|
+
className: "".concat(prefixCls, "__label-symbol")
|
|
79
|
+
}, "*")), /*#__PURE__*/_react["default"].createElement("div", {
|
|
80
|
+
className: (0, _classnames["default"])("".concat(prefixCls, "__pickers"))
|
|
81
|
+
}, /*#__PURE__*/_react["default"].createElement(_picker["default"], _extends({
|
|
82
|
+
value: value,
|
|
83
|
+
onChange: function onChange(date) {
|
|
84
|
+
return onDateChange(date, 'date');
|
|
85
|
+
},
|
|
86
|
+
popupAlign: datePopupAlign
|
|
87
|
+
}, restProps)), /*#__PURE__*/_react["default"].createElement(_timePicker["default"], _extends({
|
|
88
|
+
value: value,
|
|
89
|
+
popupAlign: timePopupAlign,
|
|
90
|
+
onChange: function onChange(time) {
|
|
91
|
+
return onDateChange(time, 'time');
|
|
92
|
+
}
|
|
93
|
+
}, restProps))));
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
Date.defaultProps = {
|
|
97
|
+
disabled: false,
|
|
98
|
+
layout: 'column',
|
|
99
|
+
require: false
|
|
100
|
+
};
|
|
101
|
+
var _default = Date;
|
|
102
|
+
exports["default"] = _default;
|
|
@@ -43,7 +43,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
43
43
|
|
|
44
44
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
45
45
|
|
|
46
|
-
var preCls =
|
|
46
|
+
var preCls = 'form-field-input';
|
|
47
47
|
|
|
48
48
|
function OverlayInner(_ref) {
|
|
49
49
|
var hasError = _ref.hasError,
|
|
@@ -52,12 +52,12 @@ function OverlayInner(_ref) {
|
|
|
52
52
|
activeTips = _ref.activeTips;
|
|
53
53
|
if (hasActive) return /*#__PURE__*/_react["default"].createElement("span", {
|
|
54
54
|
style: {
|
|
55
|
-
color:
|
|
55
|
+
color: '#3F4755'
|
|
56
56
|
}
|
|
57
57
|
}, activeTips);
|
|
58
58
|
if (hasError) return /*#__PURE__*/_react["default"].createElement("span", {
|
|
59
59
|
style: {
|
|
60
|
-
color:
|
|
60
|
+
color: '#F05E5E'
|
|
61
61
|
}
|
|
62
62
|
}, tip);
|
|
63
63
|
return /*#__PURE__*/_react["default"].createElement("span", null);
|
|
@@ -79,7 +79,7 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
79
79
|
layout = props.layout,
|
|
80
80
|
onCheckSuccess = props.onCheckSuccess,
|
|
81
81
|
_props$className = props.className,
|
|
82
|
-
className = _props$className === void 0 ?
|
|
82
|
+
className = _props$className === void 0 ? '' : _props$className,
|
|
83
83
|
tail = props.tail,
|
|
84
84
|
restProps = _objectWithoutProperties(props, _excluded);
|
|
85
85
|
|
|
@@ -95,12 +95,12 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
95
95
|
hasActive = _useState4[0],
|
|
96
96
|
setHasActive = _useState4[1];
|
|
97
97
|
|
|
98
|
-
var _useState5 = (0, _react.useState)(
|
|
98
|
+
var _useState5 = (0, _react.useState)(''),
|
|
99
99
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
100
100
|
tip = _useState6[0],
|
|
101
101
|
setTip = _useState6[1];
|
|
102
102
|
|
|
103
|
-
var _useState7 = (0, _react.useState)(props.value ||
|
|
103
|
+
var _useState7 = (0, _react.useState)(props.value || ''),
|
|
104
104
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
105
105
|
value = _useState8[0],
|
|
106
106
|
setValue = _useState8[1];
|
|
@@ -133,7 +133,7 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
133
133
|
|
|
134
134
|
var onInputFocusHandler = function onInputFocusHandler() {
|
|
135
135
|
setHasActive(true);
|
|
136
|
-
if (type && type ==
|
|
136
|
+
if (type && type == 'number') return;
|
|
137
137
|
inputRef.current.setSelectionRange(9999999, 9999999);
|
|
138
138
|
};
|
|
139
139
|
|
|
@@ -147,7 +147,7 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
147
147
|
setTip(errors[0].tip);
|
|
148
148
|
} else {
|
|
149
149
|
setHasError(false);
|
|
150
|
-
setTip(
|
|
150
|
+
setTip('');
|
|
151
151
|
}
|
|
152
152
|
};
|
|
153
153
|
|
|
@@ -196,7 +196,7 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
196
196
|
};
|
|
197
197
|
});
|
|
198
198
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
199
|
-
className: (0, _classnames["default"])(preCls, _defineProperty({}, "".concat(preCls, "-row"), layout ===
|
|
199
|
+
className: (0, _classnames["default"])(preCls, _defineProperty({}, "".concat(preCls, "-row"), layout === 'row'), className)
|
|
200
200
|
}, !!label && /*#__PURE__*/_react["default"].createElement("div", {
|
|
201
201
|
className: (0, _classnames["default"])("".concat(preCls, "__label"))
|
|
202
202
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
@@ -227,7 +227,7 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
227
227
|
onBlur: onBlurHandler,
|
|
228
228
|
onChange: onChangeHandler,
|
|
229
229
|
autoComplete: "off"
|
|
230
|
-
}, restProps))), typeof tail ===
|
|
230
|
+
}, restProps))), typeof tail === 'string' ? /*#__PURE__*/_react["default"].createElement("span", {
|
|
231
231
|
className: (0, _classnames["default"])("".concat(preCls, "__tail"))
|
|
232
232
|
}, tail) : tail));
|
|
233
233
|
});
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
.form-field-user__border {
|
|
19
19
|
padding: 6px 12px;
|
|
20
|
-
border-radius:
|
|
20
|
+
border-radius: 8px;
|
|
21
21
|
transition: all 0.2s;
|
|
22
22
|
border: 1px solid #e9ecf0;
|
|
23
23
|
box-sizing: border-box;
|
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
font-weight: 400;
|
|
43
43
|
color: #3f4755;
|
|
44
44
|
cursor: pointer;
|
|
45
|
+
display: flex;
|
|
45
46
|
position: relative;
|
|
46
47
|
}
|
|
47
48
|
|
|
@@ -49,8 +50,21 @@
|
|
|
49
50
|
display: block;
|
|
50
51
|
}
|
|
51
52
|
|
|
52
|
-
.form-field-user__input-
|
|
53
|
+
.form-field-user__input-user-info {
|
|
53
54
|
margin-right: 5px;
|
|
55
|
+
display: flex;
|
|
56
|
+
align-items: center;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.form-field-user__input-user-info .titaui-pc-avator-container {
|
|
60
|
+
display: flex;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.form-field-user__input-user-info__name {
|
|
64
|
+
margin-left: 4px;
|
|
65
|
+
overflow: hidden;
|
|
66
|
+
text-overflow: ellipsis;
|
|
67
|
+
white-space: nowrap;
|
|
54
68
|
}
|
|
55
69
|
|
|
56
70
|
.form-field-user__input--placeholder {
|
|
@@ -72,10 +86,16 @@
|
|
|
72
86
|
}
|
|
73
87
|
|
|
74
88
|
.form-field-user__input--down {
|
|
75
|
-
|
|
89
|
+
font-size: 16px;
|
|
90
|
+
color: #3f4755;
|
|
76
91
|
position: absolute;
|
|
77
92
|
right: -32px;
|
|
78
93
|
top: 50%;
|
|
79
94
|
transform: translate(0, -50%);
|
|
80
95
|
cursor: pointer;
|
|
81
96
|
}
|
|
97
|
+
|
|
98
|
+
.form-field-user__input--down::before {
|
|
99
|
+
transform: scale(0.5);
|
|
100
|
+
display: inline-block;
|
|
101
|
+
}
|