@titaui/pc 1.12.7-beta.2 → 1.12.7-beta.20
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.js +4 -4
- package/lib/components/avatar/icon-avatar/index.js +1 -1
- package/lib/components/avatar/num-avatar/index.js +1 -1
- package/lib/components/book-demo/components/pc/components/content/index.js +1 -1
- package/lib/components/button/default-button/index.js +1 -1
- package/lib/components/button/icon-btn/index.js +1 -1
- package/lib/components/cascader/index.js +1 -1
- package/lib/components/cascader/time.js +1 -1
- package/lib/components/change-okr-modal/Filter.js +2 -2
- package/lib/components/change-okr-modal/Item.js +2 -2
- package/lib/components/change-okr-modal/filterTab.js +2 -2
- package/lib/components/change-okr-modal/index.js +2 -2
- package/lib/components/color-date-picker/index.js +4 -4
- package/lib/components/communication/CommunicationAttachments.js +2 -2
- package/lib/components/communication/ConvertUserName.js +2 -2
- package/lib/components/communication/index.js +2 -2
- package/lib/components/create-okr-modal/objectType.js +2 -2
- package/lib/components/date-picker/BodyItem.js +3 -3
- package/lib/components/date-picker/CalendarBody.js +3 -3
- package/lib/components/date-picker/CalendarHeader.js +3 -3
- package/lib/components/date-picker/index.js +2 -2
- package/lib/components/date-range-picker/index.js +2 -2
- package/lib/components/delete-confirm-pop/ConfirmPop.js +2 -2
- package/lib/components/dialog/index.js +1 -1
- package/lib/components/dialog-confirm/index.css +1 -0
- package/lib/components/dialog-confirm/index.js +6 -4
- package/lib/components/dialog-upload/uploaded-preview.js +4 -4
- package/lib/components/drawer/headerDrop.js +1 -1
- package/lib/components/drawer/index.js +1 -1
- package/lib/components/drawer-manager/drawerWrapper.js +1 -1
- package/lib/components/drawer-manager/index.js +1 -1
- package/lib/components/drop-selector/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/index.js +12 -8
- package/lib/components/dynamic/dynamic-item/components/okr-progress/constant.js +31 -0
- package/lib/components/dynamic/dynamic-item/components/okr-progress/index.js +90 -57
- package/lib/components/dynamic/dynamic-item/components/summary-header/constant.js +45 -0
- package/lib/components/dynamic/dynamic-item/components/summary-header/index.css +30 -0
- package/lib/components/dynamic/dynamic-item/components/summary-header/index.js +90 -101
- package/lib/components/dynamic/dynamic-item/components/summary-header/operate-record.js +49 -0
- package/lib/components/dynamic/dynamic-item/components/task-progress/constant.js +16 -0
- package/lib/components/dynamic/dynamic-item/components/task-progress/index.js +116 -34
- package/lib/components/dynamic/dynamic-item/components/task-progress/utils.js +20 -3
- package/lib/components/dynamic/dynamic-item/dynamic-ai-dialy/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-align/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-announcement/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-assessment/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-chart/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-create-o/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-kr/index.js +4 -3
- package/lib/components/dynamic/dynamic-item/dynamic-learning/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/index.js +8 -5
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/remind-user-view/index.css +5 -3
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/remind-user-view/index.js +14 -6
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/constant.js +45 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/index.js +87 -23
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/util.js +30 -0
- package/lib/components/dynamic/dynamic-item/dynamic-okrs-communication/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-plan-communication/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-progress/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-project/index.js +4 -3
- package/lib/components/dynamic/dynamic-item/dynamic-relative/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-reply/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-report/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-reward/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-share/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-task/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/index.css +1 -0
- package/lib/components/dynamic/dynamic-item/index.js +5 -3
- package/lib/components/eReport/eReportListEmpty.js +2 -2
- package/lib/components/eReport/eReportLists/reportList.js +2 -2
- package/lib/components/eReport/eReportShare/index.js +2 -2
- package/lib/components/eReport/eReportShare/toast/index.js +2 -2
- package/lib/components/edit-kr-wight/EditKrWightModal.js +2 -2
- package/lib/components/edit-kr-wight/FormItemV2.js +2 -2
- package/lib/components/emotions-selector/selector-content.js +2 -2
- package/lib/components/emotions-selector/selector-pop.js +2 -2
- package/lib/components/ereport-list/index.js +2 -2
- package/lib/components/error-boundary/index.js +2 -2
- package/lib/components/form/form-fields/date/index.js +1 -1
- package/lib/components/form/form-fields/dropdown/index.js +1 -1
- package/lib/components/form/form-fields/input/index.js +1 -1
- package/lib/components/form/form-fields/user/index.js +1 -1
- package/lib/components/help-card/index.js +1 -1
- package/lib/components/import-modal/import-okr-modal/index.js +4 -1
- package/lib/components/import-modal/import-task-modal/index.js +3 -2
- package/lib/components/import-modal/tree-node/index.js +1 -1
- package/lib/components/mblog/components/ConfirmPop.js +2 -2
- package/lib/components/mblog/components/MblogAction.js +2 -2
- package/lib/components/mblog/components/MblogContent.js +2 -2
- package/lib/components/mblog/index.js +2 -2
- package/lib/components/menus/components/menu-tree/index.js +1 -1
- package/lib/components/menus/components/menu-tree/tree-node/index.js +1 -1
- package/lib/components/menus/components/menu-tree/tree-node/subordinates.js +7 -3
- package/lib/components/menus/components/menu-tree/tree-node/summary-share.js +7 -3
- package/lib/components/menus/export-modules/summary-menus/depart-menus/index.js +59 -29
- package/lib/components/menus/export-modules/summary-menus/menus.js +42 -51
- package/lib/components/menus/export-modules/summary-menus/request-api.js +17 -0
- package/lib/components/menus/export-modules/summary-menus/summary-front-menus.js +50 -7
- package/lib/components/menus/request-apis.js +8 -2
- package/lib/components/new-confidence/index.js +5 -5
- package/lib/components/okr-detail/auth.js +2 -2
- package/lib/components/okr-detail/components/base-okr-type/confirm/buttonv2.js +2 -2
- package/lib/components/okr-detail/components/base-okr-type/confirm/confirm.js +2 -2
- package/lib/components/okr-detail/components/base-okr-type/object-type.js +2 -2
- package/lib/components/okr-detail/components/header/o-score.js +1 -1
- package/lib/components/okr-detail/components/icon-text/index.js +1 -1
- package/lib/components/okr-detail/components/okr-tree/index.js +1 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/index.js +1 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/edit-pop.js +2 -2
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/kr-push-score.js +3 -3
- package/lib/components/okr-review/ReviewPop/components/ReviewBody/index.js +2 -2
- package/lib/components/okr-review/ReviewPop/components/Toast/index.js +2 -2
- package/lib/components/okr-review/ReviewPop/index.js +2 -2
- package/lib/components/okr-review/components/ReviewItem/index.js +2 -2
- package/lib/components/okr-review/components/confirm-pop/ConfirmPop.js +2 -2
- package/lib/components/okr-review/index.js +2 -2
- package/lib/components/operation-records/OperationRecordItem.js +2 -2
- package/lib/components/operation-records/index.js +2 -2
- package/lib/components/pagination/pagination.js +1 -1
- package/lib/components/period-selector/components/button/index.js +1 -1
- package/lib/components/picker/components/panels/date-panel/index.js +1 -1
- package/lib/components/picker/components/panels/month-panel/index.js +1 -1
- package/lib/components/picker/components/panels/month-panel/month-head.js +1 -1
- package/lib/components/picker/components/panels/week-panel/index.js +1 -1
- package/lib/components/picker/components/panels/week-panel/utils.js +81 -2
- package/lib/components/picker/components/panels/week-panel/week-body.js +29 -31
- package/lib/components/picker/components/panels/year-panel/index.js +1 -1
- package/lib/components/picker/components/panels/year-panel/year-head.js +1 -1
- package/lib/components/picker/components/picker-trigger/index.js +2 -47
- package/lib/components/picker/picker.js +1 -1
- package/lib/components/point-demo/drop-down-box/index.js +1 -1
- package/lib/components/point-demo/input/index.js +3 -3
- package/lib/components/point-demo/popup/index.js +1 -1
- package/lib/components/popup/index.js +1 -1
- package/lib/components/praise-record/PraiseRecordItem.js +2 -2
- package/lib/components/praise-record/index.js +2 -2
- package/lib/components/promise-confirm/index.css +0 -0
- package/lib/components/promise-confirm/index.js +117 -0
- package/lib/components/promise-confirm/interface.js +5 -0
- package/lib/components/range-picker-pop/index.js +3 -3
- package/lib/components/range-selector-pop/RangeList.js +2 -2
- package/lib/components/range-selector-pop/RangeSelectorPop.js +2 -2
- package/lib/components/rate/index.css +111 -0
- package/lib/components/rate/index.js +2 -2
- package/lib/components/rich-editor/models/schema.js +2 -2
- package/lib/components/rich-editor/plugins/block/block-quote/index.js +2 -2
- package/lib/components/rich-editor/plugins/block/heading/index.js +2 -2
- package/lib/components/rich-editor/plugins/block/lists/index.js +2 -2
- package/lib/components/rich-editor/plugins/block/paragraph/index.js +2 -2
- package/lib/components/rich-editor/plugins/core/index.js +2 -2
- package/lib/components/rich-editor/plugins/extension/alignment/index.js +2 -2
- package/lib/components/rich-editor/plugins/extension/placeholder/index.js +2 -2
- package/lib/components/rich-editor/plugins/inline/color/index.js +2 -2
- package/lib/components/rich-editor/plugins/inline/delete-line/index.js +2 -2
- package/lib/components/rich-editor/plugins/inline/em/index.js +2 -2
- package/lib/components/rich-editor/plugins/inline/link/index.js +2 -2
- package/lib/components/rich-editor/plugins/inline/strong/index.js +2 -2
- package/lib/components/rich-editor/plugins/inline/under-line/index.js +2 -2
- package/lib/components/rich-editor/react/reactNodeView.js +4 -4
- package/lib/components/rich-editor/react/uiProvider.js +2 -2
- package/lib/components/rich-editor/schemas/list.js +0 -1
- package/lib/components/rich-editor/ui/Popup/index.js +2 -2
- package/lib/components/rich-editor-at/index.js +9 -4
- package/lib/components/rich-editor-upload/index.js +3 -0
- package/lib/components/scroll-container/index.js +2 -2
- package/lib/components/scrollbar/index.js +1 -1
- package/lib/components/scrollbar/scroll-mask/index.js +1 -1
- package/lib/components/scrollbar/simplebar-react.js +1 -1
- package/lib/components/search-dropdown/index.js +1 -1
- package/lib/components/select/Option.js +3 -3
- package/lib/components/select/index.js +3 -3
- package/lib/components/select-layer/index.js +1 -1
- package/lib/components/select-tags/index.js +8 -2
- package/lib/components/switch/index.js +1 -1
- package/lib/components/table/index.js +1 -1
- package/lib/components/tabs/index.js +1 -1
- package/lib/components/task-relation-modal/index.js +1 -1
- package/lib/components/task-relation-modal/okr-relation/relation-task-model/index.js +1 -1
- package/lib/components/task-relation-modal/okr-relation/relation-work-model/index.js +1 -1
- package/lib/components/task-relation-modal/tree-node/index.js +1 -1
- package/lib/components/task-relation-modal/work-relation/index.js +1 -1
- package/lib/components/task-tree/task-item-node/task-node-render.js +1 -1
- package/lib/components/task-tree/task-tree.js +1 -1
- package/lib/components/textarea/index.js +1 -1
- package/lib/components/time-picker/time-picker-selector.js +1 -1
- package/lib/components/time-picker/time-picker.js +1 -1
- package/lib/components/time-picker/timer-picker-input.js +1 -1
- package/lib/components/tita-chart/charts/liquid-ball.js +1 -1
- package/lib/components/tita-chart/charts/pie.js +1 -1
- package/lib/components/tita-chart/errorBoundary/index.js +2 -2
- package/lib/components/tooltip/error-tip.js +1 -1
- package/lib/components/tooltip/tooltip.js +1 -1
- package/lib/components/tree/index.js +1 -1
- package/lib/components/upload/components/uploadedPreview.js +2 -2
- package/lib/components/upload/index.js +2 -2
- package/lib/components/upvote/index.js +1 -1
- package/lib/components/user-selector/export-modules/multiple-user-selector--bak/index.js +1 -1
- package/lib/components/user-selector/select-tree/choose-tree/index.js +1 -1
- package/lib/components/user-selector/select-tree/selected-tree/index.js +1 -1
- package/lib/components/viewer/ImageListRender.js +2 -2
- package/lib/components/viewer/index.js +2 -2
- 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/components-v1/animate/AnimateChild.js +2 -2
- package/lib/components-v1/animate/animate.js +2 -2
- package/lib/components-v1/avatar/index.js +2 -2
- package/lib/components-v1/buttonv2/ButtonOutlined.js +2 -2
- package/lib/components-v1/buttonv2/ButtonRounded.js +2 -2
- package/lib/components-v1/buttonv2/DefaultButton.js +2 -2
- package/lib/components-v1/confirm/index.js +2 -2
- package/lib/components-v1/dropDownSelector/StatelessDropdown.js +2 -2
- package/lib/components-v1/dropDownSelector/dropDownSelector.js +2 -2
- package/lib/components-v1/input/Input.js +3 -3
- package/lib/components-v1/input/InputNumber.js +2 -2
- package/lib/components-v1/placement/placement.js +2 -2
- package/lib/components-v1/placement/placementInner.js +2 -2
- package/lib/components-v1/pop/Pop.js +2 -2
- package/lib/components-v1/pop/PopInner.js +2 -2
- package/lib/components-v1/portals/Portals.js +2 -2
- package/lib/components-v1/progress/CircleProgress.js +2 -2
- package/lib/components-v1/progress/LineProgress.js +2 -2
- package/lib/components-v1/progress/index.js +2 -2
- package/lib/components-v1/radio/radio.js +2 -2
- package/lib/components-v1/radio/radioGroup.js +2 -2
- package/lib/components-v1/search/index.js +2 -2
- package/lib/components-v1/select/Option.js +3 -3
- package/lib/components-v1/select/index.js +3 -3
- package/lib/components-v1/tabs/index.js +2 -2
- package/lib/components-v1/textarea/index.js +2 -2
- package/lib/components-v1/transition/index.js +2 -2
- package/lib/components-v1/userSelector/UserSelectorPop.js +2 -2
- package/lib/components-v1/userSelector/components/MultiMode/CommonList.js +2 -2
- package/lib/components-v1/userSelector/components/MultiMode/DepartmentList.js +2 -2
- package/lib/components-v1/userSelector/components/MultiMode/DepartmentTree.js +2 -2
- package/lib/components-v1/userSelector/components/MultiMode/SubsList.js +2 -2
- package/lib/components-v1/userSelector/components/MultiMode/index.js +2 -2
- package/lib/components-v1/userSelector/components/SearchBar.js +2 -2
- package/lib/components-v1/userSelector/components/SingleMode.js +2 -2
- package/lib/components-v1/userSelector/components/UserItem.js +2 -2
- package/lib/components-v1/userSelector/index.js +2 -2
- package/lib/index.js +16 -0
- package/lib/pages/appointment-demo/drop-down-box/index.js +1 -1
- package/lib/pages/appointment-demo/input/index.js +3 -3
- package/lib/pages/appointment-demo/popup/index.js +1 -1
- package/lib/pages/group-management/components/input-form/index.js +3 -3
- package/lib/pages/group-management/components/radio/index.js +1 -1
- package/lib/pages/group-management/page-view/importGroupStaff/index.js +1 -1
- package/lib/pages/group-management/tree/index.js +1 -1
- package/lib/pages/okr-map/export-modules/okr-map/okr-map.js +1 -1
- package/lib/pages/okr-map/export-modules/share-okr-page/share-okr-map.js +1 -1
- package/lib/pages/okr-map/share-dialog/index.js +1 -1
- package/lib/utils/auth.js +2 -2
- package/lib/utils/constant.js +8 -2
- package/package.json +1 -1
|
@@ -33,9 +33,11 @@ var _constant = require("../../../constant");
|
|
|
33
33
|
|
|
34
34
|
var _getLocale = require("../../../../../utils/getLocale");
|
|
35
35
|
|
|
36
|
-
var
|
|
36
|
+
var _constant2 = require("./constant");
|
|
37
|
+
|
|
38
|
+
var _operateRecord = _interopRequireDefault(require("./operate-record"));
|
|
37
39
|
|
|
38
|
-
var
|
|
40
|
+
var _evalute = _interopRequireDefault(require("./img/evalute.png"));
|
|
39
41
|
|
|
40
42
|
require("./index.css");
|
|
41
43
|
|
|
@@ -59,63 +61,77 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
59
61
|
|
|
60
62
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
61
63
|
|
|
62
|
-
var prefix =
|
|
64
|
+
var prefix = 'titaui-dynamic-item-header';
|
|
63
65
|
|
|
64
66
|
var DynamicItemHeader = function DynamicItemHeader(_ref) {
|
|
65
67
|
var _ref$onDeleteFeed = _ref.onDeleteFeed,
|
|
66
68
|
onDeleteFeed = _ref$onDeleteFeed === void 0 ? function () {} : _ref$onDeleteFeed,
|
|
67
69
|
_ref$showDelete = _ref.showDelete,
|
|
68
70
|
showDelete = _ref$showDelete === void 0 ? false : _ref$showDelete,
|
|
69
|
-
_ref$showTopping = _ref.showTopping,
|
|
70
|
-
showTopping = _ref$showTopping === void 0 ? false : _ref$showTopping,
|
|
71
71
|
_ref$showEdit = _ref.showEdit,
|
|
72
72
|
showEdit = _ref$showEdit === void 0 ? true : _ref$showEdit,
|
|
73
|
+
_ref$showCollect = _ref.showCollect,
|
|
74
|
+
showCollect = _ref$showCollect === void 0 ? false : _ref$showCollect,
|
|
73
75
|
_ref$showOperateRecor = _ref.showOperateRecord,
|
|
74
76
|
showOperateRecord = _ref$showOperateRecor === void 0 ? true : _ref$showOperateRecor,
|
|
75
77
|
data = _ref.data,
|
|
76
78
|
_ref$desc = _ref.desc,
|
|
77
|
-
desc = _ref$desc === void 0 ?
|
|
79
|
+
desc = _ref$desc === void 0 ? '' : _ref$desc,
|
|
78
80
|
user = _ref.user,
|
|
79
81
|
_ref$suffixContent = _ref.suffixContent,
|
|
80
|
-
suffixContent = _ref$suffixContent === void 0 ?
|
|
82
|
+
suffixContent = _ref$suffixContent === void 0 ? '' : _ref$suffixContent;
|
|
81
83
|
var createDate = data.createDate,
|
|
82
84
|
feedId = data.feedId,
|
|
83
|
-
_data$isTop = data.isTop,
|
|
84
|
-
isTop = _data$isTop === void 0 ? false : _data$isTop,
|
|
85
85
|
_data$isCollect = data.isCollect,
|
|
86
86
|
isCollect = _data$isCollect === void 0 ? false : _data$isCollect,
|
|
87
87
|
feedType = data.feedType,
|
|
88
|
-
canevaluate = data.canevaluate
|
|
88
|
+
canevaluate = data.canevaluate,
|
|
89
|
+
dailyContent = data.dailyContent,
|
|
90
|
+
dailyDate = data.dailyDate,
|
|
91
|
+
reportType = data.reportType;
|
|
89
92
|
|
|
90
|
-
var _useState = (0, _react.useState)(
|
|
93
|
+
var _useState = (0, _react.useState)(isCollect),
|
|
91
94
|
_useState2 = _slicedToArray(_useState, 2),
|
|
92
|
-
|
|
93
|
-
|
|
95
|
+
nowIsCollect = _useState2[0],
|
|
96
|
+
setNowIsCollect = _useState2[1];
|
|
94
97
|
|
|
95
|
-
var _useState3 = (0, _react.useState)(
|
|
98
|
+
var _useState3 = (0, _react.useState)(false),
|
|
96
99
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
97
|
-
|
|
98
|
-
|
|
100
|
+
showDialogConfirm = _useState4[0],
|
|
101
|
+
setShowDialogConfirm = _useState4[1];
|
|
99
102
|
|
|
100
103
|
var _useState5 = (0, _react.useState)(false),
|
|
101
104
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
102
|
-
|
|
103
|
-
|
|
105
|
+
selectVisible = _useState6[0],
|
|
106
|
+
setSelectVisible = _useState6[1];
|
|
104
107
|
|
|
105
108
|
var _useState7 = (0, _react.useState)(false),
|
|
106
109
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
107
|
-
|
|
108
|
-
|
|
110
|
+
evaluateVisible = _useState8[0],
|
|
111
|
+
setEvaluateVisible = _useState8[1];
|
|
109
112
|
|
|
110
|
-
var _useState9 = (0, _react.useState)(
|
|
113
|
+
var _useState9 = (0, _react.useState)(''),
|
|
111
114
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
112
|
-
|
|
113
|
-
|
|
115
|
+
mindImg = _useState10[0],
|
|
116
|
+
setMindImg = _useState10[1];
|
|
117
|
+
|
|
118
|
+
var _useState11 = (0, _react.useState)(false),
|
|
119
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
120
|
+
operateVisible = _useState12[0],
|
|
121
|
+
setOperateVisible = _useState12[1];
|
|
122
|
+
|
|
123
|
+
var url = '';
|
|
124
|
+
|
|
125
|
+
var handleCloseOperateDrawer = function handleCloseOperateDrawer() {
|
|
126
|
+
setOperateVisible(false);
|
|
127
|
+
};
|
|
114
128
|
|
|
115
|
-
var
|
|
129
|
+
var handleOpenOperateRecord = function handleOpenOperateRecord() {
|
|
130
|
+
setOperateVisible(true);
|
|
131
|
+
};
|
|
116
132
|
|
|
117
133
|
var onChangeHandler = function onChangeHandler(name) {
|
|
118
|
-
if (name ===
|
|
134
|
+
if (name === 'collect') {
|
|
119
135
|
if (nowIsCollect) {
|
|
120
136
|
(0, _requestApi.cancelCollectDynamic)({
|
|
121
137
|
feedId: feedId
|
|
@@ -124,7 +140,7 @@ var DynamicItemHeader = function DynamicItemHeader(_ref) {
|
|
|
124
140
|
setNowIsCollect(!nowIsCollect);
|
|
125
141
|
setSelectVisible(false);
|
|
126
142
|
|
|
127
|
-
_toast["default"].Success((0, _getLocale.getLocale)(
|
|
143
|
+
_toast["default"].Success((0, _getLocale.getLocale)('Mod_Successfuloperat'), {
|
|
128
144
|
canClose: false
|
|
129
145
|
});
|
|
130
146
|
} else {
|
|
@@ -141,7 +157,7 @@ var DynamicItemHeader = function DynamicItemHeader(_ref) {
|
|
|
141
157
|
setNowIsCollect(!nowIsCollect);
|
|
142
158
|
setSelectVisible(false);
|
|
143
159
|
|
|
144
|
-
_toast["default"].Success((0, _getLocale.getLocale)(
|
|
160
|
+
_toast["default"].Success((0, _getLocale.getLocale)('Mod_Successfuloperat'), {
|
|
145
161
|
canClose: false
|
|
146
162
|
});
|
|
147
163
|
} else {
|
|
@@ -154,49 +170,6 @@ var DynamicItemHeader = function DynamicItemHeader(_ref) {
|
|
|
154
170
|
}
|
|
155
171
|
};
|
|
156
172
|
|
|
157
|
-
var handleTopOperateClick = function handleTopOperateClick() {
|
|
158
|
-
if (nowIsTop) {
|
|
159
|
-
(0, _requestApi.cancelTopDynamic)({
|
|
160
|
-
feedId: feedId
|
|
161
|
-
}).then(function (resp) {
|
|
162
|
-
if (resp.Code === 1) {
|
|
163
|
-
setNowIsTop(!nowIsTop);
|
|
164
|
-
setSelectVisible(false);
|
|
165
|
-
|
|
166
|
-
_toast["default"].Success((0, _getLocale.getLocale)("Mod_Successfuloperat"), {
|
|
167
|
-
canClose: false
|
|
168
|
-
});
|
|
169
|
-
} else {
|
|
170
|
-
_toast["default"].Error(resp.Message, {
|
|
171
|
-
canClose: false
|
|
172
|
-
});
|
|
173
|
-
}
|
|
174
|
-
});
|
|
175
|
-
} else {
|
|
176
|
-
(0, _requestApi.topDynamic)({
|
|
177
|
-
feedId: feedId
|
|
178
|
-
}).then(function (resp) {
|
|
179
|
-
if (resp.Code === 1) {
|
|
180
|
-
setNowIsTop(!nowIsTop);
|
|
181
|
-
setSelectVisible(false);
|
|
182
|
-
|
|
183
|
-
_toast["default"].Success((0, _getLocale.getLocale)("Mod_Successfuloperat"), {
|
|
184
|
-
canClose: false
|
|
185
|
-
});
|
|
186
|
-
|
|
187
|
-
setTimeout(function () {
|
|
188
|
-
// @ts-ignore
|
|
189
|
-
window.reFreshDynamicTopping();
|
|
190
|
-
}, 1000);
|
|
191
|
-
} else {
|
|
192
|
-
_toast["default"].Error(resp.Message, {
|
|
193
|
-
canClose: false
|
|
194
|
-
});
|
|
195
|
-
}
|
|
196
|
-
});
|
|
197
|
-
}
|
|
198
|
-
};
|
|
199
|
-
|
|
200
173
|
var handleDeleteClick = function handleDeleteClick() {
|
|
201
174
|
setShowDialogConfirm(true);
|
|
202
175
|
setSelectVisible(false);
|
|
@@ -207,7 +180,7 @@ var DynamicItemHeader = function DynamicItemHeader(_ref) {
|
|
|
207
180
|
feedId: feedId
|
|
208
181
|
}).then(function (resp) {
|
|
209
182
|
if (resp.Code === 1) {
|
|
210
|
-
_toast["default"].Success((0, _getLocale.getLocale)(
|
|
183
|
+
_toast["default"].Success((0, _getLocale.getLocale)('Pro_detail_Deletsuccess'), {
|
|
211
184
|
canClose: false
|
|
212
185
|
});
|
|
213
186
|
|
|
@@ -230,13 +203,17 @@ var DynamicItemHeader = function DynamicItemHeader(_ref) {
|
|
|
230
203
|
|
|
231
204
|
var handleOpenUserPage = function handleOpenUserPage() {
|
|
232
205
|
if (!url) return;
|
|
233
|
-
window.open(url,
|
|
206
|
+
window.open(url, '_blank');
|
|
234
207
|
};
|
|
235
208
|
|
|
236
209
|
var handleClickEvaluate = function handleClickEvaluate() {
|
|
237
210
|
setEvaluateVisible(true);
|
|
238
211
|
};
|
|
239
212
|
|
|
213
|
+
var handleClickEdit = function handleClickEdit() {
|
|
214
|
+
window.open("#/summary/template?isCreate=false&hideNavTop=true&reportType=".concat(reportType, "¤tTime=").concat(dailyDate, "&templateId=&feedId=").concat(feedId), '_self');
|
|
215
|
+
};
|
|
216
|
+
|
|
240
217
|
var handleCloseEvaluateDialog = function handleCloseEvaluateDialog() {
|
|
241
218
|
setEvaluateVisible(false);
|
|
242
219
|
};
|
|
@@ -247,16 +224,29 @@ var DynamicItemHeader = function DynamicItemHeader(_ref) {
|
|
|
247
224
|
type: "warning"
|
|
248
225
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
249
226
|
type: "title"
|
|
250
|
-
}, feedType === _constant.EFeedType.Share ? (0, _getLocale.getLocale)(
|
|
227
|
+
}, feedType === _constant.EFeedType.Share ? (0, _getLocale.getLocale)('OKR_MyO_Err_Delesh') : (0, _getLocale.getLocale)('OKR_MyO_Err_Delepost')), /*#__PURE__*/_react["default"].createElement("span", {
|
|
251
228
|
type: "content"
|
|
252
|
-
}, feedType === _constant.EFeedType.Share ? (0, _getLocale.getLocale)(
|
|
229
|
+
}, feedType === _constant.EFeedType.Share ? (0, _getLocale.getLocale)('OKR_MyO_Err_Deleshre') : (0, _getLocale.getLocale)('OKR_MyO_Err_Delepostsu')), /*#__PURE__*/_react["default"].createElement(_dialogConfirm.CancelButton, {
|
|
253
230
|
type: "button",
|
|
254
231
|
onClick: cancelDeleteDynamic
|
|
255
|
-
}, (0, _getLocale.getLocale)(
|
|
232
|
+
}, (0, _getLocale.getLocale)('Mod_Cancel')), /*#__PURE__*/_react["default"].createElement(_dialogConfirm.WarningButton, {
|
|
256
233
|
type: "button",
|
|
257
234
|
onClick: enSureDeleteDynamic
|
|
258
|
-
}, (0, _getLocale.getLocale)(
|
|
235
|
+
}, (0, _getLocale.getLocale)('Mod_Delete')));
|
|
259
236
|
}, [showDialogConfirm]);
|
|
237
|
+
(0, _react.useEffect)(function () {
|
|
238
|
+
if (dailyContent) {
|
|
239
|
+
var mindData = dailyContent.filter(function (item) {
|
|
240
|
+
return item.title === '心情';
|
|
241
|
+
}); // 暂时用title
|
|
242
|
+
|
|
243
|
+
if (typeof mindData[0].content === 'string' && mindData[0].content !== '') {
|
|
244
|
+
setMindImg(_constant2.Motion.filter(function (item) {
|
|
245
|
+
return item.id === JSON.parse(mindData[0].content).SelectedValues[0];
|
|
246
|
+
})[0].img);
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
}, [dailyContent]);
|
|
260
250
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
261
251
|
className: "".concat(prefix)
|
|
262
252
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
@@ -274,9 +264,10 @@ var DynamicItemHeader = function DynamicItemHeader(_ref) {
|
|
|
274
264
|
textNum: 1,
|
|
275
265
|
fontSize: 18
|
|
276
266
|
}
|
|
277
|
-
}), /*#__PURE__*/_react["default"].createElement("img", {
|
|
278
|
-
src:
|
|
279
|
-
className: "".concat(prefix, "-desc-mind")
|
|
267
|
+
}), mindImg && /*#__PURE__*/_react["default"].createElement("img", {
|
|
268
|
+
src: mindImg,
|
|
269
|
+
className: "".concat(prefix, "-desc-mind"),
|
|
270
|
+
alt: "\u5FC3\u60C5"
|
|
280
271
|
})), /*#__PURE__*/_react["default"].createElement("span", {
|
|
281
272
|
className: "".concat(prefix, "-desc")
|
|
282
273
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -297,53 +288,47 @@ var DynamicItemHeader = function DynamicItemHeader(_ref) {
|
|
|
297
288
|
onClick: handleClickEvaluate
|
|
298
289
|
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
299
290
|
src: _evalute["default"],
|
|
300
|
-
className: "".concat(prefix, "__evalute-img")
|
|
291
|
+
className: "".concat(prefix, "__evalute-img"),
|
|
292
|
+
alt: "\u8BC4\u4EF7"
|
|
301
293
|
}), (0, _getLocale.getLocale)('Per_MyRe_button_Toevaluate')), /*#__PURE__*/_react["default"].createElement("div", {
|
|
302
294
|
className: "".concat(prefix, "__more-operate")
|
|
303
295
|
}, /*#__PURE__*/_react["default"].createElement(_dropSelector["default"], {
|
|
304
296
|
popupPlacement: "bottomRight",
|
|
305
|
-
checked: [
|
|
297
|
+
checked: ['collect'],
|
|
306
298
|
onChange: onChangeHandler,
|
|
307
299
|
multi: false,
|
|
308
300
|
visible: selectVisible,
|
|
309
301
|
trigger: /*#__PURE__*/_react["default"].createElement("span", {
|
|
310
|
-
className: (0, _classnames["default"])("".concat(prefix, "-right"),
|
|
302
|
+
className: (0, _classnames["default"])("".concat(prefix, "-right"), 'tu-icon-more1'),
|
|
311
303
|
onClick: handleShowDropSelector
|
|
312
304
|
})
|
|
305
|
+
}, /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
|
|
306
|
+
condition: showCollect
|
|
313
307
|
}, /*#__PURE__*/_react["default"].createElement(_dropSelector.Item, {
|
|
314
308
|
name: "collect"
|
|
315
309
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
316
310
|
className: "".concat(prefix, "__more-operate-selection")
|
|
317
311
|
}, /*#__PURE__*/_react["default"].createElement("i", {
|
|
318
|
-
className: (0, _classnames["default"])(
|
|
319
|
-
}), nowIsCollect ? (0, _getLocale.getLocale)(
|
|
320
|
-
condition: showTopping
|
|
321
|
-
}, /*#__PURE__*/_react["default"].createElement(_dropSelector.Item, {
|
|
322
|
-
name: "top",
|
|
323
|
-
onClick: handleTopOperateClick
|
|
324
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
325
|
-
className: "".concat(prefix, "__more-operate-selection")
|
|
326
|
-
}, /*#__PURE__*/_react["default"].createElement("i", {
|
|
327
|
-
className: (0, _classnames["default"])("tu-icon-zhiding", "".concat(prefix, "__more-operate-selection-icon"))
|
|
328
|
-
}), nowIsTop ? (0, _getLocale.getLocale)("OKR_MyO_Unpinned") : (0, _getLocale.getLocale)("Feed_Top")))), /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
|
|
312
|
+
className: (0, _classnames["default"])('tu-icon-APP-shoucang', "".concat(prefix, "__more-operate-selection-icon"))
|
|
313
|
+
}), nowIsCollect ? (0, _getLocale.getLocale)('Mod_CancCollection') : (0, _getLocale.getLocale)('Mod_Collection')))), /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
|
|
329
314
|
condition: showEdit
|
|
330
315
|
}, /*#__PURE__*/_react["default"].createElement(_dropSelector.Item, {
|
|
331
316
|
name: "edit",
|
|
332
|
-
onClick:
|
|
317
|
+
onClick: handleClickEdit
|
|
333
318
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
334
319
|
className: "".concat(prefix, "__more-operate-selection")
|
|
335
320
|
}, /*#__PURE__*/_react["default"].createElement("i", {
|
|
336
|
-
className: (0, _classnames["default"])(
|
|
337
|
-
}), (0, _getLocale.getLocale)(
|
|
321
|
+
className: (0, _classnames["default"])('tu-icon-bianji3', "".concat(prefix, "__more-operate-selection-icon"))
|
|
322
|
+
}), (0, _getLocale.getLocale)('Mod_Editor')))), /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
|
|
338
323
|
condition: showOperateRecord
|
|
339
324
|
}, /*#__PURE__*/_react["default"].createElement(_dropSelector.Item, {
|
|
340
325
|
name: "record",
|
|
341
|
-
onClick:
|
|
326
|
+
onClick: handleOpenOperateRecord
|
|
342
327
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
343
328
|
className: "".concat(prefix, "__more-operate-selection")
|
|
344
329
|
}, /*#__PURE__*/_react["default"].createElement("i", {
|
|
345
|
-
className: (0, _classnames["default"])(
|
|
346
|
-
}), (0, _getLocale.getLocale)(
|
|
330
|
+
className: (0, _classnames["default"])('tu-icon-jinzhan-s', "".concat(prefix, "__more-operate-selection-icon"))
|
|
331
|
+
}), (0, _getLocale.getLocale)('Per_details_OperationRecord')))), /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
|
|
347
332
|
condition: showDelete
|
|
348
333
|
}, /*#__PURE__*/_react["default"].createElement(_dropSelector.Item, {
|
|
349
334
|
name: "delete",
|
|
@@ -351,12 +336,16 @@ var DynamicItemHeader = function DynamicItemHeader(_ref) {
|
|
|
351
336
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
352
337
|
className: "".concat(prefix, "__more-operate-selection")
|
|
353
338
|
}, /*#__PURE__*/_react["default"].createElement("i", {
|
|
354
|
-
className: (0, _classnames["default"])(
|
|
355
|
-
}), (0, _getLocale.getLocale)(
|
|
339
|
+
className: (0, _classnames["default"])('tu-icon-del', "".concat(prefix, "__more-operate-selection-icon"))
|
|
340
|
+
}), (0, _getLocale.getLocale)('Mod_Delete'))))))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
356
341
|
className: "".concat(prefix, "-desc-time")
|
|
357
342
|
}, createDate))), renderDialogConfirm, /*#__PURE__*/_react["default"].createElement(_commentsDialog["default"], {
|
|
358
343
|
visible: evaluateVisible,
|
|
359
344
|
closeDialog: handleCloseEvaluateDialog
|
|
345
|
+
}), /*#__PURE__*/_react["default"].createElement(_operateRecord["default"], {
|
|
346
|
+
visible: operateVisible,
|
|
347
|
+
onClose: handleCloseOperateDrawer,
|
|
348
|
+
feedId: feedId
|
|
360
349
|
}));
|
|
361
350
|
};
|
|
362
351
|
|
|
@@ -0,0 +1,49 @@
|
|
|
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 _drawer = _interopRequireDefault(require("../../../../drawer"));
|
|
13
|
+
|
|
14
|
+
var _getLocale = require("../../../../../utils/getLocale");
|
|
15
|
+
|
|
16
|
+
var _operationRecords = _interopRequireDefault(require("../../../../operation-records"));
|
|
17
|
+
|
|
18
|
+
require("./index.css");
|
|
19
|
+
|
|
20
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
21
|
+
|
|
22
|
+
var preCls = 'titaui-dynamic-new-summary__operate';
|
|
23
|
+
|
|
24
|
+
var OperateRecord = function OperateRecord(props) {
|
|
25
|
+
var visible = props.visible,
|
|
26
|
+
onClose = props.onClose,
|
|
27
|
+
feedId = props.feedId;
|
|
28
|
+
return /*#__PURE__*/_react["default"].createElement(_drawer["default"], {
|
|
29
|
+
visible: visible,
|
|
30
|
+
onClose: onClose,
|
|
31
|
+
className: preCls,
|
|
32
|
+
autoClosable: true
|
|
33
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
34
|
+
className: "".concat(preCls, "__head")
|
|
35
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
36
|
+
className: "".concat(preCls, "__head-title")
|
|
37
|
+
}, (0, _getLocale.getLocale)('Per_details_OperationRecord')), /*#__PURE__*/_react["default"].createElement("i", {
|
|
38
|
+
className: (0, _classnames["default"])("".concat(preCls, "__head-icon"), 'tu-icon-close'),
|
|
39
|
+
onClick: onClose
|
|
40
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
41
|
+
className: "".concat(preCls, "__content")
|
|
42
|
+
}, /*#__PURE__*/_react["default"].createElement(_operationRecords["default"], {
|
|
43
|
+
feedId: feedId,
|
|
44
|
+
commentCount: 4
|
|
45
|
+
})));
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
var _default = OperateRecord;
|
|
49
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.EStatusStatus2ClassType = void 0;
|
|
7
|
+
var EStatusStatus2ClassType = {
|
|
8
|
+
2: "tu-icon-finished",
|
|
9
|
+
1: "tu-icon-running",
|
|
10
|
+
4: "tu-icon-canceled",
|
|
11
|
+
3: "tu-icon-deferred",
|
|
12
|
+
6: "tu-icon-paused",
|
|
13
|
+
0: "tu-icon-notstart",
|
|
14
|
+
5: "tu-icon-jiantou-right"
|
|
15
|
+
};
|
|
16
|
+
exports.EStatusStatus2ClassType = EStatusStatus2ClassType;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
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
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
@@ -15,6 +13,14 @@ var _getLocale = require("../../../../../utils/getLocale");
|
|
|
15
13
|
|
|
16
14
|
var _progress = _interopRequireDefault(require("../progress"));
|
|
17
15
|
|
|
16
|
+
var _schedule = _interopRequireDefault(require("../schedule"));
|
|
17
|
+
|
|
18
|
+
var _tableRowOProject = _interopRequireDefault(require("../table-row-o-project"));
|
|
19
|
+
|
|
20
|
+
var _constant = require("./constant");
|
|
21
|
+
|
|
22
|
+
var _utils = require("./utils");
|
|
23
|
+
|
|
18
24
|
require("./index.css");
|
|
19
25
|
|
|
20
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -23,51 +29,127 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
23
29
|
|
|
24
30
|
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
31
|
|
|
26
|
-
|
|
32
|
+
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); }
|
|
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 prefix = 'titaui-dynamic-summary-task-progress';
|
|
47
|
+
var isImport = true;
|
|
48
|
+
var rows1 = {
|
|
49
|
+
"Rows": [{
|
|
50
|
+
"Id": 0,
|
|
51
|
+
"ParentId": 0,
|
|
52
|
+
"ParentObjType": 0,
|
|
53
|
+
"ParentObjName": "",
|
|
54
|
+
"Name": "1231313",
|
|
55
|
+
"Progress": 50,
|
|
56
|
+
"Status": 1,
|
|
57
|
+
"LastContent": " ",
|
|
58
|
+
"LastContentTime": "2022-05-25T20:57:09.4231912+08:00",
|
|
59
|
+
"IsQuantifyTask": 0,
|
|
60
|
+
"Deadline": "2022-06-17T18:00:00",
|
|
61
|
+
"StartDate": "2022-04-13T08:00:00",
|
|
62
|
+
"ImportTime": "2022-05-25T18:56:30.8395384+08:00",
|
|
63
|
+
"ImportType": 1,
|
|
64
|
+
"IsImport": 1
|
|
65
|
+
}]
|
|
66
|
+
};
|
|
27
67
|
|
|
28
68
|
var TaskProgress = function TaskProgress(_ref) {
|
|
29
|
-
var
|
|
30
|
-
|
|
69
|
+
var data = _ref.data,
|
|
70
|
+
_ref$type = _ref.type,
|
|
71
|
+
type = _ref$type === void 0 ? 'day' : _ref$type;
|
|
72
|
+
|
|
73
|
+
var _useState = (0, _react.useState)(),
|
|
74
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
75
|
+
rowsData = _useState2[0],
|
|
76
|
+
setRowsData = _useState2[1];
|
|
77
|
+
|
|
78
|
+
var _useState3 = (0, _react.useState)((0, _utils.getStatusStatistic)([])),
|
|
79
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
80
|
+
statusStatistic = _useState4[0],
|
|
81
|
+
setStatusStatistic = _useState4[1];
|
|
82
|
+
|
|
31
83
|
var renderTitle = (0, _react.useMemo)(function () {
|
|
32
|
-
if (type ===
|
|
33
|
-
return (0, _getLocale.getLocale)(
|
|
34
|
-
} else if (type ===
|
|
35
|
-
return (0, _getLocale.getLocale)(
|
|
36
|
-
} else if (type ===
|
|
37
|
-
return (0, _getLocale.getLocale)(
|
|
84
|
+
if (type === 'day') {
|
|
85
|
+
return (0, _getLocale.getLocale)('Rep_NewS_Toworkasks');
|
|
86
|
+
} else if (type === 'week') {
|
|
87
|
+
return (0, _getLocale.getLocale)('Rep_NewS_Thisetasks');
|
|
88
|
+
} else if (type === 'month') {
|
|
89
|
+
return (0, _getLocale.getLocale)('Rep_NewS_Taskormonth');
|
|
38
90
|
}
|
|
39
91
|
|
|
40
|
-
return
|
|
92
|
+
return '';
|
|
41
93
|
}, [type]);
|
|
42
94
|
var renderTable = (0, _react.useMemo)(function () {
|
|
43
95
|
return /*#__PURE__*/_react["default"].createElement("table", null, /*#__PURE__*/_react["default"].createElement("thead", null, /*#__PURE__*/_react["default"].createElement("tr", {
|
|
44
96
|
className: "".concat(prefix, "__table-title")
|
|
45
97
|
}, /*#__PURE__*/_react["default"].createElement("td", {
|
|
46
98
|
className: "".concat(prefix, "__table-title-okrs")
|
|
47
|
-
}, (0, _getLocale.getLocale)(
|
|
99
|
+
}, (0, _getLocale.getLocale)('OKR_MyO_Title_Taskname')), /*#__PURE__*/_react["default"].createElement("td", {
|
|
48
100
|
className: "".concat(prefix, "__table-title-progress")
|
|
49
|
-
}, (0, _getLocale.getLocale)(
|
|
101
|
+
}, (0, _getLocale.getLocale)('OKR_MyO_Pop_Upd_Progresss1')), /*#__PURE__*/_react["default"].createElement("td", {
|
|
50
102
|
className: "".concat(prefix, "__table-title-progress-desc")
|
|
51
|
-
}, (0, _getLocale.getLocale)(
|
|
52
|
-
overlay: (0, _getLocale.getLocale)(
|
|
103
|
+
}, (0, _getLocale.getLocale)('Feed_Tab_Title_Progress'), /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
104
|
+
overlay: (0, _getLocale.getLocale)('Rep_Tab_Mys_FillOKRsync'),
|
|
53
105
|
placement: "top",
|
|
54
106
|
align: {
|
|
55
107
|
offset: [0, 5]
|
|
56
108
|
}
|
|
57
109
|
}, /*#__PURE__*/_react["default"].createElement("i", {
|
|
58
110
|
className: "tu-icon-wiki ".concat(prefix, "__table-title-progress-desc-icon")
|
|
59
|
-
}))))), /*#__PURE__*/_react["default"].createElement("tbody", null,
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
111
|
+
}))))), /*#__PURE__*/_react["default"].createElement("tbody", null, rowsData && rows1.Rows.map(function (item) {
|
|
112
|
+
if (isImport) {
|
|
113
|
+
var _item$LastContent;
|
|
114
|
+
|
|
115
|
+
return /*#__PURE__*/_react["default"].createElement("tr", null, /*#__PURE__*/_react["default"].createElement("td", null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
116
|
+
className: "".concat(prefix, "__table-row-title") // onClick={() => handleShowTaskDetail(item)}
|
|
117
|
+
|
|
118
|
+
}, /*#__PURE__*/_react["default"].createElement("i", {
|
|
119
|
+
className: "".concat(prefix, "__table-row-title-icon ").concat(_constant.EStatusStatus2ClassType[item.Status])
|
|
120
|
+
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
121
|
+
className: "".concat(prefix, "__table-row-title-text")
|
|
122
|
+
}, item.Name))), /*#__PURE__*/_react["default"].createElement("td", null, /*#__PURE__*/_react["default"].createElement(_progress["default"], {
|
|
123
|
+
id: "".concat(item.Id),
|
|
124
|
+
type: "task",
|
|
125
|
+
status: "normal",
|
|
126
|
+
value: item.Progress,
|
|
127
|
+
editable: false,
|
|
128
|
+
riskLevel: item.Status
|
|
129
|
+
})), /*#__PURE__*/_react["default"].createElement("td", null, /*#__PURE__*/_react["default"].createElement(_schedule["default"], {
|
|
130
|
+
value: (item === null || item === void 0 ? void 0 : (_item$LastContent = item.LastContent) === null || _item$LastContent === void 0 ? void 0 : _item$LastContent.trim()) || '',
|
|
131
|
+
date: item.LastContentTime,
|
|
132
|
+
editable: false,
|
|
133
|
+
id: item.Id
|
|
134
|
+
})));
|
|
135
|
+
} else {
|
|
136
|
+
return /*#__PURE__*/_react["default"].createElement("tr", null, /*#__PURE__*/_react["default"].createElement("td", {
|
|
137
|
+
colSpan: 4
|
|
138
|
+
}, /*#__PURE__*/_react["default"].createElement(_tableRowOProject["default"], {
|
|
139
|
+
id: item.Id // isO={item.Type === EObjType.O}
|
|
140
|
+
,
|
|
141
|
+
extraClass: "".concat(prefix, "__table-obj"),
|
|
142
|
+
text: item.Name
|
|
143
|
+
})));
|
|
144
|
+
}
|
|
145
|
+
})));
|
|
146
|
+
}, [rowsData]);
|
|
147
|
+
(0, _react.useEffect)(function () {
|
|
148
|
+
if (_typeof(data) !== 'object' && data !== '') {
|
|
149
|
+
setRowsData(JSON.parse(data));
|
|
150
|
+
setStatusStatistic((0, _utils.getStatusStatistic)(JSON.parse(data).Rows));
|
|
151
|
+
}
|
|
152
|
+
}, [data]);
|
|
71
153
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
72
154
|
className: prefix
|
|
73
155
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -76,17 +158,17 @@ var TaskProgress = function TaskProgress(_ref) {
|
|
|
76
158
|
className: "".concat(prefix, "__statistic")
|
|
77
159
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
78
160
|
className: "".concat(prefix, "__statistic-item ").concat(prefix, "__statistic-item--finished")
|
|
79
|
-
}, (0, _getLocale.getLocale)(
|
|
161
|
+
}, (0, _getLocale.getLocale)('OKR_MyO_E_From_Completed'), ' ', /*#__PURE__*/_react["default"].createElement("span", {
|
|
80
162
|
className: "".concat(prefix, "__statistic-item--finished-text")
|
|
81
|
-
},
|
|
163
|
+
}, statusStatistic.doing)), /*#__PURE__*/_react["default"].createElement("span", {
|
|
82
164
|
className: "".concat(prefix, "__statistic-item ").concat(prefix, "__statistic-item--processing")
|
|
83
|
-
}, (0, _getLocale.getLocale)(
|
|
165
|
+
}, (0, _getLocale.getLocale)('OKR_MyO_Butt_Inprogress'), ' ', /*#__PURE__*/_react["default"].createElement("span", {
|
|
84
166
|
className: "".concat(prefix, "__statistic-item--processing-text")
|
|
85
|
-
},
|
|
167
|
+
}, statusStatistic.doing)), /*#__PURE__*/_react["default"].createElement("span", {
|
|
86
168
|
className: "".concat(prefix, "__statistic-item ").concat(prefix, "__statistic-item--overdue")
|
|
87
|
-
}, (0, _getLocale.getLocale)(
|
|
169
|
+
}, (0, _getLocale.getLocale)('OKR_MyO_E_Overdue'), ' ', /*#__PURE__*/_react["default"].createElement("span", {
|
|
88
170
|
className: "".concat(prefix, "__statistic-item--overdue-text")
|
|
89
|
-
},
|
|
171
|
+
}, statusStatistic.overDue))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
90
172
|
className: "".concat(prefix, "__table")
|
|
91
173
|
}, renderTable));
|
|
92
174
|
};
|
|
@@ -3,8 +3,25 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.getStatusStatistic = void 0;
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var getStatusStatistic = function getStatusStatistic(data) {
|
|
9
|
+
var result = {
|
|
10
|
+
done: 0,
|
|
11
|
+
doing: 0,
|
|
12
|
+
overDue: 0
|
|
13
|
+
};
|
|
14
|
+
data.forEach(function (item) {
|
|
15
|
+
// 1 进行中 2 已完成 3 已延期
|
|
16
|
+
if (item.status === 1) {
|
|
17
|
+
result.doing = result.doing + 1;
|
|
18
|
+
} else if (item.status === 2) {
|
|
19
|
+
result.done = result.done + 1;
|
|
20
|
+
} else if (item.status === 3) {
|
|
21
|
+
result.overDue = result.overDue + 1;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
return result;
|
|
25
|
+
};
|
|
9
26
|
|
|
10
|
-
exports.
|
|
27
|
+
exports.getStatusStatistic = getStatusStatistic;
|