@titaui/pc 1.12.5 → 1.12.7-beta.10
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/attachments-preview/index.css +11 -0
- package/lib/components/attachments-preview/index.js +112 -0
- package/lib/components/auto-save/img/failed.svg +17 -0
- package/lib/components/auto-save/img/success.svg +16 -0
- package/lib/components/auto-save/index.css +39 -0
- package/lib/components/auto-save/index.js +78 -0
- package/lib/components/auto-save/interface.js +5 -0
- package/lib/components/color-date-picker/index.css +65 -0
- package/lib/components/color-date-picker/index.js +123 -0
- package/lib/components/color-date-picker/interface.js +14 -0
- package/lib/components/dialog-upload/img/doc.svg +1 -0
- package/lib/components/dialog-upload/img/other.svg +1 -0
- package/lib/components/dialog-upload/img/pdf.svg +1 -0
- package/lib/components/dialog-upload/img/ppt.svg +1 -0
- package/lib/components/dialog-upload/img/radio.svg +1 -0
- package/lib/components/dialog-upload/img/video.svg +1 -0
- package/lib/components/dialog-upload/img/xls.svg +1 -0
- package/lib/components/dialog-upload/index.css +77 -0
- package/lib/components/dialog-upload/index.js +330 -0
- package/lib/components/dialog-upload/type.js +35 -0
- package/lib/components/dialog-upload/uploaded-preview.css +77 -0
- package/lib/components/dialog-upload/uploaded-preview.js +132 -0
- package/lib/components/dialog-upload/util.js +131 -0
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/encourage.js +119 -0
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/img/APP-shoucang-m.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/img/ascore.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/img/curEfforts.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/img/curGood.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/img/curGreat.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/img/efforts.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/img/good.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/img/great.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/img/halfscore.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/img/loading.gif +0 -0
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/img/score.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/img/top.svg +14 -0
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/index.css +68 -0
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/index.js +122 -0
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/rate.js +143 -0
- package/lib/components/dynamic/dynamic-item/components/header/img/evalute.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/header/img/fighting.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/header/img/happy.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/header/img/long-story.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/header/img/pressure.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/okr-progress/index.css +170 -0
- package/lib/components/dynamic/dynamic-item/components/okr-progress/index.js +121 -0
- package/lib/components/dynamic/dynamic-item/components/okr-progress/interface.js +5 -0
- package/lib/components/dynamic/dynamic-item/components/okr-progress/request-api.js +10 -0
- package/lib/components/dynamic/dynamic-item/components/okr-progress/utils.js +10 -0
- package/lib/components/dynamic/dynamic-item/components/progress/components/kr-progress/index.css +8 -0
- package/lib/components/dynamic/dynamic-item/components/progress/components/kr-progress/index.js +26 -0
- package/lib/components/dynamic/dynamic-item/components/progress/components/o-progress/index.css +8 -0
- package/lib/components/dynamic/dynamic-item/components/progress/components/o-progress/index.js +26 -0
- package/lib/components/dynamic/dynamic-item/components/progress/components/okr-progress/index.css +197 -0
- package/lib/components/dynamic/dynamic-item/components/progress/components/okr-progress/index.js +220 -0
- package/lib/components/dynamic/dynamic-item/components/progress/components/okr-progress/request-api.js +20 -0
- package/lib/components/dynamic/dynamic-item/components/progress/components/okr-progress/util.js +134 -0
- package/lib/components/dynamic/dynamic-item/components/progress/components/task-progress/index.css +10 -0
- package/lib/components/dynamic/dynamic-item/components/progress/components/task-progress/index.js +60 -0
- package/lib/components/dynamic/dynamic-item/components/progress/index.css +25 -0
- package/lib/components/dynamic/dynamic-item/components/progress/index.js +71 -0
- package/lib/components/dynamic/dynamic-item/components/progress/interface.js +5 -0
- package/lib/components/dynamic/dynamic-item/components/schedule/index.css +31 -0
- package/lib/components/dynamic/dynamic-item/components/schedule/index.js +59 -0
- package/lib/components/dynamic/dynamic-item/components/schedule/interface.js +5 -0
- package/lib/components/dynamic/dynamic-item/components/summary-header/constant.js +45 -0
- package/lib/components/dynamic/dynamic-item/components/summary-header/img/evalute.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/summary-header/img/fighting.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/summary-header/img/happy.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/summary-header/img/long-story.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/summary-header/img/pressure.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/summary-header/index.css +136 -0
- package/lib/components/dynamic/dynamic-item/components/summary-header/index.js +381 -0
- package/lib/components/dynamic/dynamic-item/components/table-row-o-project/index.css +24 -0
- package/lib/components/dynamic/dynamic-item/components/table-row-o-project/index.js +52 -0
- package/lib/components/dynamic/dynamic-item/components/table-row-o-project/interface.js +5 -0
- package/lib/components/dynamic/dynamic-item/components/table-row-okr/index.css +50 -0
- package/lib/components/dynamic/dynamic-item/components/table-row-okr/index.js +65 -0
- package/lib/components/dynamic/dynamic-item/components/table-row-okr/interface.js +5 -0
- package/lib/components/dynamic/dynamic-item/components/task-progress/index.css +201 -0
- package/lib/components/dynamic/dynamic-item/components/task-progress/index.js +96 -0
- package/lib/components/dynamic/dynamic-item/components/task-progress/interface.js +5 -0
- package/lib/components/dynamic/dynamic-item/components/task-progress/utils.js +10 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/img/come-on-big.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/img/come-on-small.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/img/evaluate-big.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/img/nice-big.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/img/nice-small.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/img/very-good-big.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/img/very-good-small.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/index.css +32 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/index.js +43 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/remind-user-view/index.css +37 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/remind-user-view/index.js +80 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/constant.js +45 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/img/evalute.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/img/fighting.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/img/happy.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/img/long-story.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/img/pressure.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/index.css +155 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/index.js +179 -0
- package/lib/components/dynamic/dynamic-item/index.js +15 -4
- package/lib/components/import-modal/helper.js +179 -0
- package/lib/components/import-modal/image/loading.gif +0 -0
- package/lib/components/import-modal/import-okr-modal/index.css +18 -0
- package/lib/components/import-modal/import-okr-modal/index.js +135 -0
- package/lib/components/import-modal/import-task-modal/index.css +18 -0
- package/lib/components/import-modal/import-task-modal/index.js +240 -0
- package/lib/components/import-modal/import-task-modal/search-form.js +135 -0
- package/lib/components/import-modal/index.css +30 -0
- package/lib/components/import-modal/index.js +20 -0
- package/lib/components/import-modal/radio.js +62 -0
- package/lib/components/import-modal/request-api.js +204 -0
- package/lib/components/import-modal/search/category-select.js +74 -0
- package/lib/components/import-modal/search/okr-classify-select.js +74 -0
- package/lib/components/import-modal/search/okr-status-select.js +74 -0
- package/lib/components/import-modal/search/okr-type-select.js +87 -0
- package/lib/components/import-modal/search/principal.js +135 -0
- package/lib/components/import-modal/search/relation.js +77 -0
- package/lib/components/import-modal/search/search-dropdown/index.css +50 -0
- package/lib/components/import-modal/search/search-dropdown/index.js +32 -0
- package/lib/components/import-modal/search/task-relation.js +83 -0
- package/lib/components/import-modal/search/task-status-select.js +87 -0
- package/lib/components/import-modal/search/work-relation.js +83 -0
- package/lib/components/import-modal/search/work-status-select.js +74 -0
- package/lib/components/import-modal/tree/okr-tree/index.css +61 -0
- package/lib/components/import-modal/tree/okr-tree/index.js +265 -0
- package/lib/components/import-modal/tree/okr-tree/search-form.js +161 -0
- package/lib/components/import-modal/tree/task-work-tree/index.css +123 -0
- package/lib/components/import-modal/tree/task-work-tree/index.js +187 -0
- package/lib/components/import-modal/tree-node/index.css +0 -0
- package/lib/components/import-modal/tree-node/index.js +51 -0
- package/lib/components/import-modal/tree-node/kr-node/index.css +58 -0
- package/lib/components/import-modal/tree-node/kr-node/index.js +108 -0
- package/lib/components/import-modal/tree-node/milestone-node/index.css +61 -0
- package/lib/components/import-modal/tree-node/milestone-node/index.js +118 -0
- package/lib/components/import-modal/tree-node/o-node/index.css +46 -0
- package/lib/components/import-modal/tree-node/o-node/index.js +138 -0
- package/lib/components/import-modal/tree-node/work-node/index.css +51 -0
- package/lib/components/import-modal/tree-node/work-node/index.js +108 -0
- package/lib/components/menus/components/menu-tree/images/summary-menu/caidan-enjoy.svg +14 -0
- package/lib/components/menus/components/menu-tree/images/summary-menu/my-setup.svg +18 -0
- package/lib/components/menus/components/menu-tree/images/summary-menu/my-zongjie.svg +15 -0
- package/lib/components/menus/components/menu-tree/images/summary-menu/zongjie-s.svg +15 -0
- package/lib/components/menus/components/menu-tree/tree-node/index.css +120 -0
- package/lib/components/menus/components/menu-tree/tree-node/index.js +22 -2
- package/lib/components/menus/components/menu-tree/tree-node/subordinates.js +78 -0
- package/lib/components/menus/components/menu-tree/tree-node/summary-share.js +78 -0
- package/lib/components/menus/export-modules/summary-menus/depart-menus/helper.js +56 -0
- package/lib/components/menus/export-modules/summary-menus/depart-menus/index.css +32 -0
- package/lib/components/menus/export-modules/summary-menus/depart-menus/index.js +231 -0
- package/lib/components/menus/export-modules/summary-menus/index.css +9 -0
- package/lib/components/menus/export-modules/summary-menus/index.js +134 -0
- package/lib/components/menus/export-modules/summary-menus/menu-highlight.js +76 -0
- package/lib/components/menus/export-modules/summary-menus/menus.js +205 -0
- package/lib/components/menus/export-modules/summary-menus/summary-front-menus.js +199 -0
- package/lib/components/menus/i18n.js +8 -0
- package/lib/components/menus/index.js +6 -0
- package/lib/components/menus/request-apis.js +8 -2
- package/lib/components/nav-top/components/menu/index.js +1 -1
- package/lib/components/new-confidence/constant.js +53 -0
- package/lib/components/new-confidence/img/1.svg +40 -0
- package/lib/components/new-confidence/img/10.svg +33 -0
- package/lib/components/new-confidence/img/2.svg +40 -0
- package/lib/components/new-confidence/img/3.svg +40 -0
- package/lib/components/new-confidence/img/4.svg +40 -0
- package/lib/components/new-confidence/img/5.svg +40 -0
- package/lib/components/new-confidence/img/6.svg +40 -0
- package/lib/components/new-confidence/img/7.svg +40 -0
- package/lib/components/new-confidence/img/8.svg +40 -0
- package/lib/components/new-confidence/img/9.svg +40 -0
- package/lib/components/new-confidence/index.css +62 -0
- package/lib/components/new-confidence/index.js +115 -0
- package/lib/components/new-confidence/interface.js +5 -0
- package/lib/components/okr-detail/components/o-progress-update/index.js +8 -4
- package/lib/components/okr-progress/components/o-progress-update/index.js +4 -2
- package/lib/components/picker/components/panels/week-panel/index.css +42 -0
- package/lib/components/picker/components/panels/week-panel/index.js +49 -0
- package/lib/components/picker/components/panels/week-panel/utils.js +45 -0
- package/lib/components/picker/components/panels/week-panel/week-body.js +80 -0
- package/lib/components/picker/components/panels/week-panel/week-head.js +80 -0
- package/lib/components/picker/picker-panels.js +45 -4
- package/lib/components/picker/picker.js +7 -3
- package/lib/components/rate/index.js +50 -0
- package/lib/components/regulation-setting-item/index.css +33 -0
- package/lib/components/regulation-setting-item/index.js +37 -0
- package/lib/components/rich-editor-at/components/index.css +66 -0
- package/lib/components/rich-editor-at/components/index.js +188 -0
- package/lib/components/rich-editor-at/index.css +40 -0
- package/lib/components/rich-editor-at/index.js +108 -0
- package/lib/components/rich-editor-upload/index.css +11 -0
- package/lib/components/rich-editor-upload/index.js +87 -0
- package/lib/components/search-input/index.js +5 -0
- package/lib/components/task-tree/task-item-node/index.css +2 -2
- package/lib/components/textarea/index.js +7 -5
- package/lib/components/write-summary-modal/index.css +79 -0
- package/lib/components/write-summary-modal/index.js +151 -0
- package/lib/components/write-summary-modal/interface.js +19 -0
- package/lib/components/write-summary-modal/request-api.js +18 -0
- package/lib/components/write-summary-modal/utils.js +31 -0
- package/lib/index.js +56 -0
- package/lib/utils/bs-global.js +1 -1
- package/lib/utils/constant.js +8 -2
- package/lib/utils/helpers.js +56 -11
- package/package.json +2 -1
|
@@ -0,0 +1,135 @@
|
|
|
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 _dialog = _interopRequireDefault(require("../../dialog"));
|
|
13
|
+
|
|
14
|
+
var _getLocale = require("../../../utils/getLocale");
|
|
15
|
+
|
|
16
|
+
var _okrTree = _interopRequireDefault(require("../tree/okr-tree"));
|
|
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 _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
27
|
+
|
|
28
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
29
|
+
|
|
30
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
31
|
+
|
|
32
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
33
|
+
|
|
34
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
35
|
+
|
|
36
|
+
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."); }
|
|
37
|
+
|
|
38
|
+
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); }
|
|
39
|
+
|
|
40
|
+
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; }
|
|
41
|
+
|
|
42
|
+
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; }
|
|
43
|
+
|
|
44
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
45
|
+
|
|
46
|
+
var preCls = 'import-modal-okr';
|
|
47
|
+
|
|
48
|
+
function ImportOKRModal(props) {
|
|
49
|
+
var _props$isVisible = props.isVisible,
|
|
50
|
+
isVisible = _props$isVisible === void 0 ? false : _props$isVisible,
|
|
51
|
+
_props$multiple = props.multiple,
|
|
52
|
+
multiple = _props$multiple === void 0 ? true : _props$multiple,
|
|
53
|
+
onOk = props.onOk,
|
|
54
|
+
_props$onCancel = props.onCancel,
|
|
55
|
+
onCancel = _props$onCancel === void 0 ? function () {} : _props$onCancel,
|
|
56
|
+
_props$lastSelected = props.lastSelected,
|
|
57
|
+
lastSelected = _props$lastSelected === void 0 ? [] : _props$lastSelected;
|
|
58
|
+
|
|
59
|
+
var _useState = (0, _react.useState)(isVisible),
|
|
60
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
61
|
+
visible = _useState2[0],
|
|
62
|
+
setVisible = _useState2[1];
|
|
63
|
+
|
|
64
|
+
var _useState3 = (0, _react.useState)(lastSelected),
|
|
65
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
66
|
+
selected = _useState4[0],
|
|
67
|
+
setSelected = _useState4[1];
|
|
68
|
+
|
|
69
|
+
var selectedRef = (0, _react.useRef)(selected); // 解决闭包
|
|
70
|
+
|
|
71
|
+
var onOkHandler = function onOkHandler() {
|
|
72
|
+
onOk && onOk(selected);
|
|
73
|
+
setSelected([]);
|
|
74
|
+
onCancelHandler();
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
var onCancelHandler = function onCancelHandler() {
|
|
78
|
+
setVisible(false);
|
|
79
|
+
onCancel && onCancel();
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
var addSelected = function addSelected(node) {
|
|
83
|
+
if (multiple) {
|
|
84
|
+
var result = [].concat(_toConsumableArray(selectedRef.current), [node]);
|
|
85
|
+
setSelected(result);
|
|
86
|
+
selectedRef.current = result;
|
|
87
|
+
} else {
|
|
88
|
+
setSelected([node]);
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
var removeSelected = function removeSelected(id) {
|
|
93
|
+
var newSelected = selectedRef.current.filter(function (item) {
|
|
94
|
+
return item.id !== id;
|
|
95
|
+
});
|
|
96
|
+
setSelected(_toConsumableArray(newSelected));
|
|
97
|
+
selectedRef.current = newSelected;
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
(0, _react.useEffect)(function () {
|
|
101
|
+
setVisible(isVisible);
|
|
102
|
+
}, [isVisible]);
|
|
103
|
+
(0, _react.useEffect)(function () {
|
|
104
|
+
setSelected(lastSelected);
|
|
105
|
+
}, [lastSelected]);
|
|
106
|
+
return /*#__PURE__*/_react["default"].createElement(_dialog["default"], {
|
|
107
|
+
title: (0, _getLocale.getLocale)('Per_details_ReviewDetails_ImOK'),
|
|
108
|
+
visible: visible,
|
|
109
|
+
onOk: onOkHandler,
|
|
110
|
+
onCancel: onCancelHandler,
|
|
111
|
+
onClose: onCancelHandler,
|
|
112
|
+
style: {
|
|
113
|
+
height: '590px'
|
|
114
|
+
},
|
|
115
|
+
width: 840,
|
|
116
|
+
zIndex: 1000,
|
|
117
|
+
noHeadLine: true,
|
|
118
|
+
noFooterLine: true,
|
|
119
|
+
extraClass: ['parent-target-pop-index', 'document-mouse-event-ignore'],
|
|
120
|
+
destroyOnClose: true
|
|
121
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
122
|
+
className: "".concat(preCls, "__content"),
|
|
123
|
+
onClick: function onClick(e) {
|
|
124
|
+
e.stopPropagation();
|
|
125
|
+
e.nativeEvent.stopImmediatePropagation();
|
|
126
|
+
}
|
|
127
|
+
}, /*#__PURE__*/_react["default"].createElement(_okrTree["default"], {
|
|
128
|
+
selected: selected,
|
|
129
|
+
addSelected: addSelected,
|
|
130
|
+
removeSelected: removeSelected
|
|
131
|
+
})));
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
var _default = ImportOKRModal;
|
|
135
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
.import-modal-task__content {
|
|
2
|
+
padding: 10px 32px 0;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.import-modal-task__content-tree {
|
|
6
|
+
margin-top: 16px;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.import-modal-task__content-empty {
|
|
10
|
+
height: 400px;
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
justify-content: center;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.import-modal-task__content-empty > img {
|
|
17
|
+
width: 60px;
|
|
18
|
+
}
|
|
@@ -0,0 +1,240 @@
|
|
|
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"] = exports.Context = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _dialog = _interopRequireDefault(require("../../dialog"));
|
|
13
|
+
|
|
14
|
+
var _pagination = _interopRequireDefault(require("../../pagination"));
|
|
15
|
+
|
|
16
|
+
var _searchForm = _interopRequireDefault(require("./search-form"));
|
|
17
|
+
|
|
18
|
+
var _taskWorkTree = require("../tree/task-work-tree");
|
|
19
|
+
|
|
20
|
+
var _helper = require("../helper");
|
|
21
|
+
|
|
22
|
+
var _requestApi = require("../request-api");
|
|
23
|
+
|
|
24
|
+
var _loading = _interopRequireDefault(require("../image/loading.gif"));
|
|
25
|
+
|
|
26
|
+
var _getLocale = require("../../../utils/getLocale");
|
|
27
|
+
|
|
28
|
+
require("./index.css");
|
|
29
|
+
|
|
30
|
+
var _excluded = ["isVisible", "multiple", "onOk", "onCancel", "isRelationOther", "onRelateSuccess", "lastSelected"];
|
|
31
|
+
|
|
32
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
33
|
+
|
|
34
|
+
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); }
|
|
35
|
+
|
|
36
|
+
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; }
|
|
37
|
+
|
|
38
|
+
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); }
|
|
39
|
+
|
|
40
|
+
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; }
|
|
41
|
+
|
|
42
|
+
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; }
|
|
43
|
+
|
|
44
|
+
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; }
|
|
45
|
+
|
|
46
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
47
|
+
|
|
48
|
+
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."); }
|
|
49
|
+
|
|
50
|
+
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); }
|
|
51
|
+
|
|
52
|
+
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; }
|
|
53
|
+
|
|
54
|
+
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; }
|
|
55
|
+
|
|
56
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
57
|
+
|
|
58
|
+
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; }
|
|
59
|
+
|
|
60
|
+
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; }
|
|
61
|
+
|
|
62
|
+
var Context = /*#__PURE__*/_react["default"].createContext({});
|
|
63
|
+
|
|
64
|
+
exports.Context = Context;
|
|
65
|
+
var preCls = 'import-modal-task';
|
|
66
|
+
|
|
67
|
+
function ImportTaskModal(props) {
|
|
68
|
+
var _props$isVisible = props.isVisible,
|
|
69
|
+
isVisible = _props$isVisible === void 0 ? false : _props$isVisible,
|
|
70
|
+
_props$multiple = props.multiple,
|
|
71
|
+
multiple = _props$multiple === void 0 ? true : _props$multiple,
|
|
72
|
+
onOk = props.onOk,
|
|
73
|
+
_props$onCancel = props.onCancel,
|
|
74
|
+
onCancel = _props$onCancel === void 0 ? function () {} : _props$onCancel,
|
|
75
|
+
_props$isRelationOthe = props.isRelationOther,
|
|
76
|
+
isRelationOther = _props$isRelationOthe === void 0 ? false : _props$isRelationOthe,
|
|
77
|
+
onRelateSuccess = props.onRelateSuccess,
|
|
78
|
+
_props$lastSelected = props.lastSelected,
|
|
79
|
+
lastSelected = _props$lastSelected === void 0 ? [] : _props$lastSelected,
|
|
80
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
|
81
|
+
|
|
82
|
+
var _useState = (0, _react.useState)(isVisible),
|
|
83
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
84
|
+
visible = _useState2[0],
|
|
85
|
+
setVisible = _useState2[1];
|
|
86
|
+
|
|
87
|
+
var _useState3 = (0, _react.useState)([]),
|
|
88
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
89
|
+
taskData = _useState4[0],
|
|
90
|
+
setTaskData = _useState4[1];
|
|
91
|
+
|
|
92
|
+
var _useState5 = (0, _react.useState)(lastSelected),
|
|
93
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
94
|
+
selected = _useState6[0],
|
|
95
|
+
setSelected = _useState6[1];
|
|
96
|
+
|
|
97
|
+
var _useState7 = (0, _react.useState)(false),
|
|
98
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
99
|
+
isQuery = _useState8[0],
|
|
100
|
+
setIsQuery = _useState8[1];
|
|
101
|
+
|
|
102
|
+
var _useState9 = (0, _react.useState)({}),
|
|
103
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
104
|
+
query = _useState10[0],
|
|
105
|
+
setQuery = _useState10[1];
|
|
106
|
+
|
|
107
|
+
var _useState11 = (0, _react.useState)(1),
|
|
108
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
109
|
+
total = _useState12[0],
|
|
110
|
+
setTotal = _useState12[1];
|
|
111
|
+
|
|
112
|
+
var _useState13 = (0, _react.useState)(10),
|
|
113
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
114
|
+
pageSize = _useState14[0],
|
|
115
|
+
setPageSize = _useState14[1];
|
|
116
|
+
|
|
117
|
+
var _useState15 = (0, _react.useState)(1),
|
|
118
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
119
|
+
pageNum = _useState16[0],
|
|
120
|
+
setPageNum = _useState16[1];
|
|
121
|
+
|
|
122
|
+
var _useState17 = (0, _react.useState)(false),
|
|
123
|
+
_useState18 = _slicedToArray(_useState17, 2),
|
|
124
|
+
isloading = _useState18[0],
|
|
125
|
+
setIsLoading = _useState18[1];
|
|
126
|
+
|
|
127
|
+
var formatData = function formatData(data) {
|
|
128
|
+
var newData = [];
|
|
129
|
+
data.forEach(function (item) {
|
|
130
|
+
var obj = {};
|
|
131
|
+
obj['id'] = item === null || item === void 0 ? void 0 : item.taskId;
|
|
132
|
+
obj['name'] = item === null || item === void 0 ? void 0 : item.taskName;
|
|
133
|
+
obj['status'] = (0, _helper.okrStatus)(item === null || item === void 0 ? void 0 : item.status);
|
|
134
|
+
obj['principalUser'] = item === null || item === void 0 ? void 0 : item.principalUser;
|
|
135
|
+
obj['startDate'] = item === null || item === void 0 ? void 0 : item.startDate;
|
|
136
|
+
obj['endDate'] = item === null || item === void 0 ? void 0 : item.deadLine;
|
|
137
|
+
newData.push(obj);
|
|
138
|
+
});
|
|
139
|
+
return newData || [];
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
var getTaskData = function getTaskData() {
|
|
143
|
+
setIsLoading(true);
|
|
144
|
+
(0, _requestApi.planTableTask)(query, pageNum, pageSize).then(function (res) {
|
|
145
|
+
setIsLoading(false);
|
|
146
|
+
|
|
147
|
+
if (res) {
|
|
148
|
+
var tasks = res.tasks,
|
|
149
|
+
_total = res.total;
|
|
150
|
+
|
|
151
|
+
if (tasks !== null && tasks !== void 0 && tasks.length) {
|
|
152
|
+
var newData = formatData(tasks);
|
|
153
|
+
setTaskData(newData);
|
|
154
|
+
setTotal(_total);
|
|
155
|
+
} else {
|
|
156
|
+
setTaskData([]);
|
|
157
|
+
setTotal(0);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
var onPageChangeHandler = function onPageChangeHandler(current, pageSize) {
|
|
164
|
+
setSelected([]);
|
|
165
|
+
setPageNum(current);
|
|
166
|
+
setPageSize(pageSize);
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
var onOkHandler = function onOkHandler() {
|
|
170
|
+
onCancelHandler();
|
|
171
|
+
onOk && onOk(selected);
|
|
172
|
+
setSelected([]);
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
var onCancelHandler = function onCancelHandler() {
|
|
176
|
+
setVisible(false);
|
|
177
|
+
onCancel && onCancel();
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
var onQueryChangeHandler = function onQueryChangeHandler(values) {
|
|
181
|
+
setIsQuery(true);
|
|
182
|
+
setPageNum(1);
|
|
183
|
+
setQuery(_objectSpread(_objectSpread({}, query), values));
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
(0, _react.useEffect)(function () {
|
|
187
|
+
setVisible(isVisible);
|
|
188
|
+
}, [isVisible]);
|
|
189
|
+
(0, _react.useEffect)(function () {
|
|
190
|
+
isQuery && getTaskData();
|
|
191
|
+
}, [query, pageNum, pageSize]);
|
|
192
|
+
return /*#__PURE__*/_react["default"].createElement(_dialog["default"], _extends({
|
|
193
|
+
title: (0, _getLocale.getLocale)('Pro_detail_ImportTask'),
|
|
194
|
+
visible: visible,
|
|
195
|
+
onOk: onOkHandler,
|
|
196
|
+
onCancel: onCancelHandler,
|
|
197
|
+
onClose: onCancelHandler,
|
|
198
|
+
style: {
|
|
199
|
+
height: '590px'
|
|
200
|
+
},
|
|
201
|
+
width: 840,
|
|
202
|
+
zIndex: 1000,
|
|
203
|
+
noHeadLine: true,
|
|
204
|
+
noFooterLine: true,
|
|
205
|
+
extraClass: ['parent-target-pop-index', 'document-mouse-event-ignore'],
|
|
206
|
+
destroyOnClose: true
|
|
207
|
+
}, restProps), /*#__PURE__*/_react["default"].createElement("div", {
|
|
208
|
+
className: "".concat(preCls, "__content"),
|
|
209
|
+
onClick: function onClick(e) {
|
|
210
|
+
e.stopPropagation();
|
|
211
|
+
e.nativeEvent.stopImmediatePropagation();
|
|
212
|
+
}
|
|
213
|
+
}, /*#__PURE__*/_react["default"].createElement(_searchForm["default"], {
|
|
214
|
+
onChange: onQueryChangeHandler
|
|
215
|
+
}), isloading ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
216
|
+
className: "".concat(preCls, "__content-empty")
|
|
217
|
+
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
218
|
+
src: _loading["default"],
|
|
219
|
+
alt: ""
|
|
220
|
+
})) : /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
221
|
+
className: "".concat(preCls, "__content-tree")
|
|
222
|
+
}, /*#__PURE__*/_react["default"].createElement(_taskWorkTree.TaskWorkTree, {
|
|
223
|
+
selected: selected,
|
|
224
|
+
setSelected: setSelected,
|
|
225
|
+
data: taskData,
|
|
226
|
+
multiple: true,
|
|
227
|
+
pageSize: pageSize
|
|
228
|
+
})), !!total && /*#__PURE__*/_react["default"].createElement("div", {
|
|
229
|
+
className: "".concat(preCls, "__content-pagination")
|
|
230
|
+
}, /*#__PURE__*/_react["default"].createElement(_pagination["default"], {
|
|
231
|
+
size: "sm",
|
|
232
|
+
total: total,
|
|
233
|
+
onChange: onPageChangeHandler,
|
|
234
|
+
current: pageNum,
|
|
235
|
+
pageSize: pageSize
|
|
236
|
+
})))));
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
var _default = ImportTaskModal;
|
|
240
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,135 @@
|
|
|
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 _searchInput = _interopRequireDefault(require("../../search-input"));
|
|
13
|
+
|
|
14
|
+
var _periodSelector = _interopRequireDefault(require("../../period-selector"));
|
|
15
|
+
|
|
16
|
+
var _common = require("../../period-selector/common");
|
|
17
|
+
|
|
18
|
+
var _searchDropdown = _interopRequireDefault(require("../search/search-dropdown"));
|
|
19
|
+
|
|
20
|
+
var _taskStatusSelect = _interopRequireDefault(require("../search/task-status-select"));
|
|
21
|
+
|
|
22
|
+
var _taskRelation = _interopRequireDefault(require("../search/task-relation"));
|
|
23
|
+
|
|
24
|
+
var _helper = require("../helper");
|
|
25
|
+
|
|
26
|
+
var _formatTime = require("../../../utils/format-time");
|
|
27
|
+
|
|
28
|
+
var _getLocale = require("../../../utils/getLocale");
|
|
29
|
+
|
|
30
|
+
require("./index.css");
|
|
31
|
+
|
|
32
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
33
|
+
|
|
34
|
+
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); }
|
|
35
|
+
|
|
36
|
+
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; }
|
|
37
|
+
|
|
38
|
+
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; }
|
|
39
|
+
|
|
40
|
+
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; }
|
|
41
|
+
|
|
42
|
+
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; }
|
|
43
|
+
|
|
44
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
45
|
+
|
|
46
|
+
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."); }
|
|
47
|
+
|
|
48
|
+
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); }
|
|
49
|
+
|
|
50
|
+
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; }
|
|
51
|
+
|
|
52
|
+
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; }
|
|
53
|
+
|
|
54
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
55
|
+
|
|
56
|
+
function SearchForm(props) {
|
|
57
|
+
var onChange = props.onChange;
|
|
58
|
+
|
|
59
|
+
var _useState = (0, _react.useState)({
|
|
60
|
+
annualNum: new Date().getFullYear(),
|
|
61
|
+
// 默认当前年份全部周期
|
|
62
|
+
yqmNum: 0,
|
|
63
|
+
cycleType: '1',
|
|
64
|
+
startDate: (0, _formatTime.getFirstDayOfYear)(),
|
|
65
|
+
endDate: (0, _formatTime.getNextDayOfYear)()
|
|
66
|
+
}),
|
|
67
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
68
|
+
cycle = _useState2[0],
|
|
69
|
+
setCycle = _useState2[1];
|
|
70
|
+
|
|
71
|
+
var _useState3 = (0, _react.useState)(10),
|
|
72
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
73
|
+
status = _useState4[0],
|
|
74
|
+
setStatus = _useState4[1];
|
|
75
|
+
|
|
76
|
+
var _useState5 = (0, _react.useState)(''),
|
|
77
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
78
|
+
keyWords = _useState6[0],
|
|
79
|
+
setKeyWords = _useState6[1];
|
|
80
|
+
|
|
81
|
+
var _useState7 = (0, _react.useState)(0),
|
|
82
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
83
|
+
relation = _useState8[0],
|
|
84
|
+
setRelation = _useState8[1];
|
|
85
|
+
|
|
86
|
+
var dilagRef = (0, _react.useRef)(document.createElement('div'));
|
|
87
|
+
(0, _react.useEffect)(function () {
|
|
88
|
+
var planCycle = (0, _helper.formatPeriodPlanData)(cycle);
|
|
89
|
+
onChange(_objectSpread({
|
|
90
|
+
status: status,
|
|
91
|
+
keyWords: keyWords,
|
|
92
|
+
relation: relation
|
|
93
|
+
}, planCycle));
|
|
94
|
+
}, [status, keyWords, cycle, relation]);
|
|
95
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
96
|
+
ref: dilagRef
|
|
97
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
98
|
+
className: "rel-okr-tree__search-item"
|
|
99
|
+
}, /*#__PURE__*/_react["default"].createElement(_periodSelector["default"], {
|
|
100
|
+
selected: cycle,
|
|
101
|
+
yearsRange: [2019, new Date().getFullYear() + 10],
|
|
102
|
+
isFetch: false,
|
|
103
|
+
showBimonthly: false,
|
|
104
|
+
showHalfYear: false,
|
|
105
|
+
showCustom: false,
|
|
106
|
+
showFullCycle: false,
|
|
107
|
+
onChange: setCycle,
|
|
108
|
+
getPopupContainer: function getPopupContainer() {
|
|
109
|
+
return dilagRef.current;
|
|
110
|
+
},
|
|
111
|
+
popClass: "pull-screen-ignore"
|
|
112
|
+
}, /*#__PURE__*/_react["default"].createElement(_searchDropdown["default"], null, (0, _common.formatPeriod)(cycle)))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
113
|
+
className: "rel-okr-tree__search-item"
|
|
114
|
+
}, /*#__PURE__*/_react["default"].createElement(_taskStatusSelect["default"], {
|
|
115
|
+
onChange: setStatus,
|
|
116
|
+
initValue: status
|
|
117
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
118
|
+
className: "rel-okr-tree__search-item"
|
|
119
|
+
}, /*#__PURE__*/_react["default"].createElement(_taskRelation["default"], {
|
|
120
|
+
onChange: setRelation,
|
|
121
|
+
initValue: relation
|
|
122
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
123
|
+
className: "rel-okr-tree__search-item-keyword"
|
|
124
|
+
}, /*#__PURE__*/_react["default"].createElement(_searchInput["default"], {
|
|
125
|
+
onSearch: setKeyWords,
|
|
126
|
+
placeholder: (0, _getLocale.getLocale)('Mod_Enterkeywords'),
|
|
127
|
+
style: {
|
|
128
|
+
height: 32,
|
|
129
|
+
width: 240
|
|
130
|
+
}
|
|
131
|
+
})));
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
var _default = SearchForm;
|
|
135
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
.titaui-task-import__radio {
|
|
2
|
+
box-sizing: border-box;
|
|
3
|
+
display: inline-block;
|
|
4
|
+
width: 16px;
|
|
5
|
+
height: 16px;
|
|
6
|
+
border-radius: 8px;
|
|
7
|
+
border: 1px solid #bfc7d5;
|
|
8
|
+
cursor: pointer;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.titaui-task-import__radio--checked {
|
|
12
|
+
border-color: #2879ff;
|
|
13
|
+
position: relative;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.titaui-task-import__radio--checked:before {
|
|
17
|
+
content: '';
|
|
18
|
+
position: absolute;
|
|
19
|
+
left: 50%;
|
|
20
|
+
top: 50%;
|
|
21
|
+
transform: translate(-50%, -50%);
|
|
22
|
+
width: 10px;
|
|
23
|
+
height: 10px;
|
|
24
|
+
background-color: #2879ff;
|
|
25
|
+
border-radius: 5px;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.pull-screen-ignore .rc-dialog-footer {
|
|
29
|
+
position: relative;
|
|
30
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _importTaskModal = _interopRequireDefault(require("./import-task-modal"));
|
|
9
|
+
|
|
10
|
+
var _importOkrModal = _interopRequireDefault(require("./import-okr-modal"));
|
|
11
|
+
|
|
12
|
+
require("./index.css");
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
|
+
|
|
16
|
+
var _default = {
|
|
17
|
+
ImportTaskModal: _importTaskModal["default"],
|
|
18
|
+
ImportOKRModal: _importOkrModal["default"]
|
|
19
|
+
};
|
|
20
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,62 @@
|
|
|
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"] = _default;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
+
|
|
14
|
+
var _helper = require("./helper");
|
|
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
|
+
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; }
|
|
23
|
+
|
|
24
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
25
|
+
|
|
26
|
+
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."); }
|
|
27
|
+
|
|
28
|
+
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); }
|
|
29
|
+
|
|
30
|
+
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; }
|
|
31
|
+
|
|
32
|
+
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; }
|
|
33
|
+
|
|
34
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
35
|
+
|
|
36
|
+
function _default(props) {
|
|
37
|
+
var defaultChecked = props.defaultChecked,
|
|
38
|
+
onChange = props.onChange,
|
|
39
|
+
id = props.id;
|
|
40
|
+
|
|
41
|
+
var _useState = (0, _react.useState)(function () {
|
|
42
|
+
if (props.checked !== undefined) return props.checked;
|
|
43
|
+
return defaultChecked;
|
|
44
|
+
}),
|
|
45
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
46
|
+
checked = _useState2[0],
|
|
47
|
+
setChecked = _useState2[1];
|
|
48
|
+
|
|
49
|
+
(0, _react.useEffect)(function () {
|
|
50
|
+
setChecked(props.checked);
|
|
51
|
+
}, [props.checked]);
|
|
52
|
+
|
|
53
|
+
var onClickHandler = function onClickHandler() {
|
|
54
|
+
setChecked(!checked);
|
|
55
|
+
onChange && onChange(!checked, id);
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
59
|
+
onClick: onClickHandler,
|
|
60
|
+
className: (0, _classnames["default"])("".concat(_helper.preCls, "__radio"), _defineProperty({}, "".concat(_helper.preCls, "__radio--checked"), checked))
|
|
61
|
+
});
|
|
62
|
+
}
|