@titaui/pc 1.9.12 → 1.9.13
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/change-okr-modal/constant.js +1 -1
- package/lib/components/create-okr-modal/createCycle.js +1 -1
- package/lib/components/dialog/index.css +0 -1
- package/lib/components/dynamic/constant.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-assessment/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-progress/index.js +2 -2
- package/lib/components/form/form-fields/password/index.css +2 -2
- package/lib/components/grid-layout/words-cloud/index.js +1 -5
- package/lib/components/okr-detail/components/header/index.css +4 -0
- package/lib/components/okr-detail/components/header/index.js +4 -2
- package/lib/components/okr-detail/components/header/o-score.js +159 -0
- package/lib/components/okr-detail/request-apis.js +11 -2
- package/lib/components/okr-progress-modal/index.js +4 -4
- package/lib/pages/like-ranking/filter-buttons/timer.js +1 -1
- package/lib/pages/personal-info/components/base-info/index.css +2 -5
- package/lib/pages/personal-info/components/base-info/index.js +1 -2
- package/lib/pages/personal-info/components/edit-base-info/index.js +5 -23
- package/lib/utils/format-time.js +7 -7
- package/package.json +1 -1
- package/src/components/change-okr-modal/constant.ts +1 -2
- package/src/components/create-okr-modal/createCycle.tsx +1 -1
- package/src/components/dialog/index.scss +0 -1
- package/src/components/dynamic/constant.ts +1 -1
- package/src/components/dynamic/dynamic-item/dynamic-assessment/index.tsx +1 -1
- package/src/components/dynamic/dynamic-item/dynamic-progress/index.tsx +2 -2
- package/src/components/form/form-fields/input/index.tsx +1 -1
- package/src/components/form/form-fields/password/index.scss +2 -2
- package/src/components/form/form-fields/textarea/index.tsx +2 -1
- package/src/components/grid-layout/words-cloud/index.tsx +1 -3
- package/src/components/okr-detail/components/header/index.js +3 -2
- package/src/components/okr-detail/components/header/index.scss +5 -0
- package/src/components/okr-detail/components/header/o-score.tsx +111 -0
- package/src/components/okr-detail/request-apis.ts +7 -0
- package/src/components/okr-progress-modal/index.tsx +4 -3
- package/src/pages/like-ranking/filter-buttons/timer.tsx +1 -1
- package/src/pages/personal-info/components/base-info/index.scss +2 -4
- package/src/pages/personal-info/components/base-info/index.tsx +1 -1
- package/src/pages/personal-info/components/edit-base-info/index.tsx +3 -9
- package/src/utils/format-time.ts +7 -7
|
@@ -100,7 +100,7 @@ var getBimonthlyMonthKeyValue = function getBimonthlyMonthKeyValue(startMonth) {
|
|
|
100
100
|
var datas = [];
|
|
101
101
|
var monthLang = getMonth();
|
|
102
102
|
|
|
103
|
-
if (!
|
|
103
|
+
if (!i18nInfo || i18nInfo.I18NOpen && i18nInfo.I18NUserLang === "zh_CN") {
|
|
104
104
|
datas.push({
|
|
105
105
|
title: "".concat(start, " - ").concat(getNextMonth(start), "\u6708"),
|
|
106
106
|
value: ["4,".concat(start)]
|
|
@@ -77,7 +77,7 @@ var ObjectType = {
|
|
|
77
77
|
4: (0, _getLocale.getLocale)('Menu_Title_Projects'),
|
|
78
78
|
5: (0, _getLocale.getLocale)('Mod_sPerformanceForm'),
|
|
79
79
|
6: (0, _getLocale.getLocale)('Mod_sPerformanceGoals'),
|
|
80
|
-
7: (0, _getLocale.getLocale)('
|
|
80
|
+
7: (0, _getLocale.getLocale)('Mod_stask'),
|
|
81
81
|
8: (0, _getLocale.getLocale)('Mod_sDailySummary'),
|
|
82
82
|
10: (0, _getLocale.getLocale)('Feed_sFeed'),
|
|
83
83
|
11: (0, _getLocale.getLocale)('Pro_page_Plan'),
|
|
@@ -57,7 +57,7 @@ var DynamicShare = function DynamicShare(_ref) {
|
|
|
57
57
|
var renderDesc = (0, _react.useMemo)(function () {
|
|
58
58
|
return /*#__PURE__*/_react["default"].createElement(_react.Fragment, null, /*#__PURE__*/_react["default"].createElement("span", {
|
|
59
59
|
className: prefix + "__operate-desc"
|
|
60
|
-
}, (0, _getLocale.getLocale)('
|
|
60
|
+
}, (0, _getLocale.getLocale)('Mod_skeyprogress')), /*#__PURE__*/_react["default"].createElement("span", {
|
|
61
61
|
className: prefix + "-desc-operate-type",
|
|
62
62
|
style: {
|
|
63
63
|
background: feedTypeColor
|
|
@@ -152,11 +152,11 @@ var DynamicProgress = function DynamicProgress(_ref) {
|
|
|
152
152
|
}, /*#__PURE__*/_react["default"].createElement(_searchKeyHandle["default"], {
|
|
153
153
|
str: relationParentName,
|
|
154
154
|
keyWord: searchKeyWord
|
|
155
|
-
})), (0, _getLocale.getLocale)('
|
|
155
|
+
})), (0, _getLocale.getLocale)('Mod_skeyresspross'));
|
|
156
156
|
}
|
|
157
157
|
|
|
158
158
|
if (obj && obj.objType === _constant.EObjType.O) {
|
|
159
|
-
dom = "".concat((0, _getLocale.getLocale)('Mod_Updated')).concat((0, _getLocale.getLocale)('
|
|
159
|
+
dom = "".concat((0, _getLocale.getLocale)('Mod_Updated')).concat((0, _getLocale.getLocale)('Mod_skeyprogress'));
|
|
160
160
|
}
|
|
161
161
|
|
|
162
162
|
if (obj && obj.objType === _constant.EObjType.Task) {
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
.form-field-input__input {
|
|
56
56
|
display: inline-block;
|
|
57
57
|
padding: 0;
|
|
58
|
-
width: calc(100% -
|
|
58
|
+
width: calc(100% - 12px);
|
|
59
59
|
font-size: 14px;
|
|
60
60
|
font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica, sans-serif, PingFang SC, Microsoft YaHei;
|
|
61
61
|
font-weight: 400;
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
|
|
88
88
|
.form-field-input__hide-icon {
|
|
89
89
|
position: absolute;
|
|
90
|
-
right:
|
|
90
|
+
right: 3px;
|
|
91
91
|
top: 10px;
|
|
92
92
|
width: 16px;
|
|
93
93
|
height: 16px;
|
|
@@ -19,8 +19,6 @@ var _could = _interopRequireDefault(require("../image/could"));
|
|
|
19
19
|
|
|
20
20
|
var _getLocale = require("../../../utils/getLocale");
|
|
21
21
|
|
|
22
|
-
var _bsGlobal = require("../../../utils/bs-global");
|
|
23
|
-
|
|
24
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
25
23
|
|
|
26
24
|
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); }
|
|
@@ -44,8 +42,6 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
44
42
|
var ComponentId = 'Enterprise-Focus-Hotspots';
|
|
45
43
|
|
|
46
44
|
function WordCloudComponent() {
|
|
47
|
-
var versionInfo = (0, _bsGlobal.getBSGlobal)("tenantAuthentication");
|
|
48
|
-
|
|
49
45
|
var _useState = (0, _react.useState)([]),
|
|
50
46
|
_useState2 = _slicedToArray(_useState, 2),
|
|
51
47
|
wordsData = _useState2[0],
|
|
@@ -85,7 +81,7 @@ function WordCloudComponent() {
|
|
|
85
81
|
content: (0, _getLocale.getLocale)('HP_Hotcompanies'),
|
|
86
82
|
iconUrl: require("../image/Collaboration.png"),
|
|
87
83
|
tips: (0, _getLocale.getLocale)('HP_Theenterprise')
|
|
88
|
-
},
|
|
84
|
+
}, wordsData.length === 0 && /*#__PURE__*/_react["default"].createElement(_commenComponents.Advice, {
|
|
89
85
|
styles: {
|
|
90
86
|
"float": 'right'
|
|
91
87
|
},
|
|
@@ -25,7 +25,7 @@ var _oCycle = _interopRequireDefault(require("./o-cycle"));
|
|
|
25
25
|
|
|
26
26
|
var _editName = _interopRequireDefault(require("./edit-name"));
|
|
27
27
|
|
|
28
|
-
var
|
|
28
|
+
var _oScore = _interopRequireDefault(require("./o-score"));
|
|
29
29
|
|
|
30
30
|
var _progress = _interopRequireDefault(require("../../../progress"));
|
|
31
31
|
|
|
@@ -183,7 +183,9 @@ var Header = function Header(props) {
|
|
|
183
183
|
okrId: okrInfo.workId
|
|
184
184
|
})), /*#__PURE__*/_react["default"].createElement("span", {
|
|
185
185
|
className: "".concat(precls, "__action-item")
|
|
186
|
-
}, showOkrEvalute && /*#__PURE__*/_react["default"].createElement(
|
|
186
|
+
}, showOkrEvalute && /*#__PURE__*/_react["default"].createElement(_oScore["default"], {
|
|
187
|
+
editable: editable,
|
|
188
|
+
okrId: okrInfo.workId,
|
|
187
189
|
score: okrInfo.evaluateValue
|
|
188
190
|
}))), /*#__PURE__*/_react["default"].createElement(_oProgressUpdate["default"], {
|
|
189
191
|
okrInfo: okrInfo,
|
|
@@ -0,0 +1,159 @@
|
|
|
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 _context = require("../../context");
|
|
13
|
+
|
|
14
|
+
var _score = _interopRequireDefault(require("../score"));
|
|
15
|
+
|
|
16
|
+
var _toast = _interopRequireDefault(require("../../../toast"));
|
|
17
|
+
|
|
18
|
+
var _dialog = _interopRequireDefault(require("../../../dialog"));
|
|
19
|
+
|
|
20
|
+
var _form = _interopRequireDefault(require("../../../form"));
|
|
21
|
+
|
|
22
|
+
var _requestApis = require("../../request-apis");
|
|
23
|
+
|
|
24
|
+
require("./index.css");
|
|
25
|
+
|
|
26
|
+
var _excluded = ["score", "okrId"];
|
|
27
|
+
|
|
28
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
29
|
+
|
|
30
|
+
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); }
|
|
31
|
+
|
|
32
|
+
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; }
|
|
33
|
+
|
|
34
|
+
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); }
|
|
35
|
+
|
|
36
|
+
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; }
|
|
37
|
+
|
|
38
|
+
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; }
|
|
39
|
+
|
|
40
|
+
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; }
|
|
41
|
+
|
|
42
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
43
|
+
|
|
44
|
+
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."); }
|
|
45
|
+
|
|
46
|
+
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); }
|
|
47
|
+
|
|
48
|
+
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; }
|
|
49
|
+
|
|
50
|
+
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; }
|
|
51
|
+
|
|
52
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
53
|
+
|
|
54
|
+
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; }
|
|
55
|
+
|
|
56
|
+
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; }
|
|
57
|
+
|
|
58
|
+
var FormFields = _form["default"].Fields;
|
|
59
|
+
var preCls = "okr-detail-o-score";
|
|
60
|
+
|
|
61
|
+
var OScore = function OScore(props) {
|
|
62
|
+
var score = props.score,
|
|
63
|
+
okrId = props.okrId,
|
|
64
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
|
65
|
+
|
|
66
|
+
var _useState = (0, _react.useState)(false),
|
|
67
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
68
|
+
visible = _useState2[0],
|
|
69
|
+
setVisible = _useState2[1];
|
|
70
|
+
|
|
71
|
+
var _useContext = (0, _react.useContext)(_context.CommonContext),
|
|
72
|
+
refreshAll = _useContext.refreshAll;
|
|
73
|
+
|
|
74
|
+
var _useState3 = (0, _react.useState)({
|
|
75
|
+
score: score,
|
|
76
|
+
describe: ""
|
|
77
|
+
}),
|
|
78
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
79
|
+
formFiedlsValue = _useState4[0],
|
|
80
|
+
setFormFiedlsValue = _useState4[1];
|
|
81
|
+
|
|
82
|
+
var formContainerRef = (0, _react.useRef)();
|
|
83
|
+
var formRef = (0, _react.useRef)();
|
|
84
|
+
|
|
85
|
+
var changeOScore = function changeOScore() {
|
|
86
|
+
setVisible(true);
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
var handleCancel = function handleCancel() {
|
|
90
|
+
setVisible(false);
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
var handleOk = function handleOk() {
|
|
94
|
+
(0, _requestApis.updateOScore)(formFiedlsValue.score, okrId).then(function (res) {
|
|
95
|
+
if (!!res.Code) {
|
|
96
|
+
_toast["default"].Success('修改成功');
|
|
97
|
+
|
|
98
|
+
handleCancel();
|
|
99
|
+
refreshAll();
|
|
100
|
+
} else {
|
|
101
|
+
_toast["default"].Error(res.Message || '操作失败');
|
|
102
|
+
}
|
|
103
|
+
})["catch"](function (err) {
|
|
104
|
+
console.log(err);
|
|
105
|
+
|
|
106
|
+
_toast["default"].Error('操作失败');
|
|
107
|
+
});
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
var onFieldsChangeHandler = function onFieldsChangeHandler(fields) {
|
|
111
|
+
var newFields = _objectSpread({}, fields);
|
|
112
|
+
|
|
113
|
+
setFormFiedlsValue(newFields);
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
return /*#__PURE__*/_react["default"].createElement(_react.Fragment, null, /*#__PURE__*/_react["default"].createElement(_score["default"], _extends({
|
|
117
|
+
score: score,
|
|
118
|
+
onClick: changeOScore
|
|
119
|
+
}, restProps)), /*#__PURE__*/_react["default"].createElement(_dialog["default"], {
|
|
120
|
+
title: "O \u8BC4\u5206",
|
|
121
|
+
visible: visible,
|
|
122
|
+
animation: "slide-fade",
|
|
123
|
+
maskAnimation: "fade",
|
|
124
|
+
destroyOnClose: true,
|
|
125
|
+
width: 538,
|
|
126
|
+
onClose: handleCancel,
|
|
127
|
+
onOk: handleOk,
|
|
128
|
+
onCancel: handleCancel,
|
|
129
|
+
noHeadLine: true,
|
|
130
|
+
noFooterLine: true
|
|
131
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
132
|
+
ref: formContainerRef,
|
|
133
|
+
className: "".concat(preCls, "__form")
|
|
134
|
+
}, /*#__PURE__*/_react["default"].createElement(_form["default"], {
|
|
135
|
+
ref: formRef,
|
|
136
|
+
getFormContainer: function getFormContainer() {
|
|
137
|
+
return formContainerRef.current;
|
|
138
|
+
},
|
|
139
|
+
onFieldsChange: onFieldsChangeHandler
|
|
140
|
+
}, /*#__PURE__*/_react["default"].createElement(FormFields.Input, {
|
|
141
|
+
name: "score",
|
|
142
|
+
label: "\u8BC4\u5206",
|
|
143
|
+
className: "".concat(preCls, "__form-item"),
|
|
144
|
+
placeholder: "\u8BF7\u8F93\u5165\u8BC4\u5206",
|
|
145
|
+
value: formFiedlsValue.score,
|
|
146
|
+
require: true,
|
|
147
|
+
layout: "row",
|
|
148
|
+
verifies: [{
|
|
149
|
+
tip: "\u8BC4\u5206\u4E0D\u80FD\u4E3A\u7A7A",
|
|
150
|
+
test: /^[\s\S]+$/
|
|
151
|
+
}, {
|
|
152
|
+
tip: "\u8BF7\u8F93\u51650-1\u95F4\u7684\u6570\u5B57\uFF0C\u652F\u6301\u5C0F\u6570\u70B9\u540E\u4E24\u4F4D",
|
|
153
|
+
test: /^(1|0(\.\d{1,2})?)$/
|
|
154
|
+
}]
|
|
155
|
+
})))));
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
var _default = OScore;
|
|
159
|
+
exports["default"] = _default;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.workDelete = exports.updateVisibility = exports.updateTaskStatus = exports.updateTaskPrincipal = exports.updateTaskDate = exports.updateProgressDesc = exports.updateProgress = exports.updateParentId = exports.updateOkrVisibility = exports.updateOkrPrincipal = exports.updateOkrName = exports.updateOCommitType = exports.updateOClassify = exports.updateKrProgressAndStatus = exports.updateKrPrincipal = exports.updateKrName = exports.updateKrDate = exports.updateConfidenceIndex = exports.updateClassify = exports.updateChildOkrWeight = exports.transferPrincipal = exports.start = exports.setTaskPriority = exports.saveODesc = exports.remindAction = exports.krChangeOrder = exports.getRelWorks = exports.getRelProgress = exports.getProgress = exports.getPraiseComments = exports.getOrg = exports.getOkrUsers = exports.getOkrDetail = exports.getKrsByCondition = exports.getKrs = exports.getFeedById = exports.deleteUser = exports.deleteProgressDesc = exports.deleteKr = exports.createNewKr = exports.close = exports.cancelRel = exports.cancelPraise = exports.cancelParentOkr = exports.addUserRelation = exports.addUser = exports.addPraise = exports.addComment = void 0;
|
|
6
|
+
exports.workDelete = exports.updateVisibility = exports.updateTaskStatus = exports.updateTaskPrincipal = exports.updateTaskDate = exports.updateProgressDesc = exports.updateProgress = exports.updateParentId = exports.updateOkrVisibility = exports.updateOkrPrincipal = exports.updateOkrName = exports.updateOScore = exports.updateOCommitType = exports.updateOClassify = exports.updateKrProgressAndStatus = exports.updateKrPrincipal = exports.updateKrName = exports.updateKrDate = exports.updateConfidenceIndex = exports.updateClassify = exports.updateChildOkrWeight = exports.transferPrincipal = exports.start = exports.setTaskPriority = exports.saveODesc = exports.remindAction = exports.krChangeOrder = exports.getRelWorks = exports.getRelProgress = exports.getProgress = exports.getPraiseComments = exports.getOrg = exports.getOkrUsers = exports.getOkrDetail = exports.getKrsByCondition = exports.getKrs = exports.getFeedById = exports.deleteUser = exports.deleteProgressDesc = exports.deleteKr = exports.createNewKr = exports.close = exports.cancelRel = exports.cancelPraise = exports.cancelParentOkr = exports.addUserRelation = exports.addUser = exports.addPraise = exports.addComment = void 0;
|
|
7
7
|
|
|
8
8
|
var _qs = _interopRequireDefault(require("qs"));
|
|
9
9
|
|
|
@@ -542,4 +542,13 @@ var updateChildOkrWeight = function updateChildOkrWeight(data) {
|
|
|
542
542
|
});
|
|
543
543
|
};
|
|
544
544
|
|
|
545
|
-
exports.updateChildOkrWeight = updateChildOkrWeight;
|
|
545
|
+
exports.updateChildOkrWeight = updateChildOkrWeight;
|
|
546
|
+
|
|
547
|
+
var updateOScore = function updateOScore(score, workId) {
|
|
548
|
+
return (0, _request.rpost)('v2')('work/score', {
|
|
549
|
+
manualScore: score,
|
|
550
|
+
workId: workId
|
|
551
|
+
});
|
|
552
|
+
};
|
|
553
|
+
|
|
554
|
+
exports.updateOScore = updateOScore;
|
|
@@ -54,8 +54,7 @@ var ProgressModal = function ProgressModal(props) {
|
|
|
54
54
|
okrInfo = props.okrInfo,
|
|
55
55
|
onClose = props.onClose,
|
|
56
56
|
onOk = props.onOk,
|
|
57
|
-
|
|
58
|
-
title = _props$title === void 0 ? window.getLocale('OKR_MyO_Prog_Butt_Update') : _props$title,
|
|
57
|
+
title = props.title,
|
|
59
58
|
visible = props.visible,
|
|
60
59
|
isKr = props.isKr;
|
|
61
60
|
var configure = isKr ? (0, _helper.getKR_SETTING)() : (0, _helper.getO_SETTING)();
|
|
@@ -176,7 +175,7 @@ var ProgressModal = function ProgressModal(props) {
|
|
|
176
175
|
alignSelf: 'flex-start',
|
|
177
176
|
marginTop: '10px'
|
|
178
177
|
}
|
|
179
|
-
}, (0, _getLocale.getLocale)('
|
|
178
|
+
}, (0, _getLocale.getLocale)('Feed_Tab_Title_Progress')), /*#__PURE__*/_react["default"].createElement(_textarea["default"], {
|
|
180
179
|
hasError: errorRemark,
|
|
181
180
|
placeholder: (0, _getLocale.getLocale)('OKR_MyO_Pop_Upd_Pleprogress'),
|
|
182
181
|
style: {
|
|
@@ -229,7 +228,7 @@ var ProgressModal = function ProgressModal(props) {
|
|
|
229
228
|
width: 600
|
|
230
229
|
}, /*#__PURE__*/_react["default"].createElement(_style.List, null, /*#__PURE__*/_react["default"].createElement(_style.Item, null, /*#__PURE__*/_react["default"].createElement("span", {
|
|
231
230
|
className: "auto-update__item-label"
|
|
232
|
-
}, (0, _getLocale.getLocale)('
|
|
231
|
+
}, (0, _getLocale.getLocale)('OKR_MyO_Pop_Upd_Progress')), /*#__PURE__*/_react["default"].createElement("div", {
|
|
233
232
|
className: "auto-update__item-progress"
|
|
234
233
|
}, /*#__PURE__*/_react["default"].createElement(_titaUi.Input, {
|
|
235
234
|
type: "number",
|
|
@@ -292,6 +291,7 @@ var ProgressModal = function ProgressModal(props) {
|
|
|
292
291
|
};
|
|
293
292
|
|
|
294
293
|
ProgressModal.defaultProps = {
|
|
294
|
+
title: (0, _getLocale.getLocale)('OKR_MyO_Prog_Butt_Update'),
|
|
295
295
|
maxLength: 500
|
|
296
296
|
};
|
|
297
297
|
var _default = ProgressModal;
|
|
@@ -43,7 +43,7 @@ var Timer = function Timer(_ref) {
|
|
|
43
43
|
};
|
|
44
44
|
|
|
45
45
|
return /*#__PURE__*/_react["default"].createElement(_react.Fragment, null, /*#__PURE__*/_react["default"].createElement(_rangePickerPop["default"], {
|
|
46
|
-
format: "YYYY
|
|
46
|
+
format: "YYYY-MM-DD",
|
|
47
47
|
controlled: true,
|
|
48
48
|
onConfirm: onStartDateConfirmHandler,
|
|
49
49
|
defaultRange: {
|
|
@@ -72,11 +72,7 @@
|
|
|
72
72
|
|
|
73
73
|
.titaui-personal-info-base-info__form {
|
|
74
74
|
box-sizing: border-box;
|
|
75
|
-
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.titaui-personal-info-base-info__form:last-of-type {
|
|
79
|
-
margin-bottom: 0;
|
|
75
|
+
padding: 10px 0;
|
|
80
76
|
}
|
|
81
77
|
|
|
82
78
|
.titaui-personal-info-base-info__form-title {
|
|
@@ -84,6 +80,7 @@
|
|
|
84
80
|
font-weight: 600;
|
|
85
81
|
color: #141C28;
|
|
86
82
|
line-height: 22px;
|
|
83
|
+
margin-bottom: 6px;
|
|
87
84
|
}
|
|
88
85
|
|
|
89
86
|
.titaui-personal-info-base-info__form-value {
|
|
@@ -95,8 +95,7 @@ var BaseInfo = function BaseInfo() {
|
|
|
95
95
|
}), /*#__PURE__*/_react["default"].createElement(_editBaseInfo["default"], {
|
|
96
96
|
visible: visible,
|
|
97
97
|
onCancel: handleCancelEdit,
|
|
98
|
-
handleSuccessEditBaseInfo: handleSuccessEditBaseInfo
|
|
99
|
-
info: userInfo
|
|
98
|
+
handleSuccessEditBaseInfo: handleSuccessEditBaseInfo
|
|
100
99
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
101
100
|
className: "".concat(prefix, "__form")
|
|
102
101
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -48,9 +48,8 @@ var prefix = "titaui-edit-personal-info";
|
|
|
48
48
|
|
|
49
49
|
var EditBaseInfo = function EditBaseInfo(props) {
|
|
50
50
|
var visible = props.visible,
|
|
51
|
-
|
|
52
|
-
handleSuccessEditBaseInfo = props.handleSuccessEditBaseInfo
|
|
53
|
-
info = props.info;
|
|
51
|
+
onCancel = props.onCancel,
|
|
52
|
+
handleSuccessEditBaseInfo = props.handleSuccessEditBaseInfo;
|
|
54
53
|
var modalRef = (0, _react.useRef)();
|
|
55
54
|
var formContainerRef = (0, _react.useRef)();
|
|
56
55
|
var formRef = (0, _react.useRef)();
|
|
@@ -123,8 +122,7 @@ var EditBaseInfo = function EditBaseInfo(props) {
|
|
|
123
122
|
});
|
|
124
123
|
|
|
125
124
|
handleSuccessEditBaseInfo(userInfo);
|
|
126
|
-
|
|
127
|
-
_onCancel();
|
|
125
|
+
onCancel();
|
|
128
126
|
} else {
|
|
129
127
|
_toast["default"].Error(resp.Message, {
|
|
130
128
|
canClose: false
|
|
@@ -152,24 +150,8 @@ var EditBaseInfo = function EditBaseInfo(props) {
|
|
|
152
150
|
title: '基本信息设置',
|
|
153
151
|
noHeadLine: true,
|
|
154
152
|
maskClosable: false,
|
|
155
|
-
onClose:
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
setUserInfo({
|
|
159
|
-
name: info.name,
|
|
160
|
-
mobile: info.mobile,
|
|
161
|
-
email: info.email
|
|
162
|
-
});
|
|
163
|
-
},
|
|
164
|
-
onCancel: function onCancel() {
|
|
165
|
-
_onCancel();
|
|
166
|
-
|
|
167
|
-
setUserInfo({
|
|
168
|
-
name: info.name,
|
|
169
|
-
mobile: info.mobile,
|
|
170
|
-
email: info.email
|
|
171
|
-
});
|
|
172
|
-
},
|
|
153
|
+
onClose: onCancel,
|
|
154
|
+
onCancel: onCancel,
|
|
173
155
|
okText: "\u786E\u5B9A",
|
|
174
156
|
noFooterLine: true,
|
|
175
157
|
onOk: handleSaveUserInfo,
|
package/lib/utils/format-time.js
CHANGED
|
@@ -66,7 +66,7 @@ var timeFormat = function timeFormat(NowDate) {
|
|
|
66
66
|
|
|
67
67
|
var d = date.getDate(); //日
|
|
68
68
|
|
|
69
|
-
return y + "
|
|
69
|
+
return y + "-" + m + "-" + d + " 0:0:0";
|
|
70
70
|
}; // 获取当年第一天
|
|
71
71
|
|
|
72
72
|
|
|
@@ -97,7 +97,7 @@ var showWeekFirstDay = function showWeekFirstDay() {
|
|
|
97
97
|
|
|
98
98
|
var WeekFirstDay = new Date(Nowdate - (weekDay - 1) * 86400000);
|
|
99
99
|
var M = Number(WeekFirstDay.getMonth()) + 1;
|
|
100
|
-
return WeekFirstDay.getFullYear() + "
|
|
100
|
+
return WeekFirstDay.getFullYear() + "-" + M + "-" + WeekFirstDay.getDate() + " 0:0:0";
|
|
101
101
|
}; // 本周最后一天
|
|
102
102
|
|
|
103
103
|
|
|
@@ -111,7 +111,7 @@ var showWeekLastDay = function showWeekLastDay() {
|
|
|
111
111
|
|
|
112
112
|
var WeekLastDay = new Date((WeekFirstDay / 1000 + 6 * 86400) * 1000);
|
|
113
113
|
var M = Number(WeekLastDay.getMonth()) + 1;
|
|
114
|
-
return WeekLastDay.getFullYear() + "
|
|
114
|
+
return WeekLastDay.getFullYear() + "-" + M + "-" + WeekLastDay.getDate();
|
|
115
115
|
}; // 下周第一天
|
|
116
116
|
|
|
117
117
|
|
|
@@ -125,7 +125,7 @@ var showNextWeekFirstDay = function showNextWeekFirstDay() {
|
|
|
125
125
|
|
|
126
126
|
var WeekLastDay = new Date((WeekFirstDay / 1000 + 7 * 86400) * 1000);
|
|
127
127
|
var M = Number(WeekLastDay.getMonth()) + 1;
|
|
128
|
-
return WeekLastDay.getFullYear() + "
|
|
128
|
+
return WeekLastDay.getFullYear() + "-" + M + "-" + WeekLastDay.getDate() + " 0:0:0";
|
|
129
129
|
}; // 本月第一天
|
|
130
130
|
|
|
131
131
|
|
|
@@ -135,7 +135,7 @@ var showMonthFirstDay = function showMonthFirstDay() {
|
|
|
135
135
|
var Nowdate = new Date();
|
|
136
136
|
var MonthFirstDay = new Date(Nowdate.getFullYear(), Nowdate.getMonth(), 1);
|
|
137
137
|
var M = Number(MonthFirstDay.getMonth()) + 1;
|
|
138
|
-
return MonthFirstDay.getFullYear() + "
|
|
138
|
+
return MonthFirstDay.getFullYear() + "-" + M + "-" + MonthFirstDay.getDate() + " 0:0:0";
|
|
139
139
|
}; // 本月最后一天
|
|
140
140
|
|
|
141
141
|
|
|
@@ -147,7 +147,7 @@ var showMonthLastDay = function showMonthLastDay() {
|
|
|
147
147
|
|
|
148
148
|
var MonthLastDay = new Date(MonthNextFirstDay - 86400000);
|
|
149
149
|
var M = Number(MonthLastDay.getMonth()) + 1;
|
|
150
|
-
return MonthLastDay.getFullYear() + "
|
|
150
|
+
return MonthLastDay.getFullYear() + "-" + M + "-" + MonthLastDay.getDate();
|
|
151
151
|
}; // 下个月第一天
|
|
152
152
|
|
|
153
153
|
|
|
@@ -157,7 +157,7 @@ var showNextMonthFirstDay = function showNextMonthFirstDay() {
|
|
|
157
157
|
var Nowdate = new Date();
|
|
158
158
|
var MonthFirstDay = new Date(Nowdate.getFullYear(), Nowdate.getMonth() + 1, 1);
|
|
159
159
|
var M = Number(MonthFirstDay.getMonth()) + 1;
|
|
160
|
-
return MonthFirstDay.getFullYear() + "
|
|
160
|
+
return MonthFirstDay.getFullYear() + "-" + M + "-" + MonthFirstDay.getDate() + " 0:0:0";
|
|
161
161
|
};
|
|
162
162
|
|
|
163
163
|
exports.showNextMonthFirstDay = showNextMonthFirstDay;
|
package/package.json
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { getBSGlobal } from "&/utils/bs-global";
|
|
2
1
|
import { getLocale, isEn } from "../../utils/getLocale";
|
|
3
2
|
|
|
4
3
|
export const getYear = () => {
|
|
@@ -88,7 +87,7 @@ export const getBimonthlyMonthKeyValue = (startMonth) => {
|
|
|
88
87
|
value: string[];
|
|
89
88
|
}[] = [];
|
|
90
89
|
const monthLang = getMonth();
|
|
91
|
-
if (!
|
|
90
|
+
if (!i18nInfo || (i18nInfo.I18NOpen && i18nInfo.I18NUserLang === "zh_CN")) {
|
|
92
91
|
datas.push({
|
|
93
92
|
title: `${start} - ${getNextMonth(start)}月`,
|
|
94
93
|
value: [`4,${start}`],
|
|
@@ -60,7 +60,7 @@ export const ObjectType = {
|
|
|
60
60
|
4: getLocale('Menu_Title_Projects'),
|
|
61
61
|
5: getLocale('Mod_sPerformanceForm'),
|
|
62
62
|
6: getLocale('Mod_sPerformanceGoals'),
|
|
63
|
-
7: getLocale('
|
|
63
|
+
7: getLocale('Mod_stask'),
|
|
64
64
|
8: getLocale('Mod_sDailySummary'),
|
|
65
65
|
10: getLocale('Feed_sFeed'),
|
|
66
66
|
11: getLocale('Pro_page_Plan'),
|
|
@@ -28,7 +28,7 @@ const DynamicShare: FC<IDynamicItemContentProps> = ({ data, ...restProps }) => {
|
|
|
28
28
|
const renderDesc = useMemo(() => {
|
|
29
29
|
return (
|
|
30
30
|
<Fragment>
|
|
31
|
-
<span className={prefix + "__operate-desc"}>{getLocale('
|
|
31
|
+
<span className={prefix + "__operate-desc"}>{getLocale('Mod_skeyprogress')}</span>
|
|
32
32
|
<span
|
|
33
33
|
className={prefix + "-desc-operate-type"}
|
|
34
34
|
style={{ background: feedTypeColor }}
|
|
@@ -108,12 +108,12 @@ const DynamicProgress: FC<IDynamicItemContentProps> = ({
|
|
|
108
108
|
>
|
|
109
109
|
<SearchKeyHandle str={relationParentName} keyWord={searchKeyWord} />
|
|
110
110
|
</span>
|
|
111
|
-
{getLocale('
|
|
111
|
+
{getLocale('Mod_skeyresspross')}
|
|
112
112
|
</span>
|
|
113
113
|
);
|
|
114
114
|
}
|
|
115
115
|
if (obj && obj.objType === EObjType.O) {
|
|
116
|
-
dom = `${getLocale('Mod_Updated')}${getLocale('
|
|
116
|
+
dom = `${getLocale('Mod_Updated')}${getLocale('Mod_skeyprogress')}`;
|
|
117
117
|
}
|
|
118
118
|
if (obj && obj.objType === EObjType.Task) {
|
|
119
119
|
dom = `${getLocale('Mod_Updated')}${getLocale('Data_Taskprogress')}`;
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
&__input {
|
|
52
52
|
display: inline-block;
|
|
53
53
|
padding: 0;
|
|
54
|
-
width: calc(100% -
|
|
54
|
+
width: calc(100% - 12px);
|
|
55
55
|
font-size: 14px;
|
|
56
56
|
font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica,
|
|
57
57
|
sans-serif, PingFang SC, Microsoft YaHei;
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
}
|
|
81
81
|
&__hide-icon {
|
|
82
82
|
position: absolute;
|
|
83
|
-
right:
|
|
83
|
+
right: 3px;
|
|
84
84
|
top: 10px;
|
|
85
85
|
width: 16px;
|
|
86
86
|
height: 16px;
|
|
@@ -7,7 +7,6 @@ import lvMask from '../image/lv'
|
|
|
7
7
|
import couldMask from '../image/could'
|
|
8
8
|
import titaMask from '../image/tita-mask'
|
|
9
9
|
import { getLocale } from "../../../utils/getLocale";
|
|
10
|
-
import { getBSGlobal } from "../../../utils/bs-global";
|
|
11
10
|
|
|
12
11
|
const ComponentId = 'Enterprise-Focus-Hotspots'
|
|
13
12
|
|
|
@@ -15,7 +14,6 @@ const ComponentId = 'Enterprise-Focus-Hotspots'
|
|
|
15
14
|
|
|
16
15
|
export default function WordCloudComponent() {
|
|
17
16
|
|
|
18
|
-
const versionInfo = getBSGlobal("tenantAuthentication");
|
|
19
17
|
const [wordsData, setWordsData] = useState<WordsData>([])
|
|
20
18
|
|
|
21
19
|
useEffect(() => {
|
|
@@ -42,7 +40,7 @@ export default function WordCloudComponent() {
|
|
|
42
40
|
iconUrl={require('../image/Collaboration.png')}
|
|
43
41
|
tips={getLocale('HP_Theenterprise')}
|
|
44
42
|
>
|
|
45
|
-
{
|
|
43
|
+
{wordsData.length === 0 && (
|
|
46
44
|
<Advice
|
|
47
45
|
styles={{ float: 'right' }}
|
|
48
46
|
link="https://wpa1.qq.com/o6X4XD1n?_type=wpa&qidian=true"
|
|
@@ -7,7 +7,7 @@ import OAvatar from "./o-avatar";
|
|
|
7
7
|
import OType from "../okr-type";
|
|
8
8
|
import OCycle from "./o-cycle";
|
|
9
9
|
import EditNameCmp from "./edit-name";
|
|
10
|
-
import Score from "
|
|
10
|
+
import Score from "./o-score";
|
|
11
11
|
import Progress from "../../../progress";
|
|
12
12
|
import { OkrRiskMapping } from "../../../progress/utils";
|
|
13
13
|
|
|
@@ -115,6 +115,7 @@ const Header = (props) => {
|
|
|
115
115
|
</span>
|
|
116
116
|
);
|
|
117
117
|
};
|
|
118
|
+
|
|
118
119
|
return (
|
|
119
120
|
<div className={precls} draggable={false}>
|
|
120
121
|
<div className={`${precls}__avatar`}>
|
|
@@ -148,7 +149,7 @@ const Header = (props) => {
|
|
|
148
149
|
<OCycle editable={editable} okrId={okrInfo.workId} />
|
|
149
150
|
</span>
|
|
150
151
|
<span className={`${precls}__action-item`}>
|
|
151
|
-
{showOkrEvalute && <Score score={okrInfo.evaluateValue} />}
|
|
152
|
+
{showOkrEvalute && <Score editable={editable} okrId={okrInfo.workId} score={okrInfo.evaluateValue} />}
|
|
152
153
|
</span>
|
|
153
154
|
</span>
|
|
154
155
|
<OProgressUpdate okrInfo={okrInfo} renderContent={renderContent} />
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import React,{Fragment,useState,useRef,useContext} from "react";
|
|
2
|
+
import { CommonContext, GeneralDataContext } from "../../context";
|
|
3
|
+
import classNames from "classnames";
|
|
4
|
+
import Score from "../score";
|
|
5
|
+
import Toast from "../../../toast"
|
|
6
|
+
import Dialog from "../../../dialog"
|
|
7
|
+
import Form from "../../../form"
|
|
8
|
+
import { updateOScore } from "../../request-apis"
|
|
9
|
+
import { getLocale } from "../../../../utils/getLocale";
|
|
10
|
+
import './index.scss'
|
|
11
|
+
|
|
12
|
+
const FormFields = Form.Fields;
|
|
13
|
+
const preCls = "okr-detail-o-score"
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
interface IOScoreProps {
|
|
17
|
+
score:number;
|
|
18
|
+
okrId:string | number;
|
|
19
|
+
|
|
20
|
+
}
|
|
21
|
+
interface FormFields {
|
|
22
|
+
score: string | number;
|
|
23
|
+
describe: string;
|
|
24
|
+
}
|
|
25
|
+
const OScore = (props: IOScoreProps) => {
|
|
26
|
+
const { score,okrId, ...restProps } = props;
|
|
27
|
+
const [visible,setVisible] = useState(false)
|
|
28
|
+
const { refreshAll } = useContext(CommonContext)
|
|
29
|
+
const [formFiedlsValue, setFormFiedlsValue] = useState<FormFields>({
|
|
30
|
+
score: score,
|
|
31
|
+
describe : "",
|
|
32
|
+
});
|
|
33
|
+
const formContainerRef = useRef<any>();
|
|
34
|
+
const formRef = useRef<any>();
|
|
35
|
+
const changeOScore = () =>{
|
|
36
|
+
setVisible(true)
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const handleCancel = () =>{
|
|
40
|
+
setVisible(false)
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const handleOk = () =>{
|
|
44
|
+
updateOScore(formFiedlsValue.score,okrId).then(res=>{
|
|
45
|
+
if(!!res.Code){
|
|
46
|
+
Toast.Success('修改成功')
|
|
47
|
+
handleCancel()
|
|
48
|
+
refreshAll()
|
|
49
|
+
}else{
|
|
50
|
+
Toast.Error(res.Message||'操作失败')
|
|
51
|
+
}
|
|
52
|
+
}).catch(err=>{
|
|
53
|
+
console.log(err)
|
|
54
|
+
Toast.Error('操作失败')
|
|
55
|
+
})
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const onFieldsChangeHandler = (fields) => {
|
|
59
|
+
const newFields = { ...fields };
|
|
60
|
+
setFormFiedlsValue(newFields);
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
return (
|
|
64
|
+
<Fragment>
|
|
65
|
+
<Score score={score} onClick={changeOScore} {...restProps} />
|
|
66
|
+
<Dialog
|
|
67
|
+
title={`O 评分`}
|
|
68
|
+
visible={visible}
|
|
69
|
+
animation="slide-fade"
|
|
70
|
+
maskAnimation="fade"
|
|
71
|
+
destroyOnClose={true}
|
|
72
|
+
width={538}
|
|
73
|
+
onClose={handleCancel}
|
|
74
|
+
onOk={handleOk}
|
|
75
|
+
onCancel={handleCancel}
|
|
76
|
+
noHeadLine
|
|
77
|
+
noFooterLine
|
|
78
|
+
>
|
|
79
|
+
<div ref={formContainerRef} className={`${preCls}__form`}>
|
|
80
|
+
<Form
|
|
81
|
+
ref={formRef}
|
|
82
|
+
getFormContainer={() => formContainerRef.current}
|
|
83
|
+
onFieldsChange={onFieldsChangeHandler}
|
|
84
|
+
>
|
|
85
|
+
<FormFields.Input
|
|
86
|
+
name="score"
|
|
87
|
+
label={`评分`}
|
|
88
|
+
className={`${preCls}__form-item`}
|
|
89
|
+
placeholder={`请输入评分`}
|
|
90
|
+
value={formFiedlsValue.score}
|
|
91
|
+
require={true}
|
|
92
|
+
layout="row"
|
|
93
|
+
verifies={
|
|
94
|
+
[{
|
|
95
|
+
tip: `评分不能为空`,
|
|
96
|
+
test: /^[\s\S]+$/,
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
tip: `请输入0-1间的数字,支持小数点后两位`,
|
|
100
|
+
test: /^(1|0(\.\d{1,2})?)$/,
|
|
101
|
+
},
|
|
102
|
+
]
|
|
103
|
+
}
|
|
104
|
+
/>
|
|
105
|
+
</Form>
|
|
106
|
+
</div>
|
|
107
|
+
</Dialog>
|
|
108
|
+
</Fragment>
|
|
109
|
+
);
|
|
110
|
+
};
|
|
111
|
+
export default OScore;
|
|
@@ -414,3 +414,10 @@ export const updateChildOkrWeight = (data: { OkrId: number, Weight: number }[])
|
|
|
414
414
|
"transformRequest": qs.stringify,
|
|
415
415
|
})
|
|
416
416
|
}
|
|
417
|
+
|
|
418
|
+
export const updateOScore = (score,workId) => {
|
|
419
|
+
return rpost('v2')('work/score', {
|
|
420
|
+
manualScore: score,
|
|
421
|
+
workId:workId
|
|
422
|
+
})
|
|
423
|
+
}
|
|
@@ -11,7 +11,7 @@ import { getLocale } from '../../utils/getLocale';
|
|
|
11
11
|
import './index.scss';
|
|
12
12
|
|
|
13
13
|
const ProgressModal: React.FC<IProgressModalProps> = props => {
|
|
14
|
-
const { maxLength, okrInfo, onClose, onOk, title
|
|
14
|
+
const { maxLength, okrInfo, onClose, onOk, title, visible, isKr } = props;
|
|
15
15
|
|
|
16
16
|
const configure = isKr ? getKR_SETTING() : getO_SETTING();
|
|
17
17
|
|
|
@@ -70,7 +70,7 @@ const ProgressModal: React.FC<IProgressModalProps> = props => {
|
|
|
70
70
|
<span
|
|
71
71
|
className='auto-update__item-label'
|
|
72
72
|
style={{ alignSelf: 'flex-start', marginTop: '10px' }}
|
|
73
|
-
>{getLocale('
|
|
73
|
+
>{getLocale('Feed_Tab_Title_Progress')}</span>
|
|
74
74
|
<Textarea
|
|
75
75
|
hasError={errorRemark}
|
|
76
76
|
placeholder={getLocale('OKR_MyO_Pop_Upd_Pleprogress')}
|
|
@@ -126,7 +126,7 @@ const ProgressModal: React.FC<IProgressModalProps> = props => {
|
|
|
126
126
|
>
|
|
127
127
|
<List>
|
|
128
128
|
<Item>
|
|
129
|
-
<span className='auto-update__item-label'>{getLocale('
|
|
129
|
+
<span className='auto-update__item-label'>{getLocale('OKR_MyO_Pop_Upd_Progress')}</span>
|
|
130
130
|
<div className='auto-update__item-progress'>
|
|
131
131
|
<Input
|
|
132
132
|
type='number'
|
|
@@ -222,6 +222,7 @@ const ProgressModal: React.FC<IProgressModalProps> = props => {
|
|
|
222
222
|
};
|
|
223
223
|
|
|
224
224
|
ProgressModal.defaultProps = {
|
|
225
|
+
title: getLocale('OKR_MyO_Prog_Butt_Update'),
|
|
225
226
|
maxLength: 500,
|
|
226
227
|
};
|
|
227
228
|
|
|
@@ -63,15 +63,13 @@
|
|
|
63
63
|
}
|
|
64
64
|
&__form {
|
|
65
65
|
box-sizing: border-box;
|
|
66
|
-
|
|
67
|
-
&:last-of-type {
|
|
68
|
-
margin-bottom: 0;
|
|
69
|
-
}
|
|
66
|
+
padding: 10px 0;
|
|
70
67
|
&-title {
|
|
71
68
|
font-size: 14px;
|
|
72
69
|
font-weight: 600;
|
|
73
70
|
color: #141C28;
|
|
74
71
|
line-height: 22px;
|
|
72
|
+
margin-bottom: 6px;
|
|
75
73
|
}
|
|
76
74
|
&-value {
|
|
77
75
|
font-size: 12px;
|
|
@@ -40,7 +40,7 @@ const BaseInfo: FC = () => {
|
|
|
40
40
|
text={getLocale('Mod_Editor')}
|
|
41
41
|
onClick={handleClickEdit}
|
|
42
42
|
/>
|
|
43
|
-
<EditModle visible={visible} onCancel={handleCancelEdit} handleSuccessEditBaseInfo={handleSuccessEditBaseInfo}
|
|
43
|
+
<EditModle visible={visible} onCancel={handleCancelEdit} handleSuccessEditBaseInfo={handleSuccessEditBaseInfo}/>
|
|
44
44
|
</div>
|
|
45
45
|
<div className={`${prefix}__form`}>
|
|
46
46
|
<div className={`${prefix}__form-title`}>姓名</div>
|
|
@@ -10,7 +10,7 @@ const { Fields } = Form;
|
|
|
10
10
|
const prefix = "titaui-edit-personal-info"
|
|
11
11
|
|
|
12
12
|
const EditBaseInfo = (props) => {
|
|
13
|
-
const { visible, onCancel, handleSuccessEditBaseInfo
|
|
13
|
+
const { visible, onCancel, handleSuccessEditBaseInfo } = props;
|
|
14
14
|
|
|
15
15
|
const modalRef = useRef<any>();
|
|
16
16
|
const formContainerRef = useRef<any>();
|
|
@@ -89,14 +89,8 @@ const EditBaseInfo = (props) => {
|
|
|
89
89
|
title={'基本信息设置'}
|
|
90
90
|
noHeadLine
|
|
91
91
|
maskClosable={false}
|
|
92
|
-
onClose={
|
|
93
|
-
|
|
94
|
-
setUserInfo({name: info.name, mobile: info.mobile, email:info.email})
|
|
95
|
-
}}
|
|
96
|
-
onCancel={() => {
|
|
97
|
-
onCancel();
|
|
98
|
-
setUserInfo({name: info.name, mobile: info.mobile, email:info.email})
|
|
99
|
-
}}
|
|
92
|
+
onClose={onCancel}
|
|
93
|
+
onCancel={onCancel}
|
|
100
94
|
okText="确定"
|
|
101
95
|
noFooterLine
|
|
102
96
|
onOk={handleSaveUserInfo}
|
package/src/utils/format-time.ts
CHANGED
|
@@ -51,7 +51,7 @@ export const timeFormat = (NowDate) => {
|
|
|
51
51
|
var y = date.getFullYear(); //年
|
|
52
52
|
var m = date.getMonth() + 1; //月
|
|
53
53
|
var d = date.getDate(); //日
|
|
54
|
-
return y + "
|
|
54
|
+
return y + "-" + m + "-" + d+" 0:0:0";
|
|
55
55
|
};
|
|
56
56
|
|
|
57
57
|
// 获取当年第一天
|
|
@@ -74,7 +74,7 @@ export const showWeekFirstDay = () => {
|
|
|
74
74
|
// @ts-ignore
|
|
75
75
|
let WeekFirstDay = new Date(Nowdate - (weekDay - 1) * 86400000);
|
|
76
76
|
let M = Number(WeekFirstDay.getMonth()) + 1;
|
|
77
|
-
return WeekFirstDay.getFullYear() + "
|
|
77
|
+
return WeekFirstDay.getFullYear() + "-" + M + "-" + WeekFirstDay.getDate()+" 0:0:0";
|
|
78
78
|
};
|
|
79
79
|
|
|
80
80
|
// 本周最后一天
|
|
@@ -86,7 +86,7 @@ export const showWeekLastDay = () => {
|
|
|
86
86
|
// @ts-ignore
|
|
87
87
|
let WeekLastDay = new Date((WeekFirstDay / 1000 + 6 * 86400) * 1000);
|
|
88
88
|
let M = Number(WeekLastDay.getMonth()) + 1;
|
|
89
|
-
return WeekLastDay.getFullYear() + "
|
|
89
|
+
return WeekLastDay.getFullYear() + "-" + M + "-" + WeekLastDay.getDate();
|
|
90
90
|
};
|
|
91
91
|
|
|
92
92
|
// 下周第一天
|
|
@@ -98,7 +98,7 @@ export const showNextWeekFirstDay = () => {
|
|
|
98
98
|
// @ts-ignore
|
|
99
99
|
let WeekLastDay = new Date((WeekFirstDay / 1000 + 7 * 86400) * 1000);
|
|
100
100
|
let M = Number(WeekLastDay.getMonth()) + 1;
|
|
101
|
-
return WeekLastDay.getFullYear() + "
|
|
101
|
+
return WeekLastDay.getFullYear() + "-" + M + "-" + WeekLastDay.getDate()+" 0:0:0";
|
|
102
102
|
};
|
|
103
103
|
|
|
104
104
|
// 本月第一天
|
|
@@ -106,7 +106,7 @@ export const showMonthFirstDay = () => {
|
|
|
106
106
|
var Nowdate = new Date();
|
|
107
107
|
var MonthFirstDay = new Date(Nowdate.getFullYear(), Nowdate.getMonth(), 1);
|
|
108
108
|
var M = Number(MonthFirstDay.getMonth()) + 1;
|
|
109
|
-
return MonthFirstDay.getFullYear() + "
|
|
109
|
+
return MonthFirstDay.getFullYear() + "-" + M + "-" + MonthFirstDay.getDate()+" 0:0:0";
|
|
110
110
|
};
|
|
111
111
|
|
|
112
112
|
// 本月最后一天
|
|
@@ -120,7 +120,7 @@ export const showMonthLastDay = () => {
|
|
|
120
120
|
// @ts-ignore
|
|
121
121
|
var MonthLastDay = new Date(MonthNextFirstDay - 86400000);
|
|
122
122
|
var M = Number(MonthLastDay.getMonth()) + 1;
|
|
123
|
-
return MonthLastDay.getFullYear() + "
|
|
123
|
+
return MonthLastDay.getFullYear() + "-" + M + "-" + MonthLastDay.getDate();
|
|
124
124
|
};
|
|
125
125
|
// 下个月第一天
|
|
126
126
|
export const showNextMonthFirstDay = () => {
|
|
@@ -131,5 +131,5 @@ export const showNextMonthFirstDay = () => {
|
|
|
131
131
|
1
|
|
132
132
|
);
|
|
133
133
|
var M = Number(MonthFirstDay.getMonth()) + 1;
|
|
134
|
-
return MonthFirstDay.getFullYear() + "
|
|
134
|
+
return MonthFirstDay.getFullYear() + "-" + M + "-" + MonthFirstDay.getDate()+" 0:0:0";
|
|
135
135
|
};
|