@titaui/pc 1.11.48-beta.2 → 1.11.50
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/rect-btn/index.js +3 -3
- package/lib/{pages/aha2021 → components/contact-kefu}/img/canceled.svg +0 -0
- package/lib/{pages/aha2021 → components/contact-kefu}/img/kefu.svg +0 -0
- package/lib/{pages/aha2021 → components/contact-kefu}/img/not-try.png +0 -0
- package/lib/components/contact-kefu/img/notice.png +0 -0
- package/lib/{pages/aha2021 → components/contact-kefu}/img/try.png +0 -0
- package/lib/components/contact-kefu/index.css +85 -0
- package/lib/components/{task-relation-modal/search/work-relation.js → contact-kefu/index.js} +63 -44
- package/lib/components/okr-detail/components/base-okr-type/confirm/confirm.js +1 -1
- package/lib/components/okr-detail/components/base-okr-type/index.css +4 -0
- package/lib/components/okr-detail/components/base-okr-type/object-type.js +1 -0
- package/lib/components/okr-detail/e-list/index.js +2 -2
- package/lib/components/search-input/index.css +1 -1
- package/lib/components/task-relation-modal/helper.js +2 -69
- package/lib/components/task-relation-modal/index.js +0 -9
- package/lib/components/task-relation-modal/request-api.js +2 -28
- package/lib/components/task-relation-modal/search/okr-status-select.js +3 -3
- package/lib/components/task-relation-modal/search/principal.js +2 -1
- package/lib/components/task-relation-modal/search/search-dropdown/index.css +1 -1
- package/lib/components/task-relation-modal/tree/okr-tree/search-form.js +2 -15
- package/lib/components/textarea/index.js +38 -35
- package/lib/components/tooltip/index.js +0 -3
- package/lib/components/user-selector/select-tree/tree-nodes/tree-person-node/index.js +3 -7
- package/lib/index.js +8 -0
- package/lib/pages/aha2021/index.css +1 -19
- package/lib/pages/aha2021/index.js +3 -82
- package/package.json +1 -1
- package/lib/components/button/images/blue.svg +0 -21
- package/lib/components/button/images/red.svg +0 -21
- package/lib/components/button/images/white.svg +0 -19
- package/lib/components/period-selector/interface.js +0 -7
- package/lib/components/task-relation-modal/image/loading.gif +0 -0
- package/lib/components/task-relation-modal/okr-relation/relation-task-model/index.css +0 -18
- package/lib/components/task-relation-modal/okr-relation/relation-task-model/index.js +0 -256
- package/lib/components/task-relation-modal/okr-relation/relation-task-model/search-form.js +0 -123
- 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 +0 -129
- package/lib/components/task-relation-modal/okr-relation/request-api.js +0 -93
- package/lib/components/task-relation-modal/okr-relation/tree/task-tree/index.css +0 -119
- package/lib/components/task-relation-modal/okr-relation/tree/task-tree/index.js +0 -183
- package/lib/components/task-relation-modal/search/task-status-select.js +0 -87
- package/lib/components/task-relation-modal/search/work-status-select.js +0 -74
- package/lib/components/task-relation-modal/tree/task-list/index.css +0 -0
- package/lib/components/task-relation-modal/tree/task-list/index.js +0 -1
- package/lib/components/task-relation-modal/tree/work-list/index.css +0 -14
- package/lib/components/task-relation-modal/tree/work-list/index.js +0 -176
- package/lib/components/task-relation-modal/tree/work-list/search-form.js +0 -122
- package/lib/components/task-relation-modal/work-relation/index.css +0 -0
- package/lib/components/task-relation-modal/work-relation/index.js +0 -256
- package/lib/components/tooltip/tooltip-rows/index.css +0 -26
- package/lib/components/tooltip/tooltip-rows/index.js +0 -106
|
@@ -34,10 +34,10 @@ function RectBtn(props) {
|
|
|
34
34
|
className = _props$className === void 0 ? '' : _props$className,
|
|
35
35
|
_props$disabled = props.disabled,
|
|
36
36
|
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
37
|
-
_props$loading = props.loading,
|
|
38
|
-
loading = _props$loading === void 0 ? false : _props$loading,
|
|
39
37
|
style = props.style,
|
|
40
|
-
children = props.children
|
|
38
|
+
children = props.children,
|
|
39
|
+
_props$loading = props.loading,
|
|
40
|
+
loading = _props$loading === void 0 ? false : _props$loading;
|
|
41
41
|
|
|
42
42
|
var renderIcon = function renderIcon() {
|
|
43
43
|
if (typeof icon === 'string') {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
Binary file
|
|
File without changes
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
.contact-kefu {
|
|
2
|
+
position: relative;
|
|
3
|
+
height: 100vh;
|
|
4
|
+
background: #f0f4fa;
|
|
5
|
+
overflow: hidden;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.contact-kefu__kefu {
|
|
9
|
+
position: absolute;
|
|
10
|
+
bottom: 74px;
|
|
11
|
+
right: 24px;
|
|
12
|
+
z-index: 2;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.contact-kefu__try-kefu {
|
|
16
|
+
position: absolute;
|
|
17
|
+
bottom: 134px;
|
|
18
|
+
right: 24px;
|
|
19
|
+
z-index: 2;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.contact-kefu__kefu {
|
|
23
|
+
width: 42px;
|
|
24
|
+
height: 42px;
|
|
25
|
+
background: url("./img/kefu.svg") no-repeat;
|
|
26
|
+
background-color: #fff;
|
|
27
|
+
background-size: 42px;
|
|
28
|
+
box-shadow: 0px 4px 12px 0px rgba(127, 145, 180, 0.2);
|
|
29
|
+
cursor: pointer;
|
|
30
|
+
border-radius: 50%;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.contact-kefu__hidden {
|
|
34
|
+
background-image: none;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.contact-kefu__cancel {
|
|
38
|
+
height: 100%;
|
|
39
|
+
background: url("./img/canceled.svg") 50% 50% no-repeat;
|
|
40
|
+
animation-duration: 0.3s;
|
|
41
|
+
animation-name: kefuActive;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.contact-kefu__popup {
|
|
45
|
+
width: 332px;
|
|
46
|
+
height: 376px;
|
|
47
|
+
display: flex;
|
|
48
|
+
flex-direction: column;
|
|
49
|
+
justify-content: center;
|
|
50
|
+
align-items: center;
|
|
51
|
+
background: #ffffff;
|
|
52
|
+
box-shadow: 0px 8px 24px 0px rgba(127, 145, 180, 0.16);
|
|
53
|
+
border-radius: 24px;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.contact-kefu__popup-title {
|
|
57
|
+
font-size: 20px;
|
|
58
|
+
font-weight: 600;
|
|
59
|
+
color: #141c28;
|
|
60
|
+
line-height: 30px;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.contact-kefu__popup-content {
|
|
64
|
+
margin-top: 4px;
|
|
65
|
+
font-size: 14px;
|
|
66
|
+
font-weight: normal;
|
|
67
|
+
color: #6f7886;
|
|
68
|
+
line-height: 22px;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.contact-kefu__popup-img {
|
|
72
|
+
width: 200px;
|
|
73
|
+
height: 200px;
|
|
74
|
+
margin-top: 24px;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
@keyframes contentOpacity {
|
|
78
|
+
from {
|
|
79
|
+
opacity: 0;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
to {
|
|
83
|
+
opacity: 1;
|
|
84
|
+
}
|
|
85
|
+
}
|
package/lib/components/{task-relation-modal/search/work-relation.js → contact-kefu/index.js}
RENAMED
|
@@ -9,11 +9,19 @@ exports["default"] = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _tooltip = _interopRequireDefault(require("../tooltip"));
|
|
15
15
|
|
|
16
|
-
require("
|
|
16
|
+
var _popup = _interopRequireDefault(require("../popup"));
|
|
17
|
+
|
|
18
|
+
var _platform = require("../../utils/platform");
|
|
19
|
+
|
|
20
|
+
var _notTry = _interopRequireDefault(require("./img/not-try.png"));
|
|
21
|
+
|
|
22
|
+
var _try = _interopRequireDefault(require("./img/try.png"));
|
|
23
|
+
|
|
24
|
+
require("./index.css");
|
|
17
25
|
|
|
18
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
27
|
|
|
@@ -21,6 +29,8 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
21
29
|
|
|
22
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; }
|
|
23
31
|
|
|
32
|
+
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; }
|
|
33
|
+
|
|
24
34
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
25
35
|
|
|
26
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."); }
|
|
@@ -33,51 +43,60 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
33
43
|
|
|
34
44
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
35
45
|
|
|
36
|
-
|
|
37
|
-
var onChange = props.onChange,
|
|
38
|
-
initValue = props.initValue;
|
|
46
|
+
var preCls = "contact-kefu";
|
|
39
47
|
|
|
40
|
-
|
|
48
|
+
var ContactKefu = function ContactKefu() {
|
|
49
|
+
var _useState = (0, _react.useState)(false),
|
|
41
50
|
_useState2 = _slicedToArray(_useState, 2),
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
(0, _react.useEffect)(function () {
|
|
46
|
-
if (initValue === 0) {
|
|
47
|
-
setSelectText((0, _getLocale.getLocale)("Pro_page_Plan_FullRange"));
|
|
48
|
-
}
|
|
49
|
-
}, [initValue]);
|
|
51
|
+
visible = _useState2[0],
|
|
52
|
+
setVisible = _useState2[1];
|
|
50
53
|
|
|
51
|
-
var
|
|
52
|
-
|
|
53
|
-
onChange(key.value);
|
|
54
|
+
var handleShowCode = function handleShowCode() {
|
|
55
|
+
setVisible(true);
|
|
54
56
|
};
|
|
55
57
|
|
|
56
|
-
var
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}, {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
58
|
+
var isTrial = window.BSGlobal.tenantAuthentication.Version === 1 && (0, _platform.isOfficialSite)();
|
|
59
|
+
|
|
60
|
+
var popup = /*#__PURE__*/_react["default"].createElement("div", {
|
|
61
|
+
className: "".concat(preCls, "__popup")
|
|
62
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
63
|
+
className: "".concat(preCls, "__popup-title")
|
|
64
|
+
}, "\u5FAE\u4FE1/\u4F01\u4E1A\u5FAE\u4FE1\u626B\u4E00\u626B"), /*#__PURE__*/_react["default"].createElement("div", {
|
|
65
|
+
className: "".concat(preCls, "__popup-content")
|
|
66
|
+
}, "\u4E13\u5C5E\u5BA2\u670D\u4E3A\u4F60\u63D0\u4F9B\u54A8\u8BE2\u670D\u52A1"), /*#__PURE__*/_react["default"].createElement("img", {
|
|
67
|
+
src: isTrial ? _try["default"] : _notTry["default"],
|
|
68
|
+
className: "".concat(preCls, "__popup-img"),
|
|
69
|
+
alt: "\u5FAE\u4FE1\u626B\u7801"
|
|
70
|
+
}));
|
|
71
|
+
|
|
72
|
+
return /*#__PURE__*/_react["default"].createElement(_popup["default"], {
|
|
73
|
+
popup: popup,
|
|
74
|
+
popupTransitionName: "tita-popup-zoom-left-bottom",
|
|
75
|
+
placement: "topLeft",
|
|
76
|
+
popupAlign: {
|
|
77
|
+
offset: [-32, -10],
|
|
78
|
+
overflow: {
|
|
79
|
+
adjustX: 1,
|
|
80
|
+
adjustY: 1
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
popupVisible: visible,
|
|
84
|
+
onPopupVisibleChange: function onPopupVisibleChange(bol) {
|
|
85
|
+
return setVisible(bol);
|
|
86
|
+
}
|
|
87
|
+
}, /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
88
|
+
overlay: "\u8054\u7CFB\u5BA2\u670D",
|
|
89
|
+
placement: "right",
|
|
90
|
+
align: {
|
|
91
|
+
offset: [0, 0]
|
|
92
|
+
}
|
|
93
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
94
|
+
className: (0, _classnames["default"])("".concat(preCls, "__kefu"), _defineProperty({}, "".concat(preCls, "__try-kefu"), isTrial), _defineProperty({}, "".concat(preCls, "__hidden"), visible)),
|
|
95
|
+
onClick: handleShowCode
|
|
73
96
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
74
|
-
className: "
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
})));
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
var _default = Relation;
|
|
97
|
+
className: (0, _classnames["default"])(_defineProperty({}, "".concat(preCls, "__cancel"), visible))
|
|
98
|
+
}))));
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
var _default = ContactKefu;
|
|
83
102
|
exports["default"] = _default;
|
|
@@ -47,7 +47,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
47
47
|
|
|
48
48
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
49
49
|
|
|
50
|
-
var ConfirmWrapper = _styledComponents["default"].div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n /* TODO padding \u53EF\u52A8\u6001\u8C03\u6574 */\n width: 300px;\n
|
|
50
|
+
var ConfirmWrapper = _styledComponents["default"].div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n /* TODO padding \u53EF\u52A8\u6001\u8C03\u6574 */\n width: 300px;\n max-height: 100px;\n border-radius: 5px;\n box-shadow: 0 3px 10px 0 rgba(0, 0, 0, 0.15);\n padding: 15px 12px;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n background-color: #fff;\n"])));
|
|
51
51
|
|
|
52
52
|
var FooterWrapper = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin-top: 5px;\n button {\n padding: 2px 12px;\n font-size: 12px;\n }\n"])));
|
|
53
53
|
|
|
@@ -248,6 +248,7 @@ var ObjectType = /*#__PURE__*/function (_Component) {
|
|
|
248
248
|
|
|
249
249
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_radio.RadioGroup, {
|
|
250
250
|
name: "okrType",
|
|
251
|
+
className: "confim-radio",
|
|
251
252
|
labelText: (0, _getLocale.getLocale)("Mod_Type"),
|
|
252
253
|
style: {
|
|
253
254
|
marginBottom: 8
|
|
@@ -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];
|
|
@@ -3,12 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.preCls = exports.lableTypeMap = exports.isOpenWorkManage = exports.isOpenOkrManage = exports.isOpenLabel = exports.formatDateStr = void 0;
|
|
7
7
|
|
|
8
8
|
var _bsGlobal = require("../../utils/bs-global");
|
|
9
9
|
|
|
10
|
-
var _getLocale = require("../../utils/getLocale");
|
|
11
|
-
|
|
12
10
|
var preCls = "titaui-task-relation";
|
|
13
11
|
exports.preCls = preCls;
|
|
14
12
|
var isOpenOkrManage = (0, _bsGlobal.getAppHead)("113"); // 开通OKR
|
|
@@ -31,21 +29,7 @@ var lableTypeMap = {
|
|
|
31
29
|
};
|
|
32
30
|
exports.lableTypeMap = lableTypeMap;
|
|
33
31
|
|
|
34
|
-
var timeFormat = function timeFormat(NowDate) {
|
|
35
|
-
var date = new Date(NowDate);
|
|
36
|
-
var y = date.getFullYear(); // 年
|
|
37
|
-
|
|
38
|
-
var m = date.getMonth() + 1; // 月
|
|
39
|
-
|
|
40
|
-
var d = date.getDate(); // 日
|
|
41
|
-
|
|
42
|
-
return "".concat(y, "/").concat(m, "/").concat(d);
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
exports.timeFormat = timeFormat;
|
|
46
|
-
|
|
47
32
|
var formatDateStr = function formatDateStr(str) {
|
|
48
|
-
str = timeFormat(str);
|
|
49
33
|
var currentYear = new Date().getFullYear();
|
|
50
34
|
|
|
51
35
|
if (str.indexOf(currentYear) !== -1) {
|
|
@@ -55,55 +39,4 @@ var formatDateStr = function formatDateStr(str) {
|
|
|
55
39
|
return str;
|
|
56
40
|
};
|
|
57
41
|
|
|
58
|
-
exports.formatDateStr = formatDateStr;
|
|
59
|
-
|
|
60
|
-
var okrStatus = function okrStatus(key) {
|
|
61
|
-
// 分类的类型(4:项目 17:普通分类 62:目标
|
|
62
|
-
var label = (0, _getLocale.getLocale)('OKR_MyO_E_From_AllStates');
|
|
63
|
-
|
|
64
|
-
switch (Number(key)) {
|
|
65
|
-
case 1:
|
|
66
|
-
label = (0, _getLocale.getLocale)('Per_MyRe_text_Inprogress');
|
|
67
|
-
break;
|
|
68
|
-
|
|
69
|
-
case 2:
|
|
70
|
-
label = (0, _getLocale.getLocale)('Pro_page_Sta_Completed');
|
|
71
|
-
break;
|
|
72
|
-
|
|
73
|
-
case 3:
|
|
74
|
-
label = (0, _getLocale.getLocale)('OKR_MyO_E_From_Delayed');
|
|
75
|
-
break;
|
|
76
|
-
|
|
77
|
-
case 4:
|
|
78
|
-
label = (0, _getLocale.getLocale)('OKR_MyO_E_From_Cancelled');
|
|
79
|
-
break;
|
|
80
|
-
|
|
81
|
-
case 5:
|
|
82
|
-
label = (0, _getLocale.getLocale)('OKR_MyO_E_From_Notaccepted');
|
|
83
|
-
break;
|
|
84
|
-
|
|
85
|
-
case 6:
|
|
86
|
-
label = (0, _getLocale.getLocale)('OKR_MyO_E_From_Suspended');
|
|
87
|
-
break;
|
|
88
|
-
|
|
89
|
-
case 0:
|
|
90
|
-
label = (0, _getLocale.getLocale)('OKR_MyO_E_From_NotStarted');
|
|
91
|
-
break;
|
|
92
|
-
|
|
93
|
-
default:
|
|
94
|
-
break;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
return label;
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
exports.okrStatus = okrStatus;
|
|
101
|
-
|
|
102
|
-
var workStatus = function workStatus() {
|
|
103
|
-
return {
|
|
104
|
-
1: (0, _getLocale.getLocale)("Per_MyRe_text_Inprogress"),
|
|
105
|
-
2: (0, _getLocale.getLocale)("OKR_MyO_E_From_Completed")
|
|
106
|
-
};
|
|
107
|
-
};
|
|
108
|
-
|
|
109
|
-
exports.workStatus = workStatus;
|
|
42
|
+
exports.formatDateStr = formatDateStr;
|
|
@@ -29,12 +29,6 @@ var _requestApi = require("./request-api");
|
|
|
29
29
|
|
|
30
30
|
var _getLocale = require("../../utils/getLocale");
|
|
31
31
|
|
|
32
|
-
var _relationTaskModel = _interopRequireDefault(require("./okr-relation/relation-task-model"));
|
|
33
|
-
|
|
34
|
-
var _relationWorkModel = _interopRequireDefault(require("./okr-relation/relation-work-model"));
|
|
35
|
-
|
|
36
|
-
var _workRelation = _interopRequireDefault(require("./work-relation"));
|
|
37
|
-
|
|
38
32
|
require("./index.css");
|
|
39
33
|
|
|
40
34
|
var _excluded = ["defaultVisible", "multiple", "onOk", "onCancel", "taskId", "isRelationOther", "lastSelected"];
|
|
@@ -312,8 +306,5 @@ function TaskRelationModal(props) {
|
|
|
312
306
|
}, selected.length), "\u9879"))));
|
|
313
307
|
}
|
|
314
308
|
|
|
315
|
-
TaskRelationModal.RelationTaskModel = _relationTaskModel["default"];
|
|
316
|
-
TaskRelationModal.RelationWorkModel = _relationWorkModel["default"];
|
|
317
|
-
TaskRelationModal.WorkRelationModal = _workRelation["default"];
|
|
318
309
|
var _default = TaskRelationModal;
|
|
319
310
|
exports["default"] = _default;
|
|
@@ -3,12 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.updateLable = exports.relationWorks = exports.okrSearch = exports.getWorks = exports.getUserById = exports.getCategory = void 0;
|
|
7
7
|
|
|
8
8
|
var _request = require("../../utils/request");
|
|
9
9
|
|
|
10
|
-
var _helpers = require("../../utils/helpers");
|
|
11
|
-
|
|
12
10
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
13
11
|
|
|
14
12
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
@@ -81,28 +79,4 @@ var getUserById = function getUserById(userId) {
|
|
|
81
79
|
});
|
|
82
80
|
};
|
|
83
81
|
|
|
84
|
-
exports.getUserById = getUserById;
|
|
85
|
-
|
|
86
|
-
var workData = function workData(params, pageNum, pageSize) {
|
|
87
|
-
var url = "work/list?toUserId=".concat((0, _helpers.getLoginUserInfo)().Id);
|
|
88
|
-
var _params$keyWords2 = params.keyWords,
|
|
89
|
-
keyWords = _params$keyWords2 === void 0 ? "" : _params$keyWords2,
|
|
90
|
-
_params$status = params.status,
|
|
91
|
-
status = _params$status === void 0 ? 0 : _params$status,
|
|
92
|
-
_params$relation = params.relation,
|
|
93
|
-
relation = _params$relation === void 0 ? 0 : _params$relation,
|
|
94
|
-
userIds = params.userIds;
|
|
95
|
-
return (0, _request.rpost)("v1")(url, {
|
|
96
|
-
keyWords: keyWords,
|
|
97
|
-
orderType: 1,
|
|
98
|
-
pageNum: pageNum,
|
|
99
|
-
pageSize: pageSize,
|
|
100
|
-
relation: relation,
|
|
101
|
-
status: status,
|
|
102
|
-
userIds: userIds
|
|
103
|
-
}).then(function (res) {
|
|
104
|
-
return res;
|
|
105
|
-
});
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
exports.workData = workData;
|
|
82
|
+
exports.getUserById = getUserById;
|
|
@@ -37,7 +37,7 @@ function OkrStatusSelect(props) {
|
|
|
37
37
|
var onChange = props.onChange,
|
|
38
38
|
initValue = props.initValue;
|
|
39
39
|
|
|
40
|
-
var _useState = (0, _react.useState)((0, _getLocale.getLocale)("
|
|
40
|
+
var _useState = (0, _react.useState)((0, _getLocale.getLocale)("OKR_MyO_Butt_AllStates")),
|
|
41
41
|
_useState2 = _slicedToArray(_useState, 2),
|
|
42
42
|
selectText = _useState2[0],
|
|
43
43
|
setSelectText = _useState2[1];
|
|
@@ -48,13 +48,13 @@ function OkrStatusSelect(props) {
|
|
|
48
48
|
};
|
|
49
49
|
|
|
50
50
|
var selectOptions = [{
|
|
51
|
-
label: (0, _getLocale.getLocale)("
|
|
51
|
+
label: (0, _getLocale.getLocale)("OKR_MyO_Butt_AllStates"),
|
|
52
52
|
value: 0
|
|
53
53
|
}, {
|
|
54
54
|
label: (0, _getLocale.getLocale)("Per_MyRe_text_Inprogress"),
|
|
55
55
|
value: 1
|
|
56
56
|
}, {
|
|
57
|
-
label: (0, _getLocale.getLocale)("
|
|
57
|
+
label: (0, _getLocale.getLocale)("OKR_MyO_Butt_Hasended"),
|
|
58
58
|
value: 2
|
|
59
59
|
}];
|
|
60
60
|
return /*#__PURE__*/_react["default"].createElement(_selectLayer["default"], {
|
|
@@ -23,8 +23,6 @@ var _principal = _interopRequireDefault(require("../../search/principal"));
|
|
|
23
23
|
|
|
24
24
|
var _relation = _interopRequireDefault(require("../../search/relation"));
|
|
25
25
|
|
|
26
|
-
var _helpers = require("../../../../utils/helpers");
|
|
27
|
-
|
|
28
26
|
var _getLocale = require("../../../../utils/getLocale");
|
|
29
27
|
|
|
30
28
|
require("./index.css");
|
|
@@ -54,17 +52,6 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
54
52
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
55
53
|
|
|
56
54
|
function SearchForm(props) {
|
|
57
|
-
var _loginUser$UserAvatar;
|
|
58
|
-
|
|
59
|
-
var loginUser = (0, _helpers.getLoginUserInfo)();
|
|
60
|
-
var user = {
|
|
61
|
-
userId: loginUser.Id,
|
|
62
|
-
name: loginUser.Name,
|
|
63
|
-
avatar: {
|
|
64
|
-
original: loginUser === null || loginUser === void 0 ? void 0 : (_loginUser$UserAvatar = loginUser.UserAvatar) === null || _loginUser$UserAvatar === void 0 ? void 0 : _loginUser$UserAvatar.Original,
|
|
65
|
-
color: '#bc97eb'
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
55
|
var onChange = props.onChange;
|
|
69
56
|
|
|
70
57
|
var _useState = (0, _react.useState)({
|
|
@@ -82,7 +69,7 @@ function SearchForm(props) {
|
|
|
82
69
|
okrType = _useState4[0],
|
|
83
70
|
setOkrType = _useState4[1];
|
|
84
71
|
|
|
85
|
-
var _useState5 = (0, _react.useState)([
|
|
72
|
+
var _useState5 = (0, _react.useState)([]),
|
|
86
73
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
87
74
|
users = _useState6[0],
|
|
88
75
|
setUsers = _useState6[1];
|
|
@@ -130,7 +117,7 @@ function SearchForm(props) {
|
|
|
130
117
|
className: "rel-okr-tree__search-item"
|
|
131
118
|
}, /*#__PURE__*/_react["default"].createElement(_principal["default"], {
|
|
132
119
|
onChange: setUsers,
|
|
133
|
-
initValue:
|
|
120
|
+
initValue: [],
|
|
134
121
|
setRelation: setRelation
|
|
135
122
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
136
123
|
className: "rel-okr-tree__search-item"
|
|
@@ -13,7 +13,7 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
13
13
|
|
|
14
14
|
require("./index.css");
|
|
15
15
|
|
|
16
|
-
var _excluded = ["disabled", "onFocus", "onBlur", "inputRef", "onChange", "className", "value", "placeholder", "maxLine", "maxLength", "initValue", "onErrorChange", "validator", "onKeyDown"];
|
|
16
|
+
var _excluded = ["disabled", "onFocus", "onBlur", "inputRef", "onChange", "className", "value", "placeholder", "maxLine", "isShowApproval", "maxLength", "initValue", "onErrorChange", "validator", "onKeyDown"];
|
|
17
17
|
|
|
18
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
19
|
|
|
@@ -50,6 +50,7 @@ var Textarea = function Textarea(p) {
|
|
|
50
50
|
placeholder = p.placeholder,
|
|
51
51
|
_p$maxLine = p.maxLine,
|
|
52
52
|
maxLine = _p$maxLine === void 0 ? 4 : _p$maxLine,
|
|
53
|
+
isShowApproval = p.isShowApproval,
|
|
53
54
|
maxLength = p.maxLength,
|
|
54
55
|
initValue = p.initValue,
|
|
55
56
|
onErrorChange = p.onErrorChange,
|
|
@@ -111,40 +112,6 @@ var Textarea = function Textarea(p) {
|
|
|
111
112
|
showBottomShadow = _useState18[0],
|
|
112
113
|
setShowBottomShadow = _useState18[1];
|
|
113
114
|
|
|
114
|
-
(0, _react.useEffect)(function () {
|
|
115
|
-
if (!validateEnable) return;
|
|
116
|
-
var hasError = false;
|
|
117
|
-
var eText = "";
|
|
118
|
-
|
|
119
|
-
if (maxLength !== undefined) {
|
|
120
|
-
if (realValue.length > maxLength) {
|
|
121
|
-
hasError = true;
|
|
122
|
-
eText = "\u5DF2\u8F93\u5165 ".concat(realValue.length, " \u4E2A\u5B57\uFF0C\u6700\u591A\u53EF\u8F93\u5165 ").concat(maxLength, " \u4E2A\u5B57");
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
if (!hasError && validator) {
|
|
127
|
-
var _validator = validator(realValue),
|
|
128
|
-
isValid = _validator.isValid,
|
|
129
|
-
_errorText = _validator.errorText;
|
|
130
|
-
|
|
131
|
-
if (!isValid) {
|
|
132
|
-
hasError = true;
|
|
133
|
-
eText = _errorText || "";
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
setErrorText(eText);
|
|
138
|
-
|
|
139
|
-
if (hasError !== error) {
|
|
140
|
-
if (onErrorChange) {
|
|
141
|
-
onErrorChange(hasError);
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
setError(hasError);
|
|
145
|
-
}
|
|
146
|
-
}, [realValue]);
|
|
147
|
-
|
|
148
115
|
var handleShadowVisible = function handleShadowVisible() {
|
|
149
116
|
setTimeout(function () {
|
|
150
117
|
if (realInputRef.current) {
|
|
@@ -190,6 +157,42 @@ var Textarea = function Textarea(p) {
|
|
|
190
157
|
var areaNormal = isTrue ? "area-focus" : "area-normal";
|
|
191
158
|
var areaFocus = active ? "area-focus" : areaNormal;
|
|
192
159
|
var areaError = error ? "area-error" : areaFocus;
|
|
160
|
+
(0, _react.useEffect)(function () {
|
|
161
|
+
if (!validateEnable) return;
|
|
162
|
+
var hasError = false;
|
|
163
|
+
var eText = "";
|
|
164
|
+
|
|
165
|
+
if (maxLength !== undefined) {
|
|
166
|
+
if (realValue.length > maxLength) {
|
|
167
|
+
hasError = true;
|
|
168
|
+
eText = "\u5DF2\u8F93\u5165 ".concat(realValue.length, " \u4E2A\u5B57\uFF0C\u6700\u591A\u53EF\u8F93\u5165 ").concat(maxLength, " \u4E2A\u5B57");
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
if (!hasError && validator) {
|
|
173
|
+
var _validator = validator(realValue),
|
|
174
|
+
isValid = _validator.isValid,
|
|
175
|
+
_errorText = _validator.errorText;
|
|
176
|
+
|
|
177
|
+
if (!isValid) {
|
|
178
|
+
hasError = true;
|
|
179
|
+
eText = _errorText || "";
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
setErrorText(eText);
|
|
184
|
+
|
|
185
|
+
if (hasError !== error) {
|
|
186
|
+
if (onErrorChange) {
|
|
187
|
+
onErrorChange(hasError);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
setError(hasError);
|
|
191
|
+
}
|
|
192
|
+
}, [realValue]);
|
|
193
|
+
(0, _react.useEffect)(function () {
|
|
194
|
+
resetTextareaHeight();
|
|
195
|
+
}, [isShowApproval]);
|
|
193
196
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
194
197
|
className: "\n ".concat(prefixCls, "\n ").concat(areaError, "\n ").concat(disabled ? " disabled" : "", "\n "),
|
|
195
198
|
onFocus: function onFocus() {},
|
|
@@ -11,14 +11,11 @@ var _tooltip = _interopRequireDefault(require("./tooltip"));
|
|
|
11
11
|
|
|
12
12
|
var _tooltipText = _interopRequireDefault(require("./tooltip-text"));
|
|
13
13
|
|
|
14
|
-
var _tooltipRows = _interopRequireDefault(require("./tooltip-rows"));
|
|
15
|
-
|
|
16
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
15
|
|
|
18
16
|
// export const TooltipText = _TooltipText;
|
|
19
17
|
// export const ErrorToolTip = _ErrorTip;
|
|
20
18
|
_tooltip["default"].Text = _tooltipText["default"];
|
|
21
19
|
_tooltip["default"].Error = _errorTip["default"];
|
|
22
|
-
_tooltip["default"].Rows = _tooltipRows["default"];
|
|
23
20
|
var _default = _tooltip["default"];
|
|
24
21
|
exports["default"] = _default;
|