@titaui/pc 1.12.13 → 1.12.16
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/communication/index.js +6 -0
- package/lib/components/drawer/index.css +9 -0
- package/lib/components/drawer/index.js +11 -8
- package/lib/components/dynamic/dynamic-item/index.js +9 -1
- package/lib/components/dynamic/dynamic-list/index.js +19 -2
- package/lib/components/form/form-fields/date/index.js +13 -13
- package/lib/components/help-card/image/liaojie1.svg +50 -0
- package/lib/components/help-card/index.css +4 -4
- package/lib/components/menus/export-modules/appraisal-menus/index.js +30 -12
- package/lib/components/menus/export-modules/appraisal-menus/menu-highlight.js +22 -6
- package/lib/components/menus/export-modules/appraisal-menus/menus.js +110 -9
- package/lib/components/menus/export-modules/okr-menus/menus.js +6 -3
- package/lib/components/nav-top/components/app-center/images/chart.svg +22 -0
- package/lib/components/nav-top/components/app-center/images/file.svg +20 -0
- package/lib/components/nav-top/components/app-center/images/interview.svg +20 -0
- package/lib/components/nav-top/components/app-center/images/learning.svg +23 -0
- package/lib/components/nav-top/components/app-center/images/okr.svg +22 -0
- package/lib/components/nav-top/components/app-center/images/performance.svg +22 -0
- package/lib/components/nav-top/components/app-center/images/plan.svg +22 -0
- package/lib/components/nav-top/components/app-center/images/project.svg +23 -0
- package/lib/components/nav-top/components/app-center/images/summary.svg +23 -0
- package/lib/components/nav-top/components/app-center/images/yuyue.png +0 -0
- package/lib/components/nav-top/components/app-center/index.css +170 -0
- package/lib/components/nav-top/components/app-center/index.js +211 -0
- package/lib/components/nav-top/components/app-center/interface.js +19 -0
- package/lib/components/nav-top/components/menu/index.js +2 -6
- package/lib/components/nav-top/components/user-message/images/bell-1.svg +13 -0
- package/lib/components/nav-top/components/user-message/index.js +21 -21
- package/lib/components/nav-top/images/app-center.png +0 -0
- package/lib/components/nav-top/images/home.svg +16 -0
- package/lib/components/nav-top/index.css +61 -8
- package/lib/components/nav-top/index.js +56 -35
- package/lib/components/nav-top/utils.js +464 -1
- package/lib/components/okr-detail/components/header/o-avatar.js +6 -0
- package/lib/components/okr-flow/export-modal/color.png +0 -0
- package/lib/components/okr-flow/export-modal/index.css +28 -13
- package/lib/components/okr-flow/export-modal/index.js +82 -34
- package/lib/components/okr-flow/export-modal/trans1.png +0 -0
- package/lib/components/order-have-award/img/award.png +0 -0
- package/lib/components/order-have-award/index.css +5 -0
- package/lib/components/order-have-award/index.js +83 -0
- package/lib/components/order-have-award/interface.js +19 -0
- package/lib/components/period-selector/components/button/style.js +1 -1
- package/lib/components/period-selector/index.css +1 -0
- package/lib/components/period-selector/index.js +7 -2
- package/lib/components/picker/components/panels/date-panel/date-body.js +19 -31
- package/lib/components/picker/components/panels/date-panel/date-head.js +8 -8
- package/lib/components/picker/components/panels/date-panel/index.js +1 -1
- package/lib/components/picker/components/panels/month-panel/index.css +0 -5
- package/lib/components/picker/components/panels/month-panel/index.js +2 -2
- package/lib/components/picker/components/panels/month-panel/month-body.js +5 -4
- package/lib/components/picker/components/panels/month-panel/month-head.js +1 -1
- package/lib/components/picker/components/panels/year-panel/index.css +0 -5
- package/lib/components/picker/components/panels/year-panel/index.js +1 -1
- package/lib/components/picker/components/panels/year-panel/year-body.js +3 -10
- package/lib/components/picker/components/picker-trigger/index.css +1 -6
- package/lib/components/picker/components/picker-trigger/index.js +11 -16
- package/lib/components/picker/context.js +2 -17
- package/lib/components/picker/index.css +1 -29
- package/lib/components/picker/index.js +0 -3
- package/lib/components/picker/picker-panels.js +64 -79
- package/lib/components/picker/picker.js +30 -44
- package/lib/components/picker/utils.js +11 -168
- package/lib/components/select-layer/index.js +22 -8
- package/lib/components/task-relation-modal/helper.js +1 -56
- package/lib/components/task-relation-modal/okr-relation/relation-task-model/search-form.js +1 -4
- package/lib/components/task-relation-modal/okr-relation/request-api.js +2 -6
- package/lib/components/task-relation-modal/request-api.js +5 -2
- package/lib/components/task-relation-modal/tree/work-tree/index.js +27 -31
- package/lib/components/task-relation-modal/tree/work-tree/search-form.js +22 -3
- package/lib/components/task-relation-modal/tree-node/work-node/index.js +11 -11
- package/lib/components/tooltip/tooltip.js +9 -4
- package/lib/components/user-selector/category-selector-panel/depart-tree.js +3 -1
- package/lib/components/user-selector/export-modules/field-tree-selector/index.css +11 -1
- package/lib/components/user-selector/export-modules/field-tree-selector/index.js +21 -3
- package/lib/components/user-selector/export-modules/multiple-user-selector--bak/index.css +1 -1
- package/lib/components/user-selector/request-apis.js +39 -9
- package/lib/components/user-selector/searched-panel/index.js +7 -1
- package/lib/pages/aha2021/index.css +7 -0
- package/lib/pages/aha2021/index.js +14 -8
- package/lib/pages/aha2021/new-menu-switcher/index.css +44 -0
- package/lib/pages/aha2021/new-menu-switcher/index.js +85 -0
- package/lib/pages/aha2021/new-menu-switcher/new-menu-bg.png +0 -0
- package/lib/pages/aha2021/request-api.js +15 -0
- package/lib/pages/okr-map/level2-search/user.js +1 -0
- package/package.json +1 -1
- package/lib/components/picker/components/cross.svg +0 -17
- package/lib/components/picker/range-picker/components/picker-trigger/index.css +0 -97
- package/lib/components/picker/range-picker/components/picker-trigger/index.js +0 -109
- package/lib/components/picker/range-picker/components/placeholder/index.js +0 -91
- package/lib/components/picker/range-picker/components/select-input/index.js +0 -72
- package/lib/components/picker/range-picker/components/shortcuts/index.js +0 -45
- package/lib/components/picker/range-picker/index.css +0 -158
- package/lib/components/picker/range-picker/index.js +0 -263
- package/lib/utils/planDataJson.js +0 -11115
|
@@ -3,183 +3,26 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
7
|
-
|
|
8
|
-
var _moment = _interopRequireDefault(require("moment"));
|
|
9
|
-
|
|
10
|
-
var _getLocale = require("../../utils/getLocale");
|
|
11
|
-
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
-
|
|
14
|
-
var PickerClass = 'tita-ui__picker';
|
|
6
|
+
exports.YEAR_DECADE_COUNT = exports.WEEK_DAYS_COUNT = exports.PickerTriggerClass = exports.PickerPanelClass = exports.PickerHeadClass = exports.PickerDropdownClass = exports.PickerClass = exports.PickerCellClass = exports.PickerBodyClass = exports.MONTHDATAMAPEN = exports.MONTHDATAMAP = void 0;
|
|
7
|
+
var PickerClass = "tita-ui__picker";
|
|
15
8
|
exports.PickerClass = PickerClass;
|
|
16
|
-
var PickerHeadClass =
|
|
9
|
+
var PickerHeadClass = "tita-ui__picker-head";
|
|
17
10
|
exports.PickerHeadClass = PickerHeadClass;
|
|
18
|
-
var PickerBodyClass =
|
|
11
|
+
var PickerBodyClass = "tita-ui__picker-body";
|
|
19
12
|
exports.PickerBodyClass = PickerBodyClass;
|
|
20
|
-
var PickerPanelClass =
|
|
13
|
+
var PickerPanelClass = "tita-ui__picker-panel";
|
|
21
14
|
exports.PickerPanelClass = PickerPanelClass;
|
|
22
|
-
var PickerCellClass =
|
|
15
|
+
var PickerCellClass = "tita-ui__picker-cell";
|
|
23
16
|
exports.PickerCellClass = PickerCellClass;
|
|
24
|
-
var PickerTriggerClass =
|
|
17
|
+
var PickerTriggerClass = "tita-ui__picker-trigger";
|
|
25
18
|
exports.PickerTriggerClass = PickerTriggerClass;
|
|
26
|
-
var PickerDropdownClass =
|
|
19
|
+
var PickerDropdownClass = "tita-ui__picker-dropdown";
|
|
27
20
|
exports.PickerDropdownClass = PickerDropdownClass;
|
|
28
|
-
var
|
|
29
|
-
exports.PickerRangesClass = PickerRangesClass;
|
|
30
|
-
var PickerRangeTriggerClass = 'tita-ui__picker-ranges-trigger';
|
|
31
|
-
exports.PickerRangeTriggerClass = PickerRangeTriggerClass;
|
|
32
|
-
var MONTHDATAMAP = ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'];
|
|
21
|
+
var MONTHDATAMAP = ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"];
|
|
33
22
|
exports.MONTHDATAMAP = MONTHDATAMAP;
|
|
34
|
-
var MONTHDATAMAPEN = [
|
|
23
|
+
var MONTHDATAMAPEN = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
|
|
35
24
|
exports.MONTHDATAMAPEN = MONTHDATAMAPEN;
|
|
36
25
|
var WEEK_DAYS_COUNT = 7;
|
|
37
26
|
exports.WEEK_DAYS_COUNT = WEEK_DAYS_COUNT;
|
|
38
27
|
var YEAR_DECADE_COUNT = 10;
|
|
39
|
-
exports.YEAR_DECADE_COUNT = YEAR_DECADE_COUNT;
|
|
40
|
-
var SHORTCUTS;
|
|
41
|
-
exports.SHORTCUTS = SHORTCUTS;
|
|
42
|
-
|
|
43
|
-
(function (SHORTCUTS) {
|
|
44
|
-
SHORTCUTS["CURRENT_YEAR"] = "currentYear";
|
|
45
|
-
SHORTCUTS["CURRENT_MONTH"] = "currentMonth";
|
|
46
|
-
SHORTCUTS["CURRENT_WEEK"] = "currentWeek";
|
|
47
|
-
SHORTCUTS["PREVIOUS_WEEK"] = "prevWeek";
|
|
48
|
-
SHORTCUTS["NEXT_WEEK"] = "nextWeek";
|
|
49
|
-
})(SHORTCUTS || (exports.SHORTCUTS = SHORTCUTS = {}));
|
|
50
|
-
|
|
51
|
-
var getCurrentValues = function getCurrentValues(symbol) {
|
|
52
|
-
return [(0, _moment["default"])().startOf(symbol), (0, _moment["default"])().endOf(symbol)];
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
exports.getCurrentValues = getCurrentValues;
|
|
56
|
-
|
|
57
|
-
var getPreviousValues = function getPreviousValues(symbol) {
|
|
58
|
-
return [(0, _moment["default"])().subtract(1, symbol).startOf(symbol), (0, _moment["default"])().subtract(1, symbol).endOf(symbol)];
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
exports.getPreviousValues = getPreviousValues;
|
|
62
|
-
|
|
63
|
-
var getNextValues = function getNextValues(symbol) {
|
|
64
|
-
return [(0, _moment["default"])().add(1, symbol).startOf(symbol), (0, _moment["default"])().add(1, symbol).endOf(symbol)];
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
exports.getNextValues = getNextValues;
|
|
68
|
-
var RangeSettingTypes;
|
|
69
|
-
exports.RangeSettingTypes = RangeSettingTypes;
|
|
70
|
-
|
|
71
|
-
(function (RangeSettingTypes) {
|
|
72
|
-
RangeSettingTypes["START"] = "startDate";
|
|
73
|
-
RangeSettingTypes["END"] = "endDate";
|
|
74
|
-
})(RangeSettingTypes || (exports.RangeSettingTypes = RangeSettingTypes = {}));
|
|
75
|
-
|
|
76
|
-
var RangePickerShortcutsKeysMapping = function RangePickerShortcutsKeysMapping() {
|
|
77
|
-
return [{
|
|
78
|
-
key: SHORTCUTS.CURRENT_YEAR,
|
|
79
|
-
title: (0, _getLocale.getLocale)('Feed_Tab_Title_Thisyear')
|
|
80
|
-
}, {
|
|
81
|
-
key: SHORTCUTS.CURRENT_MONTH,
|
|
82
|
-
title: (0, _getLocale.getLocale)('Feed_Tab_Title_Thismonth')
|
|
83
|
-
}, {
|
|
84
|
-
key: SHORTCUTS.CURRENT_WEEK,
|
|
85
|
-
title: (0, _getLocale.getLocale)('Feed_Tab_Title_Thisweek')
|
|
86
|
-
}];
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
exports.RangePickerShortcutsKeysMapping = RangePickerShortcutsKeysMapping;
|
|
90
|
-
|
|
91
|
-
var RangeWeekPickerShortcutsKeysMapping = function RangeWeekPickerShortcutsKeysMapping() {
|
|
92
|
-
return [{
|
|
93
|
-
key: SHORTCUTS.PREVIOUS_WEEK,
|
|
94
|
-
title: (0, _getLocale.getLocale)('Rep_NewS_LastWeek')
|
|
95
|
-
}, {
|
|
96
|
-
key: SHORTCUTS.CURRENT_WEEK,
|
|
97
|
-
title: (0, _getLocale.getLocale)('Feed_Tab_Title_Thisweek')
|
|
98
|
-
}, {
|
|
99
|
-
key: SHORTCUTS.NEXT_WEEK,
|
|
100
|
-
title: (0, _getLocale.getLocale)('Mod_NextWeek')
|
|
101
|
-
}];
|
|
102
|
-
};
|
|
103
|
-
|
|
104
|
-
exports.RangeWeekPickerShortcutsKeysMapping = RangeWeekPickerShortcutsKeysMapping;
|
|
105
|
-
|
|
106
|
-
var getPickerDateBySettingType = function getPickerDateBySettingType(params) {
|
|
107
|
-
var _params$defaultValue = params.defaultValue,
|
|
108
|
-
defaultValue = _params$defaultValue === void 0 ? (0, _moment["default"])() : _params$defaultValue,
|
|
109
|
-
_params$format = params.format,
|
|
110
|
-
format = _params$format === void 0 ? 'YYYY/MM/DD' : _params$format,
|
|
111
|
-
settingType = params.settingType,
|
|
112
|
-
values = params.values;
|
|
113
|
-
|
|
114
|
-
if (values instanceof Array && settingType) {
|
|
115
|
-
var valuesLen = values.length;
|
|
116
|
-
var startDate = values[0] || (0, _moment["default"])().format(format);
|
|
117
|
-
var endDate = values[valuesLen - 1] || (0, _moment["default"])().format(format);
|
|
118
|
-
return settingType === RangeSettingTypes.START ? startDate : endDate;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
return defaultValue;
|
|
122
|
-
};
|
|
123
|
-
|
|
124
|
-
exports.getPickerDateBySettingType = getPickerDateBySettingType;
|
|
125
|
-
|
|
126
|
-
var setPickerDateBySettingType = function setPickerDateBySettingType(params) {
|
|
127
|
-
var newDate = params.newDate,
|
|
128
|
-
settingType = params.settingType,
|
|
129
|
-
values = params.values;
|
|
130
|
-
|
|
131
|
-
if (values instanceof Array && settingType) {
|
|
132
|
-
var valuesClone = JSON.parse(JSON.stringify(values));
|
|
133
|
-
var isSettingStart = settingType === RangeSettingTypes.START;
|
|
134
|
-
var updateIndex = isSettingStart ? 0 : 1;
|
|
135
|
-
valuesClone.splice(updateIndex, 1, (0, _moment["default"])(newDate));
|
|
136
|
-
|
|
137
|
-
if (isSettingStart && (0, _moment["default"])(newDate, 'YYYY/MM/DD').isAfter((0, _moment["default"])(valuesClone[1]).format('YYYY/MM/DD'), 'date')) {
|
|
138
|
-
valuesClone[1] = (0, _moment["default"])(newDate);
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
if (!isSettingStart && (0, _moment["default"])(newDate, 'YYYY/MM/DD').isBefore((0, _moment["default"])(valuesClone[0]).format('YYYY/MM/DD'), 'date')) {
|
|
142
|
-
valuesClone[0] = (0, _moment["default"])(newDate);
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
return valuesClone.slice(0, 2);
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
return [(0, _moment["default"])(newDate)];
|
|
149
|
-
};
|
|
150
|
-
|
|
151
|
-
exports.setPickerDateBySettingType = setPickerDateBySettingType;
|
|
152
|
-
|
|
153
|
-
var isCurrentDateInRanges = function isCurrentDateInRanges(params) {
|
|
154
|
-
var _params$format2 = params.format,
|
|
155
|
-
format = _params$format2 === void 0 ? 'YYYY/MM/DD' : _params$format2,
|
|
156
|
-
nowDate = params.nowDate,
|
|
157
|
-
values = params.values;
|
|
158
|
-
var date = typeof nowDate === 'string' ? nowDate : nowDate.format(format);
|
|
159
|
-
var data = {
|
|
160
|
-
inRanges: false,
|
|
161
|
-
rangeStart: false,
|
|
162
|
-
rangeEnd: false
|
|
163
|
-
};
|
|
164
|
-
|
|
165
|
-
if (values instanceof Array) {
|
|
166
|
-
var valuesLen = values.length;
|
|
167
|
-
var startDate = values[0] || '';
|
|
168
|
-
var endDate = values[valuesLen - 1] || '';
|
|
169
|
-
if (!startDate || !endDate || valuesLen < 2) return data;
|
|
170
|
-
|
|
171
|
-
if ((0, _moment["default"])(date).isBetween((0, _moment["default"])(startDate).format(format), (0, _moment["default"])(endDate).format(format), null, '[]')) {
|
|
172
|
-
return {
|
|
173
|
-
inRanges: true,
|
|
174
|
-
rangeStart: (0, _moment["default"])(date).isSame((0, _moment["default"])(startDate).format(format)),
|
|
175
|
-
rangeEnd: (0, _moment["default"])(date).isSame((0, _moment["default"])(endDate).format(format))
|
|
176
|
-
};
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
return data;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
return data;
|
|
183
|
-
};
|
|
184
|
-
|
|
185
|
-
exports.isCurrentDateInRanges = isCurrentDateInRanges;
|
|
28
|
+
exports.YEAR_DECADE_COUNT = YEAR_DECADE_COUNT;
|
|
@@ -13,6 +13,8 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
13
13
|
|
|
14
14
|
var _popup = _interopRequireDefault(require("../popup"));
|
|
15
15
|
|
|
16
|
+
var _tooltip = _interopRequireDefault(require("../tooltip"));
|
|
17
|
+
|
|
16
18
|
var _getLocale = require("../../utils/getLocale");
|
|
17
19
|
|
|
18
20
|
require("./index.css");
|
|
@@ -42,7 +44,7 @@ var SelectLayer = function SelectLayer(props) {
|
|
|
42
44
|
onChangeSelect = props.onChangeSelect,
|
|
43
45
|
items = props.items,
|
|
44
46
|
_props$initText = props.initText,
|
|
45
|
-
initText = _props$initText === void 0 ? (0, _getLocale.getLocale)(
|
|
47
|
+
initText = _props$initText === void 0 ? (0, _getLocale.getLocale)('OKR_MyO_E_Temporarilynone') : _props$initText,
|
|
46
48
|
popupProps = props.popupProps,
|
|
47
49
|
renderPrefixIcon = props.renderPrefixIcon,
|
|
48
50
|
renderSuffixIcon = props.renderSuffixIcon,
|
|
@@ -82,13 +84,25 @@ var SelectLayer = function SelectLayer(props) {
|
|
|
82
84
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
83
85
|
className: "select-layout__layer-select-wrapper"
|
|
84
86
|
}, items.map(function (item, index) {
|
|
87
|
+
if (item.toolText) return /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
88
|
+
placement: "top",
|
|
89
|
+
overlay: item.toolText
|
|
90
|
+
}, /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
91
|
+
key: index,
|
|
92
|
+
onClick: function onClick(e) {
|
|
93
|
+
return handleSelectItem(item);
|
|
94
|
+
},
|
|
95
|
+
className: (0, _classnames["default"])('select-layout__layer-select-text', {
|
|
96
|
+
'select-layout__layer-select-text--active': selectItem && item.value === selectItem.value
|
|
97
|
+
})
|
|
98
|
+
}, item.label)));
|
|
85
99
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
86
100
|
key: index,
|
|
87
101
|
onClick: function onClick(e) {
|
|
88
102
|
return handleSelectItem(item);
|
|
89
103
|
},
|
|
90
|
-
className: (0, _classnames["default"])(
|
|
91
|
-
|
|
104
|
+
className: (0, _classnames["default"])('select-layout__layer-select-text', {
|
|
105
|
+
'select-layout__layer-select-text--active': selectItem && item.value === selectItem.value
|
|
92
106
|
})
|
|
93
107
|
}, item.label);
|
|
94
108
|
}));
|
|
@@ -113,9 +127,9 @@ var SelectLayer = function SelectLayer(props) {
|
|
|
113
127
|
}
|
|
114
128
|
|
|
115
129
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
116
|
-
className: (0, _classnames["default"])(
|
|
117
|
-
|
|
118
|
-
|
|
130
|
+
className: (0, _classnames["default"])('select-layout__layer-text', {
|
|
131
|
+
'select-layout__layer-text--focus': visible && canEdit,
|
|
132
|
+
'select-layout__layer-text--hidden-border': !canEdit
|
|
119
133
|
}),
|
|
120
134
|
onClick: handleClickText
|
|
121
135
|
}, renderPrefixIcon && /*#__PURE__*/_react["default"].createElement("span", {
|
|
@@ -136,7 +150,7 @@ var SelectLayer = function SelectLayer(props) {
|
|
|
136
150
|
// @ts-ignore
|
|
137
151
|
_react["default"].createElement(_popup["default"], _extends({
|
|
138
152
|
popupVisible: visible,
|
|
139
|
-
action: [
|
|
153
|
+
action: ['click'],
|
|
140
154
|
destroyPopupOnHide: true,
|
|
141
155
|
popup: renderSelection,
|
|
142
156
|
mask: false,
|
|
@@ -144,7 +158,7 @@ var SelectLayer = function SelectLayer(props) {
|
|
|
144
158
|
return popupRef.current;
|
|
145
159
|
},
|
|
146
160
|
popupStyle: {
|
|
147
|
-
width:
|
|
161
|
+
width: '100%'
|
|
148
162
|
}
|
|
149
163
|
}, popupProps, {
|
|
150
164
|
onPopupVisibleChange: function onPopupVisibleChange(visible) {
|
|
@@ -3,9 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.formatDateStr = void 0;
|
|
7
|
-
exports.formatPeriodPlanData = formatPeriodPlanData;
|
|
8
|
-
exports.lableTypeMap = exports.isOpenWorkManage = exports.isOpenOkrManage = exports.isOpenLabel = void 0;
|
|
6
|
+
exports.lableTypeMap = exports.isOpenWorkManage = exports.isOpenOkrManage = exports.isOpenLabel = exports.formatDateStr = void 0;
|
|
9
7
|
exports.momentDate = momentDate;
|
|
10
8
|
exports.workStatus = exports.timeFormat = exports.preCls = exports.okrStatus = void 0;
|
|
11
9
|
|
|
@@ -13,8 +11,6 @@ var _bsGlobal = require("../../utils/bs-global");
|
|
|
13
11
|
|
|
14
12
|
var _getLocale = require("../../utils/getLocale");
|
|
15
13
|
|
|
16
|
-
var _planDataJson = require("../../utils/planDataJson");
|
|
17
|
-
|
|
18
14
|
var preCls = "titaui-task-relation";
|
|
19
15
|
exports.preCls = preCls;
|
|
20
16
|
var isOpenOkrManage = (0, _bsGlobal.getAppHead)("113"); // 开通OKR
|
|
@@ -125,55 +121,4 @@ exports.workStatus = workStatus;
|
|
|
125
121
|
function momentDate(date) {
|
|
126
122
|
var reg = new RegExp('年|月|日', 'g');
|
|
127
123
|
return date.replace(reg, '/').slice(0, -1);
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
function formatPeriodPlanData(period) {
|
|
131
|
-
var planData; // 获取选取年份的 dataJSON
|
|
132
|
-
|
|
133
|
-
var yearGroup = (0, _planDataJson.PlanDataJson)().find(function (p) {
|
|
134
|
-
return p.GroupName == period.annualNum + '';
|
|
135
|
-
}); // 年份下的 ‘年/季’ data
|
|
136
|
-
|
|
137
|
-
var seasonData = yearGroup ? yearGroup.PlanTableListModels.find(function (item) {
|
|
138
|
-
return item.TagName == (0, _getLocale.getLocale)('Tasks_Menu_Yearseason');
|
|
139
|
-
}) : null;
|
|
140
|
-
|
|
141
|
-
switch (period.cycleType) {
|
|
142
|
-
// case '-1': // 全部周期
|
|
143
|
-
// break;
|
|
144
|
-
case '0':
|
|
145
|
-
planData = {
|
|
146
|
-
StartDate: period.startDate,
|
|
147
|
-
EndDate: period.endDate
|
|
148
|
-
};
|
|
149
|
-
break;
|
|
150
|
-
|
|
151
|
-
case '1':
|
|
152
|
-
// 年度
|
|
153
|
-
planData = seasonData ? seasonData.PlanTableModels[0] : null;
|
|
154
|
-
break;
|
|
155
|
-
|
|
156
|
-
case '2':
|
|
157
|
-
planData = seasonData ? seasonData.PlanTableModels[period.yqmNum] : null; // 季度
|
|
158
|
-
|
|
159
|
-
break;
|
|
160
|
-
|
|
161
|
-
case '3':
|
|
162
|
-
// @ts-ignore
|
|
163
|
-
var monthData = yearGroup ? yearGroup.PlanTableListModels.find(function (p) {
|
|
164
|
-
return p.TagName == period.yqmNum + '月';
|
|
165
|
-
}) : null;
|
|
166
|
-
planData = monthData ? monthData.PlanTableModels[0] : null;
|
|
167
|
-
break;
|
|
168
|
-
|
|
169
|
-
default:
|
|
170
|
-
break;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
return {
|
|
174
|
-
endDate: planData ? period.cycleType == '0' ? planData.EndDate : momentDate(planData.EndDate || '') : '',
|
|
175
|
-
planTableId: planData && planData.PlanTableId,
|
|
176
|
-
planTableType: planData && planData.PlanTableType,
|
|
177
|
-
startDate: planData ? period.cycleType == '0' ? planData.StartDate : momentDate(planData.StartDate || '') : ''
|
|
178
|
-
};
|
|
179
124
|
}
|
|
@@ -21,8 +21,6 @@ var _taskStatusSelect = _interopRequireDefault(require("../../search/task-status
|
|
|
21
21
|
|
|
22
22
|
var _taskRelation = _interopRequireDefault(require("../../search/task-relation"));
|
|
23
23
|
|
|
24
|
-
var _helper = require("../../helper");
|
|
25
|
-
|
|
26
24
|
var _formatTime = require("../../../../utils/format-time");
|
|
27
25
|
|
|
28
26
|
var _getLocale = require("../../../../utils/getLocale");
|
|
@@ -85,12 +83,11 @@ function SearchForm(props) {
|
|
|
85
83
|
|
|
86
84
|
var dilagRef = (0, _react.useRef)(document.createElement('div'));
|
|
87
85
|
(0, _react.useEffect)(function () {
|
|
88
|
-
var planCycle = (0, _helper.formatPeriodPlanData)(cycle);
|
|
89
86
|
onChange(_objectSpread({
|
|
90
87
|
status: status,
|
|
91
88
|
keyWords: keyWords,
|
|
92
89
|
relation: relation
|
|
93
|
-
},
|
|
90
|
+
}, cycle));
|
|
94
91
|
}, [status, keyWords, cycle, relation]);
|
|
95
92
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
96
93
|
ref: dilagRef
|
|
@@ -32,10 +32,6 @@ var planTableTask = function planTableTask(params, pageNum, pageSize) {
|
|
|
32
32
|
keyWords = _params$keyWords === void 0 ? '' : _params$keyWords,
|
|
33
33
|
_params$status = params.status,
|
|
34
34
|
status = _params$status === void 0 ? 10 : _params$status,
|
|
35
|
-
_params$planTableId = params.planTableId,
|
|
36
|
-
planTableId = _params$planTableId === void 0 ? '' : _params$planTableId,
|
|
37
|
-
_params$planTableType = params.planTableType,
|
|
38
|
-
planTableType = _params$planTableType === void 0 ? '' : _params$planTableType,
|
|
39
35
|
_params$relation = params.relation,
|
|
40
36
|
relation = _params$relation === void 0 ? 0 : _params$relation;
|
|
41
37
|
|
|
@@ -54,8 +50,8 @@ var planTableTask = function planTableTask(params, pageNum, pageSize) {
|
|
|
54
50
|
EndDate: endDate,
|
|
55
51
|
startNum: pageNum,
|
|
56
52
|
count: pageSize,
|
|
57
|
-
planTableId: planTableId,
|
|
58
|
-
planTableType: planTableType,
|
|
53
|
+
// planTableId: planTableId,
|
|
54
|
+
// planTableType: planTableType,
|
|
59
55
|
fromLevel: 1,
|
|
60
56
|
toLevel: 1,
|
|
61
57
|
RelationType: relation,
|
|
@@ -90,7 +90,9 @@ var workData = function workData(params, pageNum, pageSize) {
|
|
|
90
90
|
status = _params$status === void 0 ? 0 : _params$status,
|
|
91
91
|
_params$relation = params.relation,
|
|
92
92
|
relation = _params$relation === void 0 ? 0 : _params$relation,
|
|
93
|
-
userIds = params.userIds
|
|
93
|
+
userIds = params.userIds,
|
|
94
|
+
_params$isGetMileston = params.isGetMilestone,
|
|
95
|
+
isGetMilestone = _params$isGetMileston === void 0 ? false : _params$isGetMileston;
|
|
94
96
|
var url = "work/list?toUserId=".concat(userIds || (0, _helpers.getLoginUserInfo)().Id);
|
|
95
97
|
return (0, _request.rpost)("v1")(url, {
|
|
96
98
|
keyWords: keyWords,
|
|
@@ -99,7 +101,8 @@ var workData = function workData(params, pageNum, pageSize) {
|
|
|
99
101
|
pageSize: pageSize,
|
|
100
102
|
relation: relation,
|
|
101
103
|
status: status,
|
|
102
|
-
userIds: userIds
|
|
104
|
+
userIds: userIds,
|
|
105
|
+
isGetMilestone: isGetMilestone
|
|
103
106
|
}).then(function (res) {
|
|
104
107
|
return res;
|
|
105
108
|
});
|
|
@@ -57,7 +57,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
57
57
|
|
|
58
58
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
59
59
|
|
|
60
|
-
var precls =
|
|
60
|
+
var precls = 'rel-work-tree';
|
|
61
61
|
|
|
62
62
|
function WorkTree() {
|
|
63
63
|
var _useContext = (0, _react.useContext)(_context2.Context),
|
|
@@ -105,7 +105,7 @@ function WorkTree() {
|
|
|
105
105
|
isScorll = _useState16[0],
|
|
106
106
|
setIsScorll = _useState16[1];
|
|
107
107
|
|
|
108
|
-
var contentRef = (0, _react.useRef)(document.createElement(
|
|
108
|
+
var contentRef = (0, _react.useRef)(document.createElement('div'));
|
|
109
109
|
var timer = null;
|
|
110
110
|
|
|
111
111
|
var setScorll = function setScorll(e) {
|
|
@@ -119,11 +119,11 @@ function WorkTree() {
|
|
|
119
119
|
|
|
120
120
|
(0, _react.useEffect)(function () {
|
|
121
121
|
if (contentRef.current) {
|
|
122
|
-
contentRef.current.addEventListener(
|
|
122
|
+
contentRef.current.addEventListener('scroll', setScorll, true);
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
return function () {
|
|
126
|
-
contentRef.current && contentRef.current.removeEventListener(
|
|
126
|
+
contentRef.current && contentRef.current.removeEventListener('scroll', setScorll, true);
|
|
127
127
|
};
|
|
128
128
|
}, [treeNodes]);
|
|
129
129
|
|
|
@@ -132,12 +132,12 @@ function WorkTree() {
|
|
|
132
132
|
var checked = !!selected.find(function (i) {
|
|
133
133
|
return i.id == "mileStoneId-".concat(item.mileStoneId);
|
|
134
134
|
});
|
|
135
|
-
item.workName = work.
|
|
135
|
+
item.workName = work.workName;
|
|
136
136
|
return {
|
|
137
137
|
key: "mileStoneId-".concat(item.mileStoneId),
|
|
138
|
-
nodeType:
|
|
138
|
+
nodeType: 'milestone',
|
|
139
139
|
data: item,
|
|
140
|
-
title:
|
|
140
|
+
title: '',
|
|
141
141
|
checked: checked,
|
|
142
142
|
index: key + 1,
|
|
143
143
|
disabled: !checked && selectedRoots.includes(item.workId)
|
|
@@ -147,47 +147,43 @@ function WorkTree() {
|
|
|
147
147
|
|
|
148
148
|
var transToTreeNode = function transToTreeNode(arr) {
|
|
149
149
|
return arr.map(function (item, _key) {
|
|
150
|
-
var _item$
|
|
151
|
-
|
|
150
|
+
var _item$workMileStones = item.workMileStones,
|
|
151
|
+
workMileStones = _item$workMileStones === void 0 ? [] : _item$workMileStones;
|
|
152
152
|
var checked = !!selected.find(function (i) {
|
|
153
|
-
return i.id == item.
|
|
153
|
+
return i.id == item.workId;
|
|
154
154
|
});
|
|
155
155
|
return {
|
|
156
|
-
key: item.
|
|
157
|
-
nodeType:
|
|
158
|
-
title:
|
|
159
|
-
children: formatKrNodes(
|
|
156
|
+
key: item.workId,
|
|
157
|
+
nodeType: 'work-node',
|
|
158
|
+
title: '',
|
|
159
|
+
children: formatKrNodes(workMileStones || [], item),
|
|
160
160
|
data: item,
|
|
161
161
|
checked: checked,
|
|
162
|
-
disabled: !checked && selectedRoots.includes(item.
|
|
162
|
+
disabled: !checked && selectedRoots.includes(item.workId)
|
|
163
163
|
};
|
|
164
164
|
});
|
|
165
165
|
};
|
|
166
166
|
|
|
167
167
|
var getTreeNodes = /*#__PURE__*/function () {
|
|
168
168
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
169
|
-
var
|
|
169
|
+
var res, _res$Data, _res$Data$works, works, _res$Data$total, total;
|
|
170
170
|
|
|
171
171
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
172
172
|
while (1) {
|
|
173
173
|
switch (_context.prev = _context.next) {
|
|
174
174
|
case 0:
|
|
175
175
|
_context.next = 2;
|
|
176
|
-
return (0, _requestApi.
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
}, query));
|
|
176
|
+
return (0, _requestApi.workData)(_objectSpread({
|
|
177
|
+
isGetMilestone: true
|
|
178
|
+
}, query), pageNum, pageSize);
|
|
180
179
|
|
|
181
180
|
case 2:
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
works = _yield$getWorks$works === void 0 ? [] : _yield$getWorks$works;
|
|
185
|
-
_yield$getWorks$total = _yield$getWorks.total;
|
|
186
|
-
total = _yield$getWorks$total === void 0 ? 0 : _yield$getWorks$total;
|
|
181
|
+
res = _context.sent;
|
|
182
|
+
_res$Data = res.Data, _res$Data$works = _res$Data.works, works = _res$Data$works === void 0 ? [] : _res$Data$works, _res$Data$total = _res$Data.total, total = _res$Data$total === void 0 ? 0 : _res$Data$total;
|
|
187
183
|
setWorks(works || []);
|
|
188
184
|
setTotal(total);
|
|
189
185
|
|
|
190
|
-
case
|
|
186
|
+
case 6:
|
|
191
187
|
case "end":
|
|
192
188
|
return _context.stop();
|
|
193
189
|
}
|
|
@@ -224,17 +220,17 @@ function WorkTree() {
|
|
|
224
220
|
onChange: onQueryChangeHandler
|
|
225
221
|
}), treeNodes.length == 0 && /*#__PURE__*/_react["default"].createElement("div", {
|
|
226
222
|
className: "".concat(precls, "__empty")
|
|
227
|
-
}, (0, _getLocale.getLocale)(
|
|
223
|
+
}, (0, _getLocale.getLocale)('Tasks_Tab_MyS_Noprojectilable')), treeNodes.length > 0 && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
228
224
|
className: "".concat(precls, "__header")
|
|
229
225
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
230
226
|
className: "".concat(precls, "__header-obj")
|
|
231
|
-
}, (0, _getLocale.getLocale)(
|
|
227
|
+
}, (0, _getLocale.getLocale)('Pro_detail_AssociatedObject')), /*#__PURE__*/_react["default"].createElement("span", {
|
|
232
228
|
className: "".concat(precls, "__header-status")
|
|
233
|
-
}, (0, _getLocale.getLocale)(
|
|
229
|
+
}, (0, _getLocale.getLocale)('Mod_States')), /*#__PURE__*/_react["default"].createElement("span", {
|
|
234
230
|
className: "".concat(precls, "__header-principle")
|
|
235
|
-
}, (0, _getLocale.getLocale)(
|
|
231
|
+
}, (0, _getLocale.getLocale)('Mod_Owner')), /*#__PURE__*/_react["default"].createElement("span", {
|
|
236
232
|
className: "".concat(precls, "__header-time")
|
|
237
|
-
}, (0, _getLocale.getLocale)(
|
|
233
|
+
}, (0, _getLocale.getLocale)('Mod_Startendtime'))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
238
234
|
className: "".concat(precls, "__content"),
|
|
239
235
|
ref: contentRef
|
|
240
236
|
}, /*#__PURE__*/_react["default"].createElement(_tree["default"], {
|
|
@@ -17,10 +17,14 @@ var _okrStatusSelect = _interopRequireDefault(require("../../search/okr-status-s
|
|
|
17
17
|
|
|
18
18
|
var _principal = _interopRequireDefault(require("../../search/principal"));
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _helpers = require("../../../../utils/helpers");
|
|
21
|
+
|
|
22
|
+
var _workRelation = _interopRequireDefault(require("../../search/work-relation"));
|
|
21
23
|
|
|
22
24
|
require("./index.css");
|
|
23
25
|
|
|
26
|
+
var _loginUser$UserAvatar;
|
|
27
|
+
|
|
24
28
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
25
29
|
|
|
26
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); }
|
|
@@ -39,6 +43,16 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
39
43
|
|
|
40
44
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
41
45
|
|
|
46
|
+
var loginUser = (0, _helpers.getLoginUserInfo)();
|
|
47
|
+
var user = {
|
|
48
|
+
userId: loginUser.Id,
|
|
49
|
+
name: loginUser.Name,
|
|
50
|
+
avatar: {
|
|
51
|
+
original: loginUser === null || loginUser === void 0 ? void 0 : (_loginUser$UserAvatar = loginUser.UserAvatar) === null || _loginUser$UserAvatar === void 0 ? void 0 : _loginUser$UserAvatar.Original,
|
|
52
|
+
color: '#bc97eb'
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
|
|
42
56
|
function SearchForm(props) {
|
|
43
57
|
var onChange = props.onChange;
|
|
44
58
|
|
|
@@ -62,6 +76,10 @@ function SearchForm(props) {
|
|
|
62
76
|
relation = _useState8[0],
|
|
63
77
|
setRelation = _useState8[1];
|
|
64
78
|
|
|
79
|
+
var _useState9 = (0, _react.useState)([user]),
|
|
80
|
+
_useState10 = _slicedToArray(_useState9, 1),
|
|
81
|
+
initPerson = _useState10[0];
|
|
82
|
+
|
|
65
83
|
(0, _react.useEffect)(function () {
|
|
66
84
|
onChange({
|
|
67
85
|
status: okrStatus,
|
|
@@ -80,13 +98,14 @@ function SearchForm(props) {
|
|
|
80
98
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
81
99
|
className: "rel-work-tree__search-item"
|
|
82
100
|
}, /*#__PURE__*/_react["default"].createElement(_principal["default"], {
|
|
101
|
+
multiple: false,
|
|
83
102
|
onChange: setUsers,
|
|
84
103
|
position: "bottomLeft",
|
|
85
|
-
initValue:
|
|
104
|
+
initValue: initPerson,
|
|
86
105
|
setRelation: setRelation
|
|
87
106
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
88
107
|
className: "rel-okr-tree__search-item"
|
|
89
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
108
|
+
}, /*#__PURE__*/_react["default"].createElement(_workRelation["default"], {
|
|
90
109
|
onChange: setRelation,
|
|
91
110
|
initValue: relation
|
|
92
111
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|