@titaui/pc 1.12.0-beta.2 → 1.12.2
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/checkbox/index.css +4 -0
- package/lib/components/contact-kefu/index.css +10 -0
- package/lib/components/contact-kefu/index.js +8 -2
- package/lib/components/create-okr-modal/index.js +3 -1
- package/lib/components/dynamic/constant.js +1 -1
- 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/nav-top/components/menu/index.js +16 -14
- 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/e-list/index.js +2 -2
- package/lib/components/period-selector/interface.js +7 -0
- package/lib/components/publish-dynamic-modal/publish-dynamic-modal.js +16 -10
- package/lib/components/search-input/index.css +1 -1
- 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 -1
- 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/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/export-modules/depart-search-selector/index.js +0 -3
- package/lib/components/user-selector/export-modules/field-tree-selector/index.js +3 -1
- package/lib/components/user-selector/request-apis.js +28 -9
- package/lib/components/user-selector/searched-panel/index.js +21 -8
- package/lib/components/user-selector/select-tree/tree-nodes/tree-person-node/index.js +46 -18
- package/lib/utils/planDataJson.js +11115 -0
- package/package.json +2 -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
|
@@ -13,6 +13,8 @@ var _userSelector = _interopRequireDefault(require("../../user-selector"));
|
|
|
13
13
|
|
|
14
14
|
var _searchDropdown = _interopRequireDefault(require("./search-dropdown"));
|
|
15
15
|
|
|
16
|
+
var _openData = require("../../../utils/open-data");
|
|
17
|
+
|
|
16
18
|
var _getLocale = require("../../../utils/getLocale");
|
|
17
19
|
|
|
18
20
|
require("./search-dropdown/index.css");
|
|
@@ -41,7 +43,9 @@ function Principal(props) {
|
|
|
41
43
|
initValue = _props$initValue === void 0 ? [] : _props$initValue,
|
|
42
44
|
setRelation = props.setRelation,
|
|
43
45
|
_props$position = props.position,
|
|
44
|
-
position = _props$position === void 0 ?
|
|
46
|
+
position = _props$position === void 0 ? 'bottom' : _props$position,
|
|
47
|
+
_props$multiple = props.multiple,
|
|
48
|
+
multiple = _props$multiple === void 0 ? true : _props$multiple;
|
|
45
49
|
|
|
46
50
|
var _useState = (0, _react.useState)(initValue),
|
|
47
51
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -53,16 +57,24 @@ function Principal(props) {
|
|
|
53
57
|
isInit = _useState4[0],
|
|
54
58
|
setIsInit = _useState4[1];
|
|
55
59
|
|
|
56
|
-
var
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
+
var userSelectorRef = (0, _react.useRef)(document.createElement('div'));
|
|
61
|
+
|
|
62
|
+
var singleSelect = function singleSelect(users) {
|
|
63
|
+
var _users$;
|
|
60
64
|
|
|
61
|
-
|
|
65
|
+
if (multiple || !users || !((_users$ = users[0]) !== null && _users$ !== void 0 && _users$.data)) return;
|
|
66
|
+
var user = users[0];
|
|
67
|
+
var data = user.data;
|
|
68
|
+
setUsers([{
|
|
69
|
+
avatar: data.avatar,
|
|
70
|
+
name: data.name,
|
|
71
|
+
userId: data.userId
|
|
72
|
+
}]);
|
|
73
|
+
};
|
|
62
74
|
|
|
63
75
|
var onSelectUser = function onSelectUser(_ref) {
|
|
64
76
|
var users = _ref.users;
|
|
65
|
-
|
|
77
|
+
setUsers(users);
|
|
66
78
|
};
|
|
67
79
|
|
|
68
80
|
(0, _react.useEffect)(function () {
|
|
@@ -70,32 +82,37 @@ function Principal(props) {
|
|
|
70
82
|
}, []);
|
|
71
83
|
(0, _react.useEffect)(function () {
|
|
72
84
|
setRelation(0);
|
|
73
|
-
|
|
85
|
+
isInit && onChange(users);
|
|
86
|
+
}, [users]);
|
|
74
87
|
|
|
88
|
+
var renderName = function renderName() {
|
|
75
89
|
if (users.length > 0) {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
users.forEach(function (item, key) {
|
|
90
|
+
return users.map(function (item, key) {
|
|
79
91
|
if (key === users.length - 1) {
|
|
80
|
-
|
|
92
|
+
return /*#__PURE__*/_react["default"].createElement(_openData.OpenUserName, {
|
|
93
|
+
name: item.name,
|
|
94
|
+
id: item.userId
|
|
95
|
+
});
|
|
81
96
|
} else {
|
|
82
|
-
|
|
97
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_openData.OpenUserName, {
|
|
98
|
+
name: item.name,
|
|
99
|
+
id: item.userId
|
|
100
|
+
}), ",");
|
|
83
101
|
}
|
|
84
102
|
});
|
|
85
|
-
setSelectText(text);
|
|
86
103
|
} else {
|
|
87
|
-
|
|
104
|
+
return (0, _getLocale.getLocale)('Pro_page_Plan_Allpersonnel');
|
|
88
105
|
}
|
|
106
|
+
};
|
|
89
107
|
|
|
90
|
-
isInit && onChange(users);
|
|
91
|
-
}, [users]);
|
|
92
108
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
93
109
|
ref: userSelectorRef
|
|
94
110
|
}, /*#__PURE__*/_react["default"].createElement(_userSelector["default"], {
|
|
95
|
-
multiple:
|
|
111
|
+
multiple: multiple,
|
|
96
112
|
selectNodes: {
|
|
97
113
|
users: users
|
|
98
114
|
},
|
|
115
|
+
onSelect: singleSelect,
|
|
99
116
|
onOk: onSelectUser,
|
|
100
117
|
position: position,
|
|
101
118
|
disabledDepartSelect: true,
|
|
@@ -111,7 +128,7 @@ function Principal(props) {
|
|
|
111
128
|
popClass: "pull-screen-ignore"
|
|
112
129
|
}, /*#__PURE__*/_react["default"].createElement(_searchDropdown["default"], null, /*#__PURE__*/_react["default"].createElement("span", {
|
|
113
130
|
className: "titaui-search-dropdown__principal-text"
|
|
114
|
-
},
|
|
131
|
+
}, renderName()))));
|
|
115
132
|
}
|
|
116
133
|
|
|
117
134
|
var _default = Principal;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
border: 1px solid #e9ecf0;
|
|
7
7
|
padding: 7px 28px 7px 12px;
|
|
8
8
|
position: relative;
|
|
9
|
-
border-radius:
|
|
9
|
+
border-radius: 16px;
|
|
10
10
|
font-size: 0;
|
|
11
11
|
cursor: pointer;
|
|
12
12
|
transition: color 0.3s ease, border 0.3s ease;
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
.titaui-search-dropdown .tu-icon-sort-down {
|
|
44
|
+
color: #6F7886;
|
|
44
45
|
font-size: 14px;
|
|
45
46
|
position: absolute;
|
|
46
47
|
right: 12px;
|
|
@@ -9,15 +9,11 @@ exports["default"] = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
12
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
-
|
|
14
|
-
var _item = _interopRequireDefault(require("./item"));
|
|
15
|
-
|
|
16
|
-
var _requestApi = require("./request-api");
|
|
17
|
-
|
|
18
12
|
var _getLocale = require("../../../utils/getLocale");
|
|
19
13
|
|
|
20
|
-
require("
|
|
14
|
+
var _selectLayer = _interopRequireDefault(require("../../select-layer"));
|
|
15
|
+
|
|
16
|
+
require("./search-dropdown/index.css");
|
|
21
17
|
|
|
22
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
23
19
|
|
|
@@ -37,46 +33,51 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
37
33
|
|
|
38
34
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
39
35
|
|
|
40
|
-
|
|
36
|
+
function Relation(props) {
|
|
37
|
+
var onChange = props.onChange,
|
|
38
|
+
initValue = props.initValue;
|
|
41
39
|
|
|
42
|
-
var
|
|
43
|
-
var _useState = (0, _react.useState)([]),
|
|
40
|
+
var _useState = (0, _react.useState)((0, _getLocale.getLocale)("Pro_page_Plan_FullRange")),
|
|
44
41
|
_useState2 = _slicedToArray(_useState, 2),
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
var getData = function getData() {
|
|
49
|
-
(0, _requestApi.getDynamicTop)().then(function (res) {
|
|
50
|
-
if (res.Code === 1) {
|
|
51
|
-
setToppingData(res.Data);
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
}; // @ts-ignore
|
|
55
|
-
|
|
42
|
+
selectText = _useState2[0],
|
|
43
|
+
setSelectText = _useState2[1];
|
|
56
44
|
|
|
57
|
-
window.reFreshDynamicTopping = getData;
|
|
58
45
|
(0, _react.useEffect)(function () {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
46
|
+
if (initValue === 0) {
|
|
47
|
+
setSelectText((0, _getLocale.getLocale)("Pro_page_Plan_FullRange"));
|
|
48
|
+
}
|
|
49
|
+
}, [initValue]);
|
|
50
|
+
|
|
51
|
+
var onChangeHandler = function onChangeHandler(key) {
|
|
52
|
+
setSelectText(key.label);
|
|
53
|
+
onChange(key.value);
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
var selectOptions = [{
|
|
57
|
+
label: (0, _getLocale.getLocale)("Pro_page_Plan_FullRange"),
|
|
58
|
+
value: 0
|
|
59
|
+
}, {
|
|
60
|
+
label: (0, _getLocale.getLocale)("OKR_Menu_Title03_Owned"),
|
|
61
|
+
value: 1
|
|
62
|
+
}, {
|
|
63
|
+
label: (0, _getLocale.getLocale)("OKR_Menu_Title_Collaborator"),
|
|
64
|
+
value: 2
|
|
65
|
+
}, {
|
|
66
|
+
label: (0, _getLocale.getLocale)("Data_Idistributed"),
|
|
67
|
+
value: 3
|
|
68
|
+
}];
|
|
69
|
+
return /*#__PURE__*/_react["default"].createElement(_selectLayer["default"], {
|
|
70
|
+
onChangeSelect: onChangeHandler,
|
|
71
|
+
items: selectOptions,
|
|
72
|
+
initValue: initValue
|
|
64
73
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
65
|
-
className:
|
|
66
|
-
}, /*#__PURE__*/_react["default"].createElement("
|
|
67
|
-
className:
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
key: index,
|
|
75
|
-
refresh: getData,
|
|
76
|
-
data: item
|
|
77
|
-
});
|
|
78
|
-
}));
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
var _default = DynamicTop;
|
|
74
|
+
className: "titaui-search-dropdown"
|
|
75
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
76
|
+
className: "titaui-search-dropdown__text"
|
|
77
|
+
}, selectText), /*#__PURE__*/_react["default"].createElement("span", {
|
|
78
|
+
className: "tu-icon-sort-down"
|
|
79
|
+
})));
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
var _default = Relation;
|
|
82
83
|
exports["default"] = _default;
|
|
@@ -0,0 +1,87 @@
|
|
|
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 _selectLayer = _interopRequireDefault(require("../../select-layer"));
|
|
13
|
+
|
|
14
|
+
var _getLocale = require("../../../utils/getLocale");
|
|
15
|
+
|
|
16
|
+
require("./search-dropdown/index.css");
|
|
17
|
+
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
|
+
|
|
20
|
+
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); }
|
|
21
|
+
|
|
22
|
+
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
|
+
|
|
24
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
25
|
+
|
|
26
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
27
|
+
|
|
28
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
29
|
+
|
|
30
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
31
|
+
|
|
32
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
33
|
+
|
|
34
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
35
|
+
|
|
36
|
+
function TaskStatusSelect(props) {
|
|
37
|
+
var onChange = props.onChange,
|
|
38
|
+
initValue = props.initValue;
|
|
39
|
+
|
|
40
|
+
var _useState = (0, _react.useState)((0, _getLocale.getLocale)('OKR_MyO_E_From_AllStates')),
|
|
41
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
42
|
+
selectText = _useState2[0],
|
|
43
|
+
setSelectText = _useState2[1];
|
|
44
|
+
|
|
45
|
+
var onChangeHandler = function onChangeHandler(key) {
|
|
46
|
+
setSelectText(key.label);
|
|
47
|
+
onChange(key.value);
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
var selectOptions = [{
|
|
51
|
+
label: (0, _getLocale.getLocale)('OKR_MyO_E_From_AllStates'),
|
|
52
|
+
value: 10 //理应是不传
|
|
53
|
+
|
|
54
|
+
}, {
|
|
55
|
+
label: (0, _getLocale.getLocale)('Pro_page_Sta_Completed'),
|
|
56
|
+
value: 2
|
|
57
|
+
}, {
|
|
58
|
+
label: (0, _getLocale.getLocale)('Per_MyRe_text_Inprogress'),
|
|
59
|
+
value: 1
|
|
60
|
+
}, {
|
|
61
|
+
label: (0, _getLocale.getLocale)('OKR_MyO_E_From_Cancelled'),
|
|
62
|
+
value: 4
|
|
63
|
+
}, {
|
|
64
|
+
label: (0, _getLocale.getLocale)('OKR_MyO_E_From_Delayed'),
|
|
65
|
+
value: 3
|
|
66
|
+
}, {
|
|
67
|
+
label: (0, _getLocale.getLocale)('OKR_MyO_E_From_Suspended'),
|
|
68
|
+
value: 6
|
|
69
|
+
}, {
|
|
70
|
+
label: (0, _getLocale.getLocale)('OKR_MyO_E_From_NotStarted'),
|
|
71
|
+
value: 0
|
|
72
|
+
}];
|
|
73
|
+
return /*#__PURE__*/_react["default"].createElement(_selectLayer["default"], {
|
|
74
|
+
onChangeSelect: onChangeHandler,
|
|
75
|
+
items: selectOptions,
|
|
76
|
+
initValue: initValue
|
|
77
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
78
|
+
className: "titaui-search-dropdown"
|
|
79
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
80
|
+
className: "titaui-search-dropdown__text"
|
|
81
|
+
}, selectText), /*#__PURE__*/_react["default"].createElement("span", {
|
|
82
|
+
className: "tu-icon-sort-down"
|
|
83
|
+
})));
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
var _default = TaskStatusSelect;
|
|
87
|
+
exports["default"] = _default;
|
|
@@ -9,15 +9,11 @@ exports["default"] = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
var _requestApi = require("../request-api");
|
|
12
|
+
var _getLocale = require("../../../utils/getLocale");
|
|
15
13
|
|
|
16
|
-
var
|
|
14
|
+
var _selectLayer = _interopRequireDefault(require("../../select-layer"));
|
|
17
15
|
|
|
18
|
-
require("./index.css");
|
|
19
|
-
|
|
20
|
-
var _getLocale = require("../../../utils/getLocale");
|
|
16
|
+
require("./search-dropdown/index.css");
|
|
21
17
|
|
|
22
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
23
19
|
|
|
@@ -37,43 +33,51 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
37
33
|
|
|
38
34
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
39
35
|
|
|
40
|
-
|
|
36
|
+
function Relation(props) {
|
|
37
|
+
var onChange = props.onChange,
|
|
38
|
+
initValue = props.initValue;
|
|
41
39
|
|
|
42
|
-
var
|
|
43
|
-
var _useState = (0, _react.useState)([]),
|
|
40
|
+
var _useState = (0, _react.useState)((0, _getLocale.getLocale)("Pro_page_Plan_FullRange")),
|
|
44
41
|
_useState2 = _slicedToArray(_useState, 2),
|
|
45
|
-
|
|
46
|
-
|
|
42
|
+
selectText = _useState2[0],
|
|
43
|
+
setSelectText = _useState2[1];
|
|
47
44
|
|
|
48
45
|
(0, _react.useEffect)(function () {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
46
|
+
if (initValue === 0) {
|
|
47
|
+
setSelectText((0, _getLocale.getLocale)("Pro_page_Plan_FullRange"));
|
|
48
|
+
}
|
|
49
|
+
}, [initValue]);
|
|
50
|
+
|
|
51
|
+
var onChangeHandler = function onChangeHandler(key) {
|
|
52
|
+
setSelectText(key.label);
|
|
53
|
+
onChange(key.value);
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
var selectOptions = [{
|
|
57
|
+
label: (0, _getLocale.getLocale)("Pro_page_Plan_FullRange"),
|
|
58
|
+
value: 0
|
|
59
|
+
}, {
|
|
60
|
+
label: (0, _getLocale.getLocale)("OKR_MyO_Err_Owned"),
|
|
61
|
+
value: 1
|
|
62
|
+
}, {
|
|
63
|
+
label: (0, _getLocale.getLocale)("OKR_MyO_Err_Attended"),
|
|
64
|
+
value: 2
|
|
65
|
+
}, {
|
|
66
|
+
label: (0, _getLocale.getLocale)("OKR_MyO_Err_Fllowed"),
|
|
67
|
+
value: 3
|
|
68
|
+
}];
|
|
69
|
+
return /*#__PURE__*/_react["default"].createElement(_selectLayer["default"], {
|
|
70
|
+
onChangeSelect: onChangeHandler,
|
|
71
|
+
items: selectOptions,
|
|
72
|
+
initValue: initValue
|
|
60
73
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
61
|
-
className:
|
|
62
|
-
}, /*#__PURE__*/_react["default"].createElement("
|
|
63
|
-
className:
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
className: (0, _classnames["default"])("".concat(preCls, "__header-text"))
|
|
67
|
-
}, (0, _getLocale.getLocale)("Feed_Menu_Title_Likedynamic")))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
68
|
-
className: (0, _classnames["default"])("".concat(preCls, "__content"))
|
|
69
|
-
}, rankingData.map(function (item, index) {
|
|
70
|
-
if (index >= 5) return;
|
|
71
|
-
return /*#__PURE__*/_react["default"].createElement(_item["default"], {
|
|
72
|
-
key: index,
|
|
73
|
-
userInfo: item
|
|
74
|
-
});
|
|
74
|
+
className: "titaui-search-dropdown"
|
|
75
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
76
|
+
className: "titaui-search-dropdown__text"
|
|
77
|
+
}, selectText), /*#__PURE__*/_react["default"].createElement("span", {
|
|
78
|
+
className: "tu-icon-sort-down"
|
|
75
79
|
})));
|
|
76
|
-
}
|
|
80
|
+
}
|
|
77
81
|
|
|
78
|
-
var _default =
|
|
82
|
+
var _default = Relation;
|
|
79
83
|
exports["default"] = _default;
|
|
@@ -0,0 +1,74 @@
|
|
|
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 _selectLayer = _interopRequireDefault(require("../../select-layer"));
|
|
13
|
+
|
|
14
|
+
var _getLocale = require("../../../utils/getLocale");
|
|
15
|
+
|
|
16
|
+
require("./search-dropdown/index.css");
|
|
17
|
+
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
|
+
|
|
20
|
+
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); }
|
|
21
|
+
|
|
22
|
+
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
|
+
|
|
24
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
25
|
+
|
|
26
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
27
|
+
|
|
28
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
29
|
+
|
|
30
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
31
|
+
|
|
32
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
33
|
+
|
|
34
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
35
|
+
|
|
36
|
+
function TaskStatusSelect(props) {
|
|
37
|
+
var onChange = props.onChange,
|
|
38
|
+
initValue = props.initValue;
|
|
39
|
+
|
|
40
|
+
var _useState = (0, _react.useState)((0, _getLocale.getLocale)('OKR_MyO_E_From_AllStates')),
|
|
41
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
42
|
+
selectText = _useState2[0],
|
|
43
|
+
setSelectText = _useState2[1];
|
|
44
|
+
|
|
45
|
+
var onChangeHandler = function onChangeHandler(key) {
|
|
46
|
+
setSelectText(key.label);
|
|
47
|
+
onChange(key.value);
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
var selectOptions = [{
|
|
51
|
+
label: (0, _getLocale.getLocale)('OKR_MyO_E_From_AllStates'),
|
|
52
|
+
value: 0
|
|
53
|
+
}, {
|
|
54
|
+
label: (0, _getLocale.getLocale)('Pro_page_Sta_Completed'),
|
|
55
|
+
value: 2
|
|
56
|
+
}, {
|
|
57
|
+
label: (0, _getLocale.getLocale)('Per_MyRe_text_Inprogress'),
|
|
58
|
+
value: 1
|
|
59
|
+
}];
|
|
60
|
+
return /*#__PURE__*/_react["default"].createElement(_selectLayer["default"], {
|
|
61
|
+
onChangeSelect: onChangeHandler,
|
|
62
|
+
items: selectOptions,
|
|
63
|
+
initValue: initValue
|
|
64
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
65
|
+
className: "titaui-search-dropdown"
|
|
66
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
67
|
+
className: "titaui-search-dropdown__text"
|
|
68
|
+
}, selectText), /*#__PURE__*/_react["default"].createElement("span", {
|
|
69
|
+
className: "tu-icon-sort-down"
|
|
70
|
+
})));
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
var _default = TaskStatusSelect;
|
|
74
|
+
exports["default"] = _default;
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
font-size: 14px;
|
|
19
19
|
font-family: PingFangSC-Regular, PingFang SC;
|
|
20
20
|
font-weight: 400;
|
|
21
|
-
color: #
|
|
21
|
+
color: #ffffff;
|
|
22
22
|
line-height: 36px;
|
|
23
|
-
background: #
|
|
23
|
+
background: #2879ff;
|
|
24
24
|
border-radius: 4px;
|
|
25
25
|
}
|
|
26
26
|
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
overflow-y: scroll;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
.rel-category-tree__content .rc-tree-treenode {
|
|
46
|
+
.rel-category-tree__content .rc-tree-list .rc-tree-treenode {
|
|
47
47
|
margin-bottom: 8px;
|
|
48
48
|
padding-left: 28px;
|
|
49
49
|
}
|
|
@@ -23,6 +23,8 @@ 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
|
+
|
|
26
28
|
var _getLocale = require("../../../../utils/getLocale");
|
|
27
29
|
|
|
28
30
|
require("./index.css");
|
|
@@ -52,6 +54,18 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
52
54
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
53
55
|
|
|
54
56
|
function SearchForm(props) {
|
|
57
|
+
var _loginUser$UserAvatar, _loginUser$UserAvatar2, _loginUser$UserAvatar3;
|
|
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: loginUser === null || loginUser === void 0 ? void 0 : (_loginUser$UserAvatar2 = loginUser.UserAvatar) === null || _loginUser$UserAvatar2 === void 0 ? void 0 : _loginUser$UserAvatar2.Color,
|
|
66
|
+
hasAvatar: loginUser === null || loginUser === void 0 ? void 0 : (_loginUser$UserAvatar3 = loginUser.UserAvatar) === null || _loginUser$UserAvatar3 === void 0 ? void 0 : _loginUser$UserAvatar3.HasAvatar
|
|
67
|
+
}
|
|
68
|
+
};
|
|
55
69
|
var onChange = props.onChange;
|
|
56
70
|
|
|
57
71
|
var _useState = (0, _react.useState)({
|
|
@@ -69,7 +83,7 @@ function SearchForm(props) {
|
|
|
69
83
|
okrType = _useState4[0],
|
|
70
84
|
setOkrType = _useState4[1];
|
|
71
85
|
|
|
72
|
-
var _useState5 = (0, _react.useState)([]),
|
|
86
|
+
var _useState5 = (0, _react.useState)([user]),
|
|
73
87
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
74
88
|
users = _useState6[0],
|
|
75
89
|
setUsers = _useState6[1];
|
|
@@ -117,7 +131,7 @@ function SearchForm(props) {
|
|
|
117
131
|
className: "rel-okr-tree__search-item"
|
|
118
132
|
}, /*#__PURE__*/_react["default"].createElement(_principal["default"], {
|
|
119
133
|
onChange: setUsers,
|
|
120
|
-
initValue:
|
|
134
|
+
initValue: users,
|
|
121
135
|
setRelation: setRelation
|
|
122
136
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
123
137
|
className: "rel-okr-tree__search-item"
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|