@titaui/pc 1.11.51 → 1.11.52-beta.11
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/button/images/blue.svg +21 -0
- package/lib/components/button/images/red.svg +21 -0
- package/lib/components/button/images/white.svg +19 -0
- package/lib/components/button/rect-btn/index.js +3 -3
- package/lib/components/change-okr-modal/Item.js +19 -18
- package/lib/components/change-okr-modal/styledComponents.js +9 -9
- package/lib/components/checkbox/index.css +4 -0
- package/lib/components/contact-kefu/index.css +11 -1
- package/lib/components/contact-kefu/index.js +10 -4
- package/lib/components/create-okr-modal/createSuccessCmp.js +47 -19
- package/lib/components/create-okr-modal/fields/index.css +14 -3
- package/lib/components/create-okr-modal/fields/o-new-name.js +30 -19
- package/lib/components/create-okr-modal/fields/okr-parent.js +7 -5
- package/lib/components/create-okr-modal/index.js +200 -133
- package/lib/components/create-okr-modal/kr-items/index.css +23 -13
- package/lib/components/create-okr-modal/kr-items/krDatas.js +95 -76
- package/lib/components/create-okr-modal/kr-items/krItem.js +53 -56
- package/lib/components/create-okr-modal/style.js +5 -5
- package/lib/components/date-picker/BodyItem.js +3 -3
- package/lib/components/date-picker/CalendarHeader.js +3 -3
- package/lib/components/delete-confirm-pop/ConfirmPop.js +3 -3
- package/lib/components/dynamic/constant.js +1 -1
- package/lib/components/dynamic/dynamic-item/components/feed-operate/index.js +8 -8
- package/lib/components/dynamic/dynamic-item/dynamic-create-o/index.js +8 -8
- package/lib/components/dynamic/dynamic-list/index.js +14 -7
- package/lib/components/dynamic/index.js +9 -12
- package/lib/components/dynamic/request-api.js +7 -68
- package/lib/components/eReport/eReportLists/reportList.js +3 -3
- package/lib/components/emotions-selector/selector-pop.js +3 -3
- package/lib/components/ereport-list/index.js +3 -3
- package/lib/components/mblog/components/MblogAction.js +3 -3
- package/lib/components/menus/export-modules/appraisal-menus/menus.js +11 -9
- package/lib/components/nav-top/components/menu/index.js +18 -16
- package/lib/components/nav-top/index.js +2 -2
- package/lib/components/okr-detail/components/base-okr-type/confirm/confirm.js +1 -1
- package/lib/components/okr-detail/components/header/edit-name.js +86 -40
- package/lib/components/okr-detail/components/header/index.css +120 -41
- package/lib/components/okr-detail/components/header/index.js +36 -46
- package/lib/components/okr-detail/components/header/o-classify.js +152 -0
- package/lib/components/okr-detail/components/header/o-name.js +7 -5
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-kr-node/index.js +3 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.css +58 -4
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.js +159 -63
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/edit-pop.js +3 -3
- package/lib/components/okr-detail/components/okr-tree/tree-node/o-child-node/index.js +9 -9
- package/lib/components/okr-detail/components/okr-tree/tree-node/o-parent-node/index.js +15 -13
- package/lib/components/okr-detail/detail-header/index.js +8 -4
- package/lib/components/okr-detail/e-list/index.js +2 -2
- package/lib/components/okr-detail/okr-list/create-kr-item/index.css +17 -0
- package/lib/components/okr-detail/okr-list/create-kr-item/index.js +75 -53
- package/lib/components/okr-detail/request-apis.js +73 -69
- package/lib/components/okr-detail/schedule/components/kr-progress/index.js +3 -1
- package/lib/components/okr-detail/schedule/components/o-progress/index.js +34 -32
- package/lib/components/okr-detail/schedule/components/sub-o-progress/index.js +3 -1
- package/lib/components/okr-flow/child-node/kr-node.js +3 -1
- package/lib/components/okr-flow/child-node/work-node.js +3 -1
- package/lib/components/okr-progress/components/kr-progress/index.js +5 -3
- package/lib/components/okr-progress/components/o-progress/index.js +3 -1
- package/lib/components/okr-progress/components/sub-o-progress/index.js +3 -1
- package/lib/components/okr-review/ReviewPop/components/ReviewBody/index.js +3 -3
- package/lib/components/okr-review/components/ReviewItem/index.js +3 -3
- package/lib/components/okr-review/components/confirm-pop/ConfirmPop.js +3 -3
- package/lib/components/okr-share/common-painter/openDataPainter.js +9 -6
- package/lib/components/okr-share/common-painter/utils.js +183 -36
- package/lib/components/okr-share/index.css +5 -4
- package/lib/components/okr-share/pink-card/card.js +3 -3
- package/lib/components/okr-share/pink-card/drawKrs.js +93 -18
- package/lib/components/okr-share/pink-card/index.js +20 -12
- package/lib/components/open-data-painter/index.js +6 -5
- package/lib/components/period-selector/interface.js +7 -0
- package/lib/components/publish-dynamic-modal/publish-dynamic-modal.js +16 -10
- package/lib/components/range-selector-pop/RangeSelectorPop.js +3 -3
- package/lib/components/rich-editor/models/schema.js +6 -6
- package/lib/components/rich-editor/plugins/block/block-quote/index.js +8 -8
- package/lib/components/rich-editor/plugins/block/heading/index.js +8 -8
- package/lib/components/rich-editor/plugins/block/lists/index.js +14 -14
- package/lib/components/rich-editor/plugins/block/paragraph/index.js +5 -5
- package/lib/components/rich-editor/plugins/core/index.js +4 -4
- package/lib/components/rich-editor/plugins/extension/alignment/index.js +5 -5
- package/lib/components/rich-editor/plugins/extension/placeholder/index.js +4 -4
- package/lib/components/rich-editor/plugins/inline/color/index.js +11 -11
- package/lib/components/rich-editor/plugins/inline/delete-line/index.js +8 -8
- package/lib/components/rich-editor/plugins/inline/em/index.js +5 -5
- package/lib/components/rich-editor/plugins/inline/link/index.js +8 -8
- package/lib/components/rich-editor/plugins/inline/strong/index.js +8 -8
- package/lib/components/rich-editor/plugins/inline/under-line/index.js +8 -8
- package/lib/components/rich-editor/react/uiProvider.js +3 -3
- package/lib/components/rich-editor/ui/Popup/index.js +3 -3
- package/lib/components/search-input/index.css +1 -1
- package/lib/components/search-key-handle/index.js +9 -7
- package/lib/components/select/Option.js +3 -3
- package/lib/components/select-layer/index.css +1 -1
- package/lib/components/task-relation-modal/helper.js +139 -2
- package/lib/components/task-relation-modal/image/loading.gif +0 -0
- package/lib/components/task-relation-modal/index.js +9 -0
- package/lib/components/task-relation-modal/okr-relation/relation-task-model/index.css +18 -0
- package/lib/components/task-relation-modal/okr-relation/relation-task-model/index.js +262 -0
- package/lib/components/task-relation-modal/okr-relation/relation-task-model/search-form.js +135 -0
- package/lib/components/task-relation-modal/okr-relation/relation-work-model/index.css +0 -0
- package/lib/components/task-relation-modal/okr-relation/relation-work-model/index.js +129 -0
- package/lib/components/task-relation-modal/okr-relation/request-api.js +106 -0
- package/lib/components/task-relation-modal/okr-relation/tree/task-tree/index.css +120 -0
- package/lib/components/task-relation-modal/okr-relation/tree/task-tree/index.js +185 -0
- package/lib/components/task-relation-modal/request-api.js +28 -2
- package/lib/components/task-relation-modal/search/okr-status-select.js +3 -3
- package/lib/components/task-relation-modal/search/principal.js +36 -19
- package/lib/components/task-relation-modal/search/search-dropdown/index.css +2 -1
- package/lib/components/task-relation-modal/search/search-dropdown/index.js +1 -1
- package/lib/components/{dynamic/dynamic-topping/index.js → task-relation-modal/search/task-relation.js} +45 -44
- package/lib/components/task-relation-modal/search/task-status-select.js +87 -0
- package/lib/components/{dynamic/dynamic-liking/index.js → task-relation-modal/search/work-relation.js} +43 -39
- package/lib/components/task-relation-modal/search/work-status-select.js +74 -0
- package/lib/components/task-relation-modal/tree/category-tree/index.css +3 -3
- package/lib/components/task-relation-modal/tree/okr-tree/index.css +1 -1
- package/lib/components/task-relation-modal/tree/okr-tree/search-form.js +16 -2
- package/lib/components/task-relation-modal/tree/task-list/index.css +0 -0
- package/lib/components/task-relation-modal/tree/task-list/index.js +1 -0
- package/lib/components/task-relation-modal/tree/work-list/index.css +14 -0
- package/lib/components/task-relation-modal/tree/work-list/index.js +176 -0
- package/lib/components/task-relation-modal/tree/work-list/search-form.js +123 -0
- package/lib/components/task-relation-modal/tree/work-tree/index.css +1 -1
- package/lib/components/task-relation-modal/tree-node/category-node/index.css +1 -12
- package/lib/components/task-relation-modal/tree-node/category-node/index.js +1 -3
- package/lib/components/task-relation-modal/tree-node/kr-node/index.css +0 -16
- package/lib/components/task-relation-modal/tree-node/kr-node/index.js +4 -10
- package/lib/components/task-relation-modal/tree-node/milestone-node/index.css +0 -16
- package/lib/components/task-relation-modal/tree-node/milestone-node/index.js +0 -4
- package/lib/components/task-relation-modal/tree-node/o-node/index.js +8 -8
- package/lib/components/task-relation-modal/tree-node/work-node/index.js +3 -1
- package/lib/components/task-relation-modal/work-relation/index.css +0 -0
- package/lib/components/task-relation-modal/work-relation/index.js +256 -0
- package/lib/components/tita-chart/errorBoundary/index.js +3 -3
- package/lib/components/tooltip/index.js +3 -0
- package/lib/components/tooltip/tooltip-rows/index.css +26 -0
- package/lib/components/{dynamic/advertise → tooltip/tooltip-rows}/index.js +65 -85
- package/lib/components/user-selector/category-selector-panel/index.js +6 -1
- package/lib/components/{dynamic/quick-operation/components/create-task/index.js → user-selector/category-selector-panel/subordinate-tree.js} +37 -20
- package/lib/components/user-selector/constant.js +10 -2
- package/lib/components/user-selector/empty/index.css +5 -0
- package/lib/components/user-selector/empty/index.js +9 -3
- package/lib/components/user-selector/export-modules/depart-search-selector/index.js +45 -17
- package/lib/components/user-selector/export-modules/field-tree-selector/index.js +3 -1
- package/lib/components/user-selector/images/no-auth.png +0 -0
- package/lib/components/user-selector/request-apis.js +28 -9
- package/lib/components/user-selector/searched-panel/index.js +21 -7
- package/lib/components/user-selector/select-tree/tree-nodes/tree-person-node/index.js +46 -18
- package/lib/components/wechat-btn/index.css +5 -1
- package/lib/components-v1/animate/AnimateChild.js +3 -3
- package/lib/components-v1/avatar/index.js +3 -3
- package/lib/components-v1/dropDownSelector/StatelessDropdown.js +3 -3
- package/lib/components-v1/progress/CircleProgress.js +3 -3
- package/lib/components-v1/select/Option.js +3 -3
- package/lib/components-v1/userSelector/UserSelectorPop.js +3 -3
- package/lib/components-v1/userSelector/components/MultiMode/index.js +3 -3
- package/lib/components-v1/userSelector/components/SingleMode.js +7 -5
- package/lib/components-v1/userSelector/components/UserItem.js +3 -3
- package/lib/pages/home/components/data-list/table/columns/krName.js +3 -1
- package/lib/pages/home/components/data-list/table/columns/okrName.js +4 -2
- package/lib/utils/open-data.js +213 -65
- package/lib/utils/planDataJson.js +11115 -0
- package/package.json +3 -2
- package/lib/components/dynamic/advertise/components/next-btn/index.css +0 -27
- package/lib/components/dynamic/advertise/components/next-btn/index.js +0 -32
- package/lib/components/dynamic/advertise/components/pre-btn/index.css +0 -26
- package/lib/components/dynamic/advertise/components/pre-btn/index.js +0 -32
- package/lib/components/dynamic/advertise/index.css +0 -21
- package/lib/components/dynamic/advertise/interface.js +0 -5
- package/lib/components/dynamic/advertise/util.js +0 -28
- package/lib/components/dynamic/components/dynamic-search-input/index.css +0 -81
- package/lib/components/dynamic/components/dynamic-search-input/index.js +0 -203
- package/lib/components/dynamic/components/first-level-tabs/index.css +0 -101
- package/lib/components/dynamic/components/first-level-tabs/index.js +0 -131
- package/lib/components/dynamic/dynamic-like-ranking/image/like-ranking.svg +0 -23
- package/lib/components/dynamic/dynamic-like-ranking/image/ranking-1.png +0 -0
- package/lib/components/dynamic/dynamic-like-ranking/image/ranking-2.png +0 -0
- package/lib/components/dynamic/dynamic-like-ranking/image/ranking-3.png +0 -0
- package/lib/components/dynamic/dynamic-like-ranking/image/ranking-empty.png +0 -0
- package/lib/components/dynamic/dynamic-like-ranking/index.css +0 -146
- package/lib/components/dynamic/dynamic-like-ranking/index.js +0 -180
- package/lib/components/dynamic/dynamic-like-ranking/item.js +0 -105
- package/lib/components/dynamic/dynamic-like-ranking/mock.js +0 -84
- package/lib/components/dynamic/dynamic-liking/image/like-dynamic.svg +0 -30
- package/lib/components/dynamic/dynamic-liking/index.css +0 -81
- package/lib/components/dynamic/dynamic-liking/item.js +0 -75
- package/lib/components/dynamic/dynamic-liking/mock.js +0 -83
- package/lib/components/dynamic/dynamic-topping/image/quotation-mark.svg +0 -16
- package/lib/components/dynamic/dynamic-topping/image/top-icon.svg +0 -30
- package/lib/components/dynamic/dynamic-topping/index.css +0 -141
- package/lib/components/dynamic/dynamic-topping/interface.js +0 -5
- package/lib/components/dynamic/dynamic-topping/item.js +0 -153
- package/lib/components/dynamic/dynamic-topping/request-api.js +0 -36
- package/lib/components/dynamic/dynamic.css +0 -173
- package/lib/components/dynamic/dynamic.js +0 -428
- package/lib/components/dynamic/export-module/index.js +0 -37
- package/lib/components/dynamic/img/dynamic-top.svg +0 -14
- package/lib/components/dynamic/my-team/img/add-subordinate.png +0 -0
- package/lib/components/dynamic/my-team/img/line.png +0 -0
- package/lib/components/dynamic/my-team/img/team.png +0 -0
- package/lib/components/dynamic/my-team/index.css +0 -184
- package/lib/components/dynamic/my-team/index.js +0 -263
- package/lib/components/dynamic/my-team/request-api.js +0 -52
- package/lib/components/dynamic/my-team/util.js +0 -20
- package/lib/components/dynamic/new-ui.css +0 -192
- package/lib/components/dynamic/online-broadcast/components/broadcast-item/index.css +0 -58
- package/lib/components/dynamic/online-broadcast/components/broadcast-item/index.js +0 -68
- package/lib/components/dynamic/online-broadcast/data.js +0 -95
- package/lib/components/dynamic/online-broadcast/img/broadcast.svg +0 -14
- package/lib/components/dynamic/online-broadcast/img/new.png +0 -0
- package/lib/components/dynamic/online-broadcast/img/preview.png +0 -0
- package/lib/components/dynamic/online-broadcast/index.css +0 -46
- package/lib/components/dynamic/online-broadcast/index.js +0 -61
- package/lib/components/dynamic/online-broadcast/interfact.js +0 -5
- package/lib/components/dynamic/quick-operation/components/create-announcement/index.css +0 -25
- package/lib/components/dynamic/quick-operation/components/create-announcement/index.js +0 -39
- package/lib/components/dynamic/quick-operation/components/create-okr/index.css +0 -25
- package/lib/components/dynamic/quick-operation/components/create-okr/index.js +0 -39
- package/lib/components/dynamic/quick-operation/components/create-share/index.css +0 -25
- package/lib/components/dynamic/quick-operation/components/create-share/index.js +0 -39
- package/lib/components/dynamic/quick-operation/components/create-task/index.css +0 -25
- package/lib/components/dynamic/quick-operation/img/new-announcement.png +0 -0
- package/lib/components/dynamic/quick-operation/img/new-okr.png +0 -0
- package/lib/components/dynamic/quick-operation/img/new-share.png +0 -0
- package/lib/components/dynamic/quick-operation/img/new-task.png +0 -0
- package/lib/components/dynamic/quick-operation/index.css +0 -51
- package/lib/components/dynamic/quick-operation/index.js +0 -120
package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/edit-pop.js
CHANGED
|
@@ -81,7 +81,7 @@ var EditPop = /*#__PURE__*/function (_PureComponent) {
|
|
|
81
81
|
var _super = _createSuper(EditPop);
|
|
82
82
|
|
|
83
83
|
function EditPop() {
|
|
84
|
-
var _this;
|
|
84
|
+
var _temp, _this;
|
|
85
85
|
|
|
86
86
|
_classCallCheck(this, EditPop);
|
|
87
87
|
|
|
@@ -89,7 +89,7 @@ var EditPop = /*#__PURE__*/function (_PureComponent) {
|
|
|
89
89
|
args[_key] = arguments[_key];
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
return _possibleConstructorReturn(_this, (_this = _super.call.apply(_super, [this].concat(args)), _this.state = {
|
|
92
|
+
return _possibleConstructorReturn(_this, (_temp = _this = _super.call.apply(_super, [this].concat(args)), _this.state = {
|
|
93
93
|
value: _this.props.value,
|
|
94
94
|
showError: false,
|
|
95
95
|
errMsg: "",
|
|
@@ -152,7 +152,7 @@ var EditPop = /*#__PURE__*/function (_PureComponent) {
|
|
|
152
152
|
errMsg: (0, _i18nFrontTranslate.inputWordTrans)(value.length, maxLength),
|
|
153
153
|
disable: !!(maxLength && value.length > maxLength && disable)
|
|
154
154
|
});
|
|
155
|
-
},
|
|
155
|
+
}, _temp));
|
|
156
156
|
}
|
|
157
157
|
|
|
158
158
|
_createClass(EditPop, [{
|
|
@@ -27,7 +27,7 @@ var _oClassify = _interopRequireDefault(require("../../../o-classify"));
|
|
|
27
27
|
|
|
28
28
|
var _precls = _interopRequireDefault(require("../../precls"));
|
|
29
29
|
|
|
30
|
-
var
|
|
30
|
+
var _openData = require("../../../../../../utils/open-data");
|
|
31
31
|
|
|
32
32
|
var _avatar = _interopRequireDefault(require("../../../../../avatar"));
|
|
33
33
|
|
|
@@ -61,10 +61,10 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
61
61
|
|
|
62
62
|
var getSeasonTectMap = function getSeasonTectMap() {
|
|
63
63
|
return {
|
|
64
|
-
1:
|
|
65
|
-
2:
|
|
66
|
-
3:
|
|
67
|
-
4:
|
|
64
|
+
1: '一',
|
|
65
|
+
2: '二',
|
|
66
|
+
3: '三',
|
|
67
|
+
4: '四'
|
|
68
68
|
};
|
|
69
69
|
};
|
|
70
70
|
|
|
@@ -91,7 +91,7 @@ function _default(props) {
|
|
|
91
91
|
_useState4 = _slicedToArray(_useState3, 1),
|
|
92
92
|
user = _useState4[0];
|
|
93
93
|
|
|
94
|
-
var _useState5 = (0, _react.useState)(((_getBSGlobal = (0, _bsGlobal.getBSGlobal)(
|
|
94
|
+
var _useState5 = (0, _react.useState)(((_getBSGlobal = (0, _bsGlobal.getBSGlobal)('OkrAdvancedSetting')) === null || _getBSGlobal === void 0 ? void 0 : (_getBSGlobal$KRSettin = _getBSGlobal.KRSetting) === null || _getBSGlobal$KRSettin === void 0 ? void 0 : _getBSGlobal$KRSettin.OKrWeight) || false),
|
|
95
95
|
_useState6 = _slicedToArray(_useState5, 1),
|
|
96
96
|
OKrWeightSetting = _useState6[0];
|
|
97
97
|
|
|
@@ -151,11 +151,11 @@ function _default(props) {
|
|
|
151
151
|
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
152
152
|
className: (0, _classnames["default"])("".concat(_precls["default"], "__o-child-node-title")),
|
|
153
153
|
onClick: function onClick() {
|
|
154
|
-
_drawerManager["default"].open(
|
|
154
|
+
_drawerManager["default"].open('okrDetail', {
|
|
155
155
|
okrId: data.workId
|
|
156
156
|
});
|
|
157
157
|
}
|
|
158
|
-
}, title), /*#__PURE__*/_react["default"].createElement(_oClassify["default"], {
|
|
158
|
+
}, (0, _openData.parseString)(title)), /*#__PURE__*/_react["default"].createElement(_oClassify["default"], {
|
|
159
159
|
editable: false,
|
|
160
160
|
okrClassify: data.okrClassify,
|
|
161
161
|
okrId: data.workId
|
|
@@ -196,7 +196,7 @@ function _default(props) {
|
|
|
196
196
|
percent: data.progress,
|
|
197
197
|
width: 40,
|
|
198
198
|
backgroundColor: "#F7F8FA"
|
|
199
|
-
}, _defineProperty(_React$createElement, "width", 40), _defineProperty(_React$createElement, "textColor", data.status === 2 ?
|
|
199
|
+
}, _defineProperty(_React$createElement, "width", 40), _defineProperty(_React$createElement, "textColor", data.status === 2 ? '#89919f' : _utils.OkrRiskMapping[data.manualRiskLevel].textColor), _defineProperty(_React$createElement, "color", data.status === 2 ? 'linear-gradient(270deg, #BFC7D5, #E1E5EC)' : _utils.OkrRiskMapping[data.manualRiskLevel].line), _React$createElement))))), /*#__PURE__*/_react["default"].createElement(_editChildOkrWeight["default"], {
|
|
200
200
|
okrId: okrInfo.workId,
|
|
201
201
|
visible: editVisible,
|
|
202
202
|
onCancel: function onCancel() {
|
|
@@ -39,6 +39,8 @@ var _utils = require("../../../../../progress/utils");
|
|
|
39
39
|
|
|
40
40
|
var _getLocale = require("../../../../../../utils/getLocale");
|
|
41
41
|
|
|
42
|
+
var _openData = require("../../../../../../utils/open-data");
|
|
43
|
+
|
|
42
44
|
require("./index.css");
|
|
43
45
|
|
|
44
46
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -65,10 +67,10 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
65
67
|
|
|
66
68
|
var getSeasonTectMap = function getSeasonTectMap() {
|
|
67
69
|
return {
|
|
68
|
-
1:
|
|
69
|
-
2:
|
|
70
|
-
3:
|
|
71
|
-
4:
|
|
70
|
+
1: '一',
|
|
71
|
+
2: '二',
|
|
72
|
+
3: '三',
|
|
73
|
+
4: '四'
|
|
72
74
|
};
|
|
73
75
|
};
|
|
74
76
|
|
|
@@ -130,7 +132,7 @@ function _default(props) {
|
|
|
130
132
|
while (1) {
|
|
131
133
|
switch (_context.prev = _context.next) {
|
|
132
134
|
case 0:
|
|
133
|
-
if (!(name ==
|
|
135
|
+
if (!(name == 'modifyParent')) {
|
|
134
136
|
_context.next = 4;
|
|
135
137
|
break;
|
|
136
138
|
}
|
|
@@ -140,7 +142,7 @@ function _default(props) {
|
|
|
140
142
|
break;
|
|
141
143
|
|
|
142
144
|
case 4:
|
|
143
|
-
if (!(name ==
|
|
145
|
+
if (!(name == 'cancelParent')) {
|
|
144
146
|
_context.next = 9;
|
|
145
147
|
break;
|
|
146
148
|
}
|
|
@@ -149,7 +151,7 @@ function _default(props) {
|
|
|
149
151
|
return (0, _requestApis.cancelParentOkr)(okrInfo.workId);
|
|
150
152
|
|
|
151
153
|
case 7:
|
|
152
|
-
_toast["default"].Success((0, _getLocale.getLocale)(
|
|
154
|
+
_toast["default"].Success((0, _getLocale.getLocale)('Mod_Successfuloperat'));
|
|
153
155
|
|
|
154
156
|
removeParent();
|
|
155
157
|
|
|
@@ -179,11 +181,11 @@ function _default(props) {
|
|
|
179
181
|
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
180
182
|
className: (0, _classnames["default"])("".concat(_precls["default"], "__o-parent-node-title")),
|
|
181
183
|
onClick: function onClick() {
|
|
182
|
-
_drawerManager["default"].open(
|
|
184
|
+
_drawerManager["default"].open('okrDetail', {
|
|
183
185
|
okrId: data.workId
|
|
184
186
|
});
|
|
185
187
|
}
|
|
186
|
-
}, title), /*#__PURE__*/_react["default"].createElement(_oClassify["default"], {
|
|
188
|
+
}, (0, _openData.parseString)(title)), /*#__PURE__*/_react["default"].createElement(_oClassify["default"], {
|
|
187
189
|
editable: false,
|
|
188
190
|
okrClassify: data.okrClassify,
|
|
189
191
|
okrId: data.workId
|
|
@@ -216,8 +218,8 @@ function _default(props) {
|
|
|
216
218
|
percent: data.progress,
|
|
217
219
|
backgroundColor: "#F7F8FA",
|
|
218
220
|
width: 40,
|
|
219
|
-
textColor: data.status === 2 ?
|
|
220
|
-
color: data.status === 2 ?
|
|
221
|
+
textColor: data.status === 2 ? '#89919f' : _utils.OkrRiskMapping[data.manualRiskLevel].textColor,
|
|
222
|
+
color: data.status === 2 ? 'linear-gradient(270deg, #BFC7D5, #E1E5EC)' : _utils.OkrRiskMapping[data.manualRiskLevel].line
|
|
221
223
|
})), canEditOkr && /*#__PURE__*/_react["default"].createElement("div", {
|
|
222
224
|
className: (0, _classnames["default"])("".concat(_precls["default"], "__o-parent-node-actions"))
|
|
223
225
|
}, /*#__PURE__*/_react["default"].createElement(_dropSelector["default"], {
|
|
@@ -229,8 +231,8 @@ function _default(props) {
|
|
|
229
231
|
}, /*#__PURE__*/_react["default"].createElement(_dropSelector.IconItem, {
|
|
230
232
|
icon: "tu-icon-bianji3",
|
|
231
233
|
name: "modifyParent"
|
|
232
|
-
}, /*#__PURE__*/_react["default"].createElement("span", null, (0, _getLocale.getLocale)(
|
|
234
|
+
}, /*#__PURE__*/_react["default"].createElement("span", null, (0, _getLocale.getLocale)('OKR_MyO_Butt_ModifyAlig'))), /*#__PURE__*/_react["default"].createElement(_dropSelector.IconItem, {
|
|
233
235
|
icon: "tu-icon-liebiao-duiqinubiao",
|
|
234
236
|
name: "cancelParent"
|
|
235
|
-
}, /*#__PURE__*/_react["default"].createElement("span", null, (0, _getLocale.getLocale)(
|
|
237
|
+
}, /*#__PURE__*/_react["default"].createElement("span", null, (0, _getLocale.getLocale)('OKR_MyO_Butt_CancelAlig'))))))));
|
|
236
238
|
}
|
|
@@ -35,6 +35,8 @@ var _drawerManager = _interopRequireDefault(require("../../drawer-manager"));
|
|
|
35
35
|
|
|
36
36
|
var _getLocale = require("../../../utils/getLocale");
|
|
37
37
|
|
|
38
|
+
var _openData = require("../../../utils/open-data");
|
|
39
|
+
|
|
38
40
|
require("./index.css");
|
|
39
41
|
|
|
40
42
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -397,7 +399,7 @@ function OkrDetailHeader(_ref) {
|
|
|
397
399
|
name: detailInfo.workName,
|
|
398
400
|
principalUser: detailInfo.principalUser
|
|
399
401
|
}),
|
|
400
|
-
content: parent
|
|
402
|
+
content: parent && /*#__PURE__*/_react["default"].createElement("span", {
|
|
401
403
|
className: "okr-detail-head-parent"
|
|
402
404
|
}, /*#__PURE__*/_react["default"].createElement("i", {
|
|
403
405
|
className: "tu-icon-liebiao-duiqinubiao"
|
|
@@ -409,14 +411,16 @@ function OkrDetailHeader(_ref) {
|
|
|
409
411
|
krId: parent.id
|
|
410
412
|
});
|
|
411
413
|
}
|
|
412
|
-
}, /*#__PURE__*/_react["default"].createElement("span", null, parent.type === 'okr' ? 'O ' : 'KR '), parent.name))
|
|
413
|
-
onlyShowContent: approveStatusColor ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
414
|
+
}, /*#__PURE__*/_react["default"].createElement("span", null, parent.type === 'okr' ? 'O ' : 'KR '), (0, _openData.parseString)(parent.name))),
|
|
415
|
+
onlyShowContent: /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, approveStatusColor ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
414
416
|
className: "okr-detail-header-status",
|
|
415
417
|
style: {
|
|
416
418
|
color: approveStatusColor.color,
|
|
417
419
|
backgroundColor: approveStatusColor.bgColor
|
|
418
420
|
}
|
|
419
|
-
}, (0, _constant.getApproveStatusTextMap)(okrInfo.applyState)) : null
|
|
421
|
+
}, (0, _constant.getApproveStatusTextMap)(okrInfo.applyState)) : null, Number(detailInfo.status) === 2 && /*#__PURE__*/_react["default"].createElement("span", {
|
|
422
|
+
className: "okr-drawer-header__over-tag"
|
|
423
|
+
}, (0, _getLocale.getLocale)('OKR_MyO_Butt_Hasended')))
|
|
420
424
|
}), /*#__PURE__*/_react["default"].createElement(_okrShare["default"], {
|
|
421
425
|
visible: shareVisible,
|
|
422
426
|
onClose: closeShareModal,
|
|
@@ -84,12 +84,12 @@ function Elist(props, ref) {
|
|
|
84
84
|
krList = _useState2[0],
|
|
85
85
|
setKrList = _useState2[1];
|
|
86
86
|
|
|
87
|
-
var _useState3 = (0, _react.useState)(hasCondition ? JSON.parse(localStorage.getItem("okrDrawerECheckedStatus".concat(loginUser))) : []),
|
|
87
|
+
var _useState3 = (0, _react.useState)(hasCondition ? JSON.parse(localStorage.getItem("okrDrawerECheckedStatus".concat(loginUser)) || '[]') : []),
|
|
88
88
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
89
89
|
checkedStatus = _useState4[0],
|
|
90
90
|
setCheckedStatus = _useState4[1];
|
|
91
91
|
|
|
92
|
-
var _useState5 = (0, _react.useState)(hasCondition ? JSON.parse(localStorage.getItem("okrDrawerESelectUsers".concat(loginUser))) : []),
|
|
92
|
+
var _useState5 = (0, _react.useState)(hasCondition ? JSON.parse(localStorage.getItem("okrDrawerESelectUsers".concat(loginUser)) || '[]') : []),
|
|
93
93
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
94
94
|
selectUsers = _useState6[0],
|
|
95
95
|
setSelectUsers = _useState6[1];
|
|
@@ -63,3 +63,20 @@
|
|
|
63
63
|
color: #2879ff;
|
|
64
64
|
margin-left: 10px;
|
|
65
65
|
}
|
|
66
|
+
|
|
67
|
+
.okr-list-create-kr__input .tita-rich-editor {
|
|
68
|
+
height: 36px;
|
|
69
|
+
border: 1px solid #2879ff;
|
|
70
|
+
border-radius: 8px;
|
|
71
|
+
box-shadow: 0px 0px 6px 0px rgba(40, 121, 255, 0.3) inset;
|
|
72
|
+
transition: all 0.3s ease;
|
|
73
|
+
box-sizing: border-box;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.okr-list-create-kr__input .tita-rich-editor .ProseMirror {
|
|
77
|
+
width: calc(100% - 76px);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.okr-list-create-kr__input .tita-rich-editor .ProseMirror p {
|
|
81
|
+
font-size: 14px;
|
|
82
|
+
}
|
|
@@ -9,18 +9,18 @@ exports["default"] = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
12
|
-
var _titaUi = require("tita-ui");
|
|
13
|
-
|
|
14
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
13
|
|
|
14
|
+
var _richEditor = require("@titaui/rich-editor");
|
|
15
|
+
|
|
16
|
+
var _titaUi = require("tita-ui");
|
|
17
|
+
|
|
16
18
|
var _userSelector = _interopRequireDefault(require("../../../user-selector"));
|
|
17
19
|
|
|
18
20
|
var _confidence = _interopRequireDefault(require("../../../confidence"));
|
|
19
21
|
|
|
20
22
|
var _bsGlobal = require("../../../../utils/bs-global");
|
|
21
23
|
|
|
22
|
-
var _dom = require("./dom");
|
|
23
|
-
|
|
24
24
|
var _requestApis = require("../../request-apis");
|
|
25
25
|
|
|
26
26
|
var _getLocale = require("../../../../utils/getLocale");
|
|
@@ -51,7 +51,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
51
51
|
|
|
52
52
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
53
53
|
|
|
54
|
-
var preCls =
|
|
54
|
+
var preCls = 'okr-list-create-kr';
|
|
55
55
|
|
|
56
56
|
function CreateKr(_ref) {
|
|
57
57
|
var startDate = _ref.startDate,
|
|
@@ -62,17 +62,22 @@ function CreateKr(_ref) {
|
|
|
62
62
|
onHide = _ref.onHide;
|
|
63
63
|
var dataRef = (0, _react.useRef)();
|
|
64
64
|
|
|
65
|
-
var _useState = (0, _react.useState)(
|
|
65
|
+
var _useState = (0, _react.useState)({
|
|
66
|
+
pureText: '',
|
|
67
|
+
pureTextExcludeAt: '',
|
|
68
|
+
mentionUsers: [],
|
|
69
|
+
richText: undefined
|
|
70
|
+
}),
|
|
66
71
|
_useState2 = _slicedToArray(_useState, 2),
|
|
67
|
-
|
|
68
|
-
|
|
72
|
+
krNameData = _useState2[0],
|
|
73
|
+
setKrNameData = _useState2[1];
|
|
69
74
|
|
|
70
75
|
var _useState3 = (0, _react.useState)(false),
|
|
71
76
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
72
77
|
showTip = _useState4[0],
|
|
73
78
|
setShowTip = _useState4[1];
|
|
74
79
|
|
|
75
|
-
var tipsEnable = localStorage.getItem("list_create_kr_tips_".concat((0, _bsGlobal.getUserInfo)().Id)) !=
|
|
80
|
+
var tipsEnable = localStorage.getItem("list_create_kr_tips_".concat((0, _bsGlobal.getUserInfo)().Id)) != 'false';
|
|
76
81
|
|
|
77
82
|
var _useState5 = (0, _react.useState)(5),
|
|
78
83
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
@@ -97,11 +102,14 @@ function CreateKr(_ref) {
|
|
|
97
102
|
}),
|
|
98
103
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
99
104
|
user = _useState8[0],
|
|
100
|
-
setUser = _useState8[1];
|
|
105
|
+
setUser = _useState8[1]; // const inputRef =
|
|
106
|
+
// useRef<HTMLInputElement>() as React.RefObject<HTMLInputElement>
|
|
107
|
+
|
|
101
108
|
|
|
102
|
-
var
|
|
109
|
+
var mentionInputRef = (0, _react.useRef)();
|
|
110
|
+
var pendingRef = (0, _react.useRef)(false);
|
|
103
111
|
dataRef.current = _objectSpread(_objectSpread({}, dataRef.current), {}, {
|
|
104
|
-
|
|
112
|
+
krNameData: krNameData,
|
|
105
113
|
user: user,
|
|
106
114
|
startDate: startDate,
|
|
107
115
|
endDate: endDate,
|
|
@@ -110,23 +118,34 @@ function CreateKr(_ref) {
|
|
|
110
118
|
getWrapperRef: getWrapperRef,
|
|
111
119
|
onHide: onHide
|
|
112
120
|
});
|
|
113
|
-
var
|
|
121
|
+
var createKr = (0, _react.useCallback)(function () {
|
|
114
122
|
// 选中了选人组件中的item
|
|
115
|
-
if (
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
123
|
+
// if (hasAncestorElement(e.target, 'titaui-popup')) return
|
|
124
|
+
// if (
|
|
125
|
+
// dataRef.current.getWrapperRef().current &&
|
|
126
|
+
// dataRef.current.getWrapperRef().current.contains(e.target as Node)
|
|
127
|
+
// ) {
|
|
128
|
+
// return
|
|
129
|
+
// }
|
|
130
|
+
var _dataRef$current$krNa = dataRef.current.krNameData,
|
|
131
|
+
mentionUsers = _dataRef$current$krNa.mentionUsers,
|
|
132
|
+
pureText = _dataRef$current$krNa.pureText,
|
|
133
|
+
richText = _dataRef$current$krNa.richText;
|
|
134
|
+
|
|
135
|
+
if (pureText.trim()) {
|
|
122
136
|
(0, _requestApis.createNewKr)({
|
|
123
137
|
PrincipalId: dataRef.current.user.id,
|
|
124
|
-
mileStoneName:
|
|
138
|
+
mileStoneName: pureText,
|
|
139
|
+
mileStoneNameRichText: richText,
|
|
140
|
+
aiteUsers: mentionUsers === null || mentionUsers === void 0 ? void 0 : mentionUsers.map(function (user) {
|
|
141
|
+
return user.mentionId;
|
|
142
|
+
}),
|
|
125
143
|
startDate: dataRef.current.startDate,
|
|
126
144
|
endDate: dataRef.current.endDate,
|
|
127
145
|
workId: dataRef.current.workId,
|
|
128
146
|
confidenceIndex: confidenceIndex
|
|
129
147
|
}).then(function (res) {
|
|
148
|
+
setShowTip(false);
|
|
130
149
|
dataRef.current.addKr(res);
|
|
131
150
|
dataRef.current.onHide();
|
|
132
151
|
});
|
|
@@ -137,26 +156,35 @@ function CreateKr(_ref) {
|
|
|
137
156
|
|
|
138
157
|
var focus = function focus() {
|
|
139
158
|
setTimeout(function () {
|
|
140
|
-
|
|
159
|
+
var _mentionInputRef$curr, _mentionInputRef$curr2;
|
|
160
|
+
|
|
161
|
+
(_mentionInputRef$curr = mentionInputRef.current) === null || _mentionInputRef$curr === void 0 ? void 0 : (_mentionInputRef$curr2 = _mentionInputRef$curr.methods()) === null || _mentionInputRef$curr2 === void 0 ? void 0 : _mentionInputRef$curr2.focus();
|
|
141
162
|
}, 0);
|
|
142
|
-
};
|
|
163
|
+
}; // useEffect(() => {
|
|
164
|
+
// document.addEventListener('click', create, false)
|
|
165
|
+
// return () => document.removeEventListener('click', create)
|
|
166
|
+
// }, [])
|
|
167
|
+
|
|
143
168
|
|
|
144
|
-
(0, _react.useEffect)(function () {
|
|
145
|
-
document.addEventListener("click", create, false);
|
|
146
|
-
return function () {
|
|
147
|
-
return document.removeEventListener("click", create);
|
|
148
|
-
};
|
|
149
|
-
}, []);
|
|
150
169
|
(0, _react.useEffect)(function () {
|
|
151
170
|
focus();
|
|
152
171
|
}, []);
|
|
153
172
|
|
|
154
173
|
var onInputKeyDown = function onInputKeyDown(e) {
|
|
155
|
-
if (e.key.toLocaleLowerCase() ==
|
|
156
|
-
|
|
174
|
+
if (e.key.toLocaleLowerCase() == 'enter' && !pendingRef.current) {
|
|
175
|
+
pendingRef.current = true;
|
|
176
|
+
var mentionUsers = krNameData.mentionUsers,
|
|
177
|
+
pureText = krNameData.pureText,
|
|
178
|
+
richText = krNameData.richText;
|
|
179
|
+
|
|
180
|
+
if (pureText.trim()) {
|
|
157
181
|
(0, _requestApis.createNewKr)({
|
|
158
182
|
PrincipalId: user.id,
|
|
159
|
-
mileStoneName:
|
|
183
|
+
mileStoneName: pureText,
|
|
184
|
+
mileStoneNameRichText: richText,
|
|
185
|
+
aiteUsers: mentionUsers === null || mentionUsers === void 0 ? void 0 : mentionUsers.map(function (user) {
|
|
186
|
+
return user.mentionId;
|
|
187
|
+
}),
|
|
160
188
|
startDate: startDate,
|
|
161
189
|
endDate: endDate,
|
|
162
190
|
workId: workId,
|
|
@@ -164,19 +192,15 @@ function CreateKr(_ref) {
|
|
|
164
192
|
}).then(function (res) {
|
|
165
193
|
addKr(res);
|
|
166
194
|
onHide();
|
|
195
|
+
pendingRef.current = false;
|
|
167
196
|
});
|
|
168
197
|
} else {
|
|
169
198
|
onHide();
|
|
199
|
+
pendingRef.current = false;
|
|
170
200
|
}
|
|
171
201
|
}
|
|
172
202
|
};
|
|
173
203
|
|
|
174
|
-
var onBlur = function onBlur() {
|
|
175
|
-
setTimeout(function () {
|
|
176
|
-
setShowTip(false);
|
|
177
|
-
}, 200);
|
|
178
|
-
};
|
|
179
|
-
|
|
180
204
|
var onFocus = function onFocus() {
|
|
181
205
|
tipsEnable && !dataRef.current.hideTips && setShowTip(true);
|
|
182
206
|
};
|
|
@@ -193,7 +217,7 @@ function CreateKr(_ref) {
|
|
|
193
217
|
|
|
194
218
|
var onNoMoreShow = function onNoMoreShow() {
|
|
195
219
|
setShowTip(false);
|
|
196
|
-
localStorage.setItem("list_create_kr_tips_".concat((0, _bsGlobal.getUserInfo)().Id),
|
|
220
|
+
localStorage.setItem("list_create_kr_tips_".concat((0, _bsGlobal.getUserInfo)().Id), 'false');
|
|
197
221
|
};
|
|
198
222
|
|
|
199
223
|
var onUserSubmit = function onUserSubmit(_ref2) {
|
|
@@ -216,33 +240,31 @@ function CreateKr(_ref) {
|
|
|
216
240
|
className: preCls
|
|
217
241
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
218
242
|
className: (0, _classnames["default"])("".concat(preCls, "__input"))
|
|
219
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
onChange: function onChange(e) {
|
|
224
|
-
return setKrName(e.target.value);
|
|
225
|
-
},
|
|
243
|
+
}, /*#__PURE__*/_react["default"].createElement(_richEditor.TitaInlineRichEditor, {
|
|
244
|
+
initialState: undefined,
|
|
245
|
+
onDocChange: setKrNameData,
|
|
246
|
+
onBlur: createKr,
|
|
226
247
|
onFocus: onFocus,
|
|
227
|
-
|
|
228
|
-
|
|
248
|
+
onKeyDown: onInputKeyDown,
|
|
249
|
+
placeholder: (0, _getLocale.getLocale)('OKR_MyO_Text_Createkeyr'),
|
|
250
|
+
ref: mentionInputRef
|
|
229
251
|
}), /*#__PURE__*/_react["default"].createElement("p", {
|
|
230
252
|
style: {
|
|
231
|
-
display: showTip ?
|
|
253
|
+
display: showTip ? 'block' : 'none',
|
|
232
254
|
zIndex: 1
|
|
233
255
|
},
|
|
234
256
|
onClick: stopPropagation
|
|
235
|
-
}, (0, _getLocale.getLocale)(
|
|
257
|
+
}, (0, _getLocale.getLocale)('OKR_MyO_Text_Recommendation'), /*#__PURE__*/_react["default"].createElement("br", null), /*#__PURE__*/_react["default"].createElement("p", null, (0, _getLocale.getLocale)('OKR_MyO_Text_ExampleC')), /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("a", {
|
|
236
258
|
onClick: onNextTalk
|
|
237
|
-
}, (0, _getLocale.getLocale)(
|
|
259
|
+
}, (0, _getLocale.getLocale)('OKR_MyO_Butt_Nexttime')), /*#__PURE__*/_react["default"].createElement("a", {
|
|
238
260
|
onClick: onNoMoreShow
|
|
239
|
-
}, (0, _getLocale.getLocale)(
|
|
261
|
+
}, (0, _getLocale.getLocale)('OKR_MyO_Butt_Nomor')))), /*#__PURE__*/_react["default"].createElement("span", {
|
|
240
262
|
className: (0, _classnames["default"])("".concat(preCls, "__heart"))
|
|
241
263
|
}, /*#__PURE__*/_react["default"].createElement(_titaUi.Tooltip, {
|
|
242
264
|
content: "\u4FEE\u65391"
|
|
243
265
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
244
266
|
style: {
|
|
245
|
-
display:
|
|
267
|
+
display: 'inline-flex'
|
|
246
268
|
}
|
|
247
269
|
}, /*#__PURE__*/_react["default"].createElement(_confidence["default"], {
|
|
248
270
|
editable: true,
|