@titaui/pc 1.12.26-beta.1 → 1.12.26-beta.4
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/avatar/default.js +5 -2
- package/lib/components/avatar/index.css +2 -0
- package/lib/components/drop-selector/index.js +7 -4
- package/lib/components/dynamic/dynamic-item/components/okr-progress/index.css +4 -0
- package/lib/components/dynamic/dynamic-item/components/okr-progress/index.js +6 -2
- package/lib/components/dynamic/dynamic-item/components/summary-header/index.js +3 -0
- package/lib/components/dynamic/dynamic-item/components/table-row-o-project/index.css +6 -0
- package/lib/components/dynamic/dynamic-item/components/table-row-o-project/index.js +16 -13
- package/lib/components/dynamic/dynamic-item/components/task-progress/index.css +8 -4
- package/lib/components/dynamic/dynamic-item/components/task-progress/index.js +5 -7
- package/lib/components/dynamic/dynamic-item/components/task-progress/render-row.js +2 -5
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/index.css +4 -1
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/index.js +54 -81
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/remind-user-view/index.css +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/constant.js +12 -5
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/index.css +4 -56
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/index.js +23 -14
- package/lib/components/dynamic/dynamic-item/index.css +1 -1
- package/lib/components/guide-tip/index.css +22 -2
- package/lib/components/guide-tip/index.js +10 -3
- package/lib/components/import-modal/helper.js +1 -1
- package/lib/components/import-modal/tree/okr-tree/index.js +5 -15
- package/lib/components/menus/export-modules/summary-menus/depart-menus/index.js +7 -6
- package/lib/components/picker/components/panels/week-panel/index.css +10 -1
- package/lib/components/picker/components/panels/week-panel/index.js +14 -4
- package/lib/components/picker/components/panels/week-panel/week-body.js +13 -13
- package/lib/components/picker/components/panels/week-panel/week-head.js +1 -3
- package/lib/components/picker/picker-panels.js +14 -5
- package/lib/components/picker/picker.js +1 -1
- package/lib/components/rich-editor-at/index.css +1 -1
- package/package.json +2 -2
|
@@ -96,7 +96,9 @@ var Avatar = function Avatar(props) {
|
|
|
96
96
|
style: {
|
|
97
97
|
width: size.width,
|
|
98
98
|
height: size.width,
|
|
99
|
-
verticalAlign: "top"
|
|
99
|
+
verticalAlign: "top",
|
|
100
|
+
borderRadius: '50%',
|
|
101
|
+
overflow: 'hidden'
|
|
100
102
|
},
|
|
101
103
|
src: src
|
|
102
104
|
});
|
|
@@ -119,7 +121,8 @@ var Avatar = function Avatar(props) {
|
|
|
119
121
|
overflow: "hidden",
|
|
120
122
|
whiteSpace: "nowrap",
|
|
121
123
|
fontSize: "".concat(size.fontSize, "px"),
|
|
122
|
-
lineHeight: "".concat(size.width, "px")
|
|
124
|
+
lineHeight: "".concat(size.width, "px"),
|
|
125
|
+
borderRadius: '50%'
|
|
123
126
|
}
|
|
124
127
|
}, /*#__PURE__*/_react["default"].createElement(_openData.OpenUserName, {
|
|
125
128
|
name: name,
|
|
@@ -23,7 +23,7 @@ require("./index.css");
|
|
|
23
23
|
var _iconItem = _interopRequireDefault(require("./icon-item"));
|
|
24
24
|
|
|
25
25
|
var _excluded = ["name", "multi", "children", "onClick", "className"],
|
|
26
|
-
_excluded2 = ["trigger", "triggerIcon", "destroyPopupOnHide", "popupPlacement", "hideOnChange", "onChange", "canEdit", "popAction", "onPopupVisibleChange"];
|
|
26
|
+
_excluded2 = ["trigger", "triggerIcon", "destroyPopupOnHide", "popupPlacement", "hideOnChange", "onChange", "canEdit", "popAction", "onPopupVisibleChange", "popupProps"];
|
|
27
27
|
|
|
28
28
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
29
29
|
|
|
@@ -142,6 +142,8 @@ function DropSelector(props) {
|
|
|
142
142
|
_props$popAction = props.popAction,
|
|
143
143
|
popAction = _props$popAction === void 0 ? ['click'] : _props$popAction,
|
|
144
144
|
onPopupVisibleChange = props.onPopupVisibleChange,
|
|
145
|
+
_props$popupProps = props.popupProps,
|
|
146
|
+
popupProps = _props$popupProps === void 0 ? {} : _props$popupProps,
|
|
145
147
|
restProps = _objectWithoutProperties(props, _excluded2);
|
|
146
148
|
|
|
147
149
|
var _useState3 = (0, _react.useState)(false),
|
|
@@ -175,16 +177,17 @@ function DropSelector(props) {
|
|
|
175
177
|
}
|
|
176
178
|
};
|
|
177
179
|
|
|
178
|
-
return /*#__PURE__*/_react["default"].createElement(_popup["default"], {
|
|
180
|
+
return /*#__PURE__*/_react["default"].createElement(_popup["default"], _extends({
|
|
179
181
|
popupVisible: canEdit && realVisible,
|
|
180
182
|
popupPlacement: popupPlacement,
|
|
181
183
|
onPopupVisibleChange: handlePopVisibleChange,
|
|
182
184
|
destroyPopupOnHide: destroyPopupOnHide,
|
|
183
|
-
action: popAction
|
|
185
|
+
action: popAction
|
|
186
|
+
}, popupProps, {
|
|
184
187
|
popup: /*#__PURE__*/_react["default"].createElement(DropSelectorLayer, _extends({}, restProps, {
|
|
185
188
|
onItemClick: onMenuClickHandler
|
|
186
189
|
}))
|
|
187
|
-
}, trigger);
|
|
190
|
+
}), trigger);
|
|
188
191
|
}
|
|
189
192
|
|
|
190
193
|
DropSelector.IconItem = IconItem;
|
|
@@ -59,6 +59,7 @@ var OkrProgress = function OkrProgress(_ref) {
|
|
|
59
59
|
rowsData = _useState2[0],
|
|
60
60
|
setRowsData = _useState2[1];
|
|
61
61
|
|
|
62
|
+
var krOrder = 0;
|
|
62
63
|
var renderTable = (0, _react.useMemo)(function () {
|
|
63
64
|
return /*#__PURE__*/_react["default"].createElement("table", null, /*#__PURE__*/_react["default"].createElement("thead", null, /*#__PURE__*/_react["default"].createElement("tr", {
|
|
64
65
|
className: "".concat(prefix, "__table-title")
|
|
@@ -78,8 +79,9 @@ var OkrProgress = function OkrProgress(_ref) {
|
|
|
78
79
|
}
|
|
79
80
|
}, /*#__PURE__*/_react["default"].createElement("i", {
|
|
80
81
|
className: "tu-icon-wiki ".concat(prefix, "__table-title-progress-desc-icon")
|
|
81
|
-
}))))), /*#__PURE__*/_react["default"].createElement("tbody", null, rowsData && rowsData.Rows.map(function (item) {
|
|
82
|
+
}))))), /*#__PURE__*/_react["default"].createElement("tbody", null, rowsData && rowsData.Rows.map(function (item, index) {
|
|
82
83
|
if (item.Type === _constant.OkrType.OType) {
|
|
84
|
+
krOrder = 0;
|
|
83
85
|
return /*#__PURE__*/_react["default"].createElement("tr", null, /*#__PURE__*/_react["default"].createElement("td", null, /*#__PURE__*/_react["default"].createElement(_tableRowOkr["default"], {
|
|
84
86
|
text: "".concat(item.Name),
|
|
85
87
|
isO: true,
|
|
@@ -94,11 +96,13 @@ var OkrProgress = function OkrProgress(_ref) {
|
|
|
94
96
|
id: item.Id
|
|
95
97
|
})));
|
|
96
98
|
} else if (item.Type === _constant.OkrType.KRType) {
|
|
99
|
+
krOrder += 1;
|
|
97
100
|
return /*#__PURE__*/_react["default"].createElement("tr", null, /*#__PURE__*/_react["default"].createElement("td", null, /*#__PURE__*/_react["default"].createElement(_tableRowOkr["default"], {
|
|
98
101
|
text: "".concat(item.Name),
|
|
99
102
|
isO: false,
|
|
100
103
|
isFirstLevel: false,
|
|
101
|
-
id: item.Id
|
|
104
|
+
id: item.Id,
|
|
105
|
+
order: krOrder
|
|
102
106
|
})), /*#__PURE__*/_react["default"].createElement("td", null, /*#__PURE__*/_react["default"].createElement(_progress["default"], {
|
|
103
107
|
type: "kr",
|
|
104
108
|
status: _constant.OkrRiskMapping[item.Status],
|
|
@@ -364,6 +364,9 @@ var DynamicItemHeader = function DynamicItemHeader(_ref) {
|
|
|
364
364
|
onChange: onChangeHandler,
|
|
365
365
|
multi: false,
|
|
366
366
|
visible: selectVisible,
|
|
367
|
+
popupProps: {
|
|
368
|
+
zIndex: 1000
|
|
369
|
+
},
|
|
367
370
|
trigger: /*#__PURE__*/_react["default"].createElement("span", {
|
|
368
371
|
className: (0, _classnames["default"])("".concat(prefix, "-right"), 'tu-icon-more1'),
|
|
369
372
|
onClick: handleShowDropSelector
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
word-break: keep-all;
|
|
6
6
|
white-space: nowrap;
|
|
7
7
|
color: #89919F;
|
|
8
|
+
padding: 8px 0;
|
|
8
9
|
}
|
|
9
10
|
|
|
10
11
|
.titaui-dynamic-summary-table-row-o-project:hover {
|
|
@@ -22,3 +23,8 @@
|
|
|
22
23
|
font-size: 12px;
|
|
23
24
|
margin-left: 4px;
|
|
24
25
|
}
|
|
26
|
+
|
|
27
|
+
.titaui-dynamic-summary-table-row-o-project--disable:hover {
|
|
28
|
+
cursor: default;
|
|
29
|
+
color: #89919F;
|
|
30
|
+
}
|
|
@@ -7,6 +7,8 @@ exports["default"] = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
10
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
+
|
|
10
12
|
var _tooltip = _interopRequireDefault(require("../../../../tooltip"));
|
|
11
13
|
|
|
12
14
|
var _drawerManager = _interopRequireDefault(require("../../../../drawer-manager"));
|
|
@@ -15,36 +17,37 @@ require("./index.css");
|
|
|
15
17
|
|
|
16
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
19
|
|
|
18
|
-
|
|
20
|
+
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; }
|
|
21
|
+
|
|
22
|
+
var prefix = 'titaui-dynamic-summary-table-row-o-project';
|
|
19
23
|
|
|
20
24
|
var TableRowOProject = function TableRowOProject(_ref) {
|
|
21
|
-
var
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
text = _ref.text,
|
|
25
|
+
var _classNames2;
|
|
26
|
+
|
|
27
|
+
var data = _ref.data,
|
|
25
28
|
_ref$extraClass = _ref.extraClass,
|
|
26
29
|
extraClass = _ref$extraClass === void 0 ? '' : _ref$extraClass;
|
|
27
30
|
|
|
28
31
|
var handleTitleClick = function handleTitleClick() {
|
|
29
|
-
if (
|
|
30
|
-
_drawerManager["default"].open(
|
|
31
|
-
okrId:
|
|
32
|
+
if (data.ParentObjType === 62) {
|
|
33
|
+
_drawerManager["default"].open('okrDetail', {
|
|
34
|
+
okrId: data.Id
|
|
32
35
|
});
|
|
33
|
-
} else {
|
|
34
|
-
window.open(window.location.href.replace(window.location.hash, "#work?iTalentNavCode=tita-work&work_id=".concat(
|
|
36
|
+
} else if (data.ParentObjType === 4) {
|
|
37
|
+
window.open(window.location.href.replace(window.location.hash, "#work?iTalentNavCode=tita-work&work_id=".concat(data.Id)));
|
|
35
38
|
}
|
|
36
39
|
};
|
|
37
40
|
|
|
38
41
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
39
|
-
className: "".concat(prefix, " ").concat(extraClass),
|
|
42
|
+
className: (0, _classnames["default"])("".concat(prefix, " ").concat(extraClass), _defineProperty({}, "".concat(prefix, "--disable"), data.Id === -1)),
|
|
40
43
|
onClick: handleTitleClick
|
|
41
44
|
}, /*#__PURE__*/_react["default"].createElement("i", {
|
|
42
|
-
className: "".concat(prefix, "__icon
|
|
45
|
+
className: (0, _classnames["default"])("".concat(prefix, "__icon"), (_classNames2 = {}, _defineProperty(_classNames2, "tu-icon-H5-O-s", data.ParentObjType === 62), _defineProperty(_classNames2, "tu-icon-project-s", data.ParentObjType === 4), _classNames2))
|
|
43
46
|
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
44
47
|
className: "".concat(prefix, "__text")
|
|
45
48
|
}, /*#__PURE__*/_react["default"].createElement(_tooltip["default"].Text, {
|
|
46
49
|
isPercent: true,
|
|
47
|
-
text:
|
|
50
|
+
text: data.Name
|
|
48
51
|
})));
|
|
49
52
|
};
|
|
50
53
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
.titaui-dynamic-summary-task-progress {
|
|
2
|
-
|
|
2
|
+
padding: 12px 0;
|
|
3
3
|
}
|
|
4
4
|
|
|
5
5
|
.titaui-dynamic-summary-task-progress__title {
|
|
@@ -48,7 +48,6 @@
|
|
|
48
48
|
padding: 0 8px;
|
|
49
49
|
height: 20px;
|
|
50
50
|
display: inline-flex;
|
|
51
|
-
align-items: center;
|
|
52
51
|
font-size: 12px;
|
|
53
52
|
color: #3f4755;
|
|
54
53
|
line-height: 18px;
|
|
@@ -56,9 +55,8 @@
|
|
|
56
55
|
}
|
|
57
56
|
|
|
58
57
|
.titaui-dynamic-summary-task-progress__table-row-title-worktime {
|
|
58
|
+
display: inline-flex;
|
|
59
59
|
margin-left: 4px;
|
|
60
|
-
display: flex;
|
|
61
|
-
align-items: center;
|
|
62
60
|
height: 20px;
|
|
63
61
|
padding: 0 8px;
|
|
64
62
|
border-radius: 12px;
|
|
@@ -111,6 +109,12 @@
|
|
|
111
109
|
border-right: 1px solid #dfe3ea;
|
|
112
110
|
}
|
|
113
111
|
|
|
112
|
+
.titaui-dynamic-summary-task-progress__table table tbody tr td:first-child {
|
|
113
|
+
overflow: hidden;
|
|
114
|
+
width: 282px;
|
|
115
|
+
max-width: 282px;
|
|
116
|
+
}
|
|
117
|
+
|
|
114
118
|
.titaui-dynamic-summary-task-progress__table table tbody tr td:last-child {
|
|
115
119
|
border-right: unset;
|
|
116
120
|
}
|
|
@@ -130,13 +130,11 @@ var TaskProgress = function TaskProgress(_ref) {
|
|
|
130
130
|
setActiveId(3);
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
|
-
}, [data]);
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
// }
|
|
139
|
-
// }
|
|
133
|
+
}, [data]);
|
|
134
|
+
|
|
135
|
+
if (statusStatistic.done + statusStatistic.doing + statusStatistic.overDue === 0) {
|
|
136
|
+
return null;
|
|
137
|
+
}
|
|
140
138
|
|
|
141
139
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
142
140
|
className: prefix
|
|
@@ -64,12 +64,9 @@ var RenderRow = function RenderRow(_ref) {
|
|
|
64
64
|
return /*#__PURE__*/_react["default"].createElement("tr", null, /*#__PURE__*/_react["default"].createElement("td", {
|
|
65
65
|
colSpan: 3
|
|
66
66
|
}, /*#__PURE__*/_react["default"].createElement(_tableRowOProject["default"], {
|
|
67
|
-
|
|
67
|
+
data: item // 6: okr 4: 项目
|
|
68
68
|
,
|
|
69
|
-
|
|
70
|
-
extraClass: "".concat(prefix, "__table-obj"),
|
|
71
|
-
text: item.Name,
|
|
72
|
-
notIcon: item.ParentObjType !== 4 && item.ParentObjType !== 6
|
|
69
|
+
extraClass: "".concat(prefix, "__table-obj")
|
|
73
70
|
})));
|
|
74
71
|
}
|
|
75
72
|
};
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
.titaui-dynamic-summary__evalute-card {
|
|
2
2
|
position: relative;
|
|
3
3
|
width: 100%;
|
|
4
|
-
background: rgba(240, 163, 38, 0.12);
|
|
4
|
+
background-color: rgba(240, 163, 38, 0.12);
|
|
5
|
+
background-size: 82px 100%;
|
|
6
|
+
background-position: calc(100% - 8px) 8px;
|
|
7
|
+
background-repeat: no-repeat;
|
|
5
8
|
border-radius: 12px;
|
|
6
9
|
margin-top: 24px;
|
|
7
10
|
padding: 16px 8px 14px 16px;
|
|
@@ -9,6 +9,8 @@ exports["default"] = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
12
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
+
|
|
12
14
|
var _avatar = _interopRequireDefault(require("../../../../../../components/avatar"));
|
|
13
15
|
|
|
14
16
|
var _rate = _interopRequireDefault(require("../../../../../rate"));
|
|
@@ -17,20 +19,12 @@ var _getLocale = require("../../../../../../utils/getLocale");
|
|
|
17
19
|
|
|
18
20
|
var _commentsDialog = _interopRequireDefault(require("../../../../components/comments-dialog"));
|
|
19
21
|
|
|
20
|
-
var _evaluateBig = _interopRequireDefault(require("./img/evaluate-big.png"));
|
|
21
|
-
|
|
22
22
|
var _niceSmall = _interopRequireDefault(require("./img/nice-small.png"));
|
|
23
23
|
|
|
24
|
-
var _niceBig = _interopRequireDefault(require("./img/nice-big.png"));
|
|
25
|
-
|
|
26
24
|
var _veryGoodSmall = _interopRequireDefault(require("./img/very-good-small.png"));
|
|
27
25
|
|
|
28
|
-
var _veryGoodBig = _interopRequireDefault(require("./img/very-good-big.png"));
|
|
29
|
-
|
|
30
26
|
var _comeOnSmall = _interopRequireDefault(require("./img/come-on-small.png"));
|
|
31
27
|
|
|
32
|
-
var _comeOnBig = _interopRequireDefault(require("./img/come-on-big.png"));
|
|
33
|
-
|
|
34
28
|
var _veryGoodWrite = _interopRequireDefault(require("./img/very-good-write.png"));
|
|
35
29
|
|
|
36
30
|
var _niceWrite = _interopRequireDefault(require("./img/nice-write.png"));
|
|
@@ -72,37 +66,34 @@ var modalType;
|
|
|
72
66
|
modalType[modalType["comeOn"] = 3] = "comeOn";
|
|
73
67
|
})(modalType || (modalType = {}));
|
|
74
68
|
|
|
75
|
-
var
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
}];
|
|
101
|
-
return remarkTypeList;
|
|
102
|
-
};
|
|
69
|
+
var RemarkTypeList = [{
|
|
70
|
+
id: modalType.veryGood,
|
|
71
|
+
name: (0, _getLocale.getLocale)("Rep_NewS_Marvelous"),
|
|
72
|
+
smallImg: _veryGoodSmall["default"],
|
|
73
|
+
bgc: "rgba(240, 163, 38, 0.12)",
|
|
74
|
+
writeImg: _veryGoodWrite["default"],
|
|
75
|
+
textColor: "rgba(189, 117, 0, 1)",
|
|
76
|
+
key: "very-good"
|
|
77
|
+
}, {
|
|
78
|
+
id: modalType.nice,
|
|
79
|
+
name: "干的不错",
|
|
80
|
+
smallImg: _niceSmall["default"],
|
|
81
|
+
bgc: "rgba(255, 171, 103, 0.12)",
|
|
82
|
+
writeImg: _niceWrite["default"],
|
|
83
|
+
textColor: "rgba(204, 102, 61, 1)",
|
|
84
|
+
key: "nice-write"
|
|
85
|
+
}, {
|
|
86
|
+
id: modalType.comeOn,
|
|
87
|
+
name: (0, _getLocale.getLocale)("Rep_NewS_MakePerEffo"),
|
|
88
|
+
smallImg: _comeOnSmall["default"],
|
|
89
|
+
bgc: "rgba(240, 94, 94, 0.12)",
|
|
90
|
+
writeImg: _comeOnWrite["default"],
|
|
91
|
+
textColor: "rgba(214, 25, 0, 1)",
|
|
92
|
+
key: "come-on"
|
|
93
|
+
}];
|
|
103
94
|
|
|
104
95
|
var EvaluteCard = function EvaluteCard(props) {
|
|
105
|
-
var _user$avatar;
|
|
96
|
+
var _classNames, _user$avatar;
|
|
106
97
|
|
|
107
98
|
var evaluation = props.evaluation,
|
|
108
99
|
feedId = props.feedId,
|
|
@@ -123,8 +114,8 @@ var EvaluteCard = function EvaluteCard(props) {
|
|
|
123
114
|
bgc: "rgba(240, 163, 38, 0.12)"
|
|
124
115
|
}),
|
|
125
116
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
126
|
-
|
|
127
|
-
|
|
117
|
+
evaluateConfig = _useState4[0],
|
|
118
|
+
setEvaluateConfig = _useState4[1];
|
|
128
119
|
|
|
129
120
|
var _useState5 = (0, _react.useState)(false),
|
|
130
121
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
@@ -148,25 +139,21 @@ var EvaluteCard = function EvaluteCard(props) {
|
|
|
148
139
|
setCurrentEvalute(evaluation);
|
|
149
140
|
|
|
150
141
|
if (type === 1) {
|
|
151
|
-
|
|
142
|
+
setEvaluateConfig({
|
|
152
143
|
bgc: "rgba(240, 163, 38, 0.12)"
|
|
153
144
|
});
|
|
154
145
|
} else if (type === 2) {
|
|
155
|
-
|
|
146
|
+
var curTypeConfig = RemarkTypeList.find(function (item) {
|
|
156
147
|
return item.id === Number(value);
|
|
157
|
-
});
|
|
158
|
-
|
|
159
|
-
bgc: getRemarkTypeList().filter(function (item) {
|
|
160
|
-
return item.id === Number(value);
|
|
161
|
-
})[0].bgc
|
|
162
|
-
});
|
|
148
|
+
}) || {};
|
|
149
|
+
setEvaluateConfig(curTypeConfig);
|
|
163
150
|
}
|
|
164
151
|
}
|
|
165
152
|
}, [evaluation]);
|
|
166
153
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
167
|
-
className: preCls,
|
|
154
|
+
className: (0, _classnames["default"])(preCls, (_classNames = {}, _defineProperty(_classNames, "".concat(preCls, "__score"), type === 1), _defineProperty(_classNames, "".concat(preCls, "__").concat(evaluateConfig.key), type === 2), _classNames)),
|
|
168
155
|
style: {
|
|
169
|
-
|
|
156
|
+
backgroundColor: evaluateConfig.bgc
|
|
170
157
|
}
|
|
171
158
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
172
159
|
className: "".concat(preCls, "__head")
|
|
@@ -182,27 +169,15 @@ var EvaluteCard = function EvaluteCard(props) {
|
|
|
182
169
|
disabled: true
|
|
183
170
|
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
184
171
|
className: "".concat(preCls, "__head-rate")
|
|
185
|
-
}, "".concat(value).concat((0, _getLocale.getLocale)("Per_Set_Form_Quantifier_Points")))), type === 2 &&
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
className: "".concat(preCls, "__head-medal-img"),
|
|
191
|
-
alt: ""
|
|
192
|
-
}), item.name);
|
|
193
|
-
})), remark && /*#__PURE__*/_react["default"].createElement("div", {
|
|
194
|
-
className: "".concat(preCls, "__remark")
|
|
195
|
-
}, remark), type === 1 && /*#__PURE__*/_react["default"].createElement("img", {
|
|
196
|
-
src: _evaluateBig["default"],
|
|
197
|
-
className: "".concat(preCls, "__bgc-img"),
|
|
172
|
+
}, "".concat(value).concat((0, _getLocale.getLocale)("Per_Set_Form_Quantifier_Points")))), type === 2 && /*#__PURE__*/_react["default"].createElement("div", {
|
|
173
|
+
className: "".concat(preCls, "__head-medal")
|
|
174
|
+
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
175
|
+
src: evaluateConfig.smallImg,
|
|
176
|
+
className: "".concat(preCls, "__head-medal-img"),
|
|
198
177
|
alt: ""
|
|
199
|
-
}),
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
className: "".concat(preCls, "__bgc-img"),
|
|
203
|
-
alt: ""
|
|
204
|
-
});
|
|
205
|
-
}), canEvaluate && /*#__PURE__*/_react["default"].createElement("div", {
|
|
178
|
+
}), evaluateConfig.name)), remark && /*#__PURE__*/_react["default"].createElement("div", {
|
|
179
|
+
className: "".concat(preCls, "__remark")
|
|
180
|
+
}, remark), canEvaluate && /*#__PURE__*/_react["default"].createElement("div", {
|
|
206
181
|
className: "".concat(preCls, "__evalute"),
|
|
207
182
|
onClick: handleClickEvaluate
|
|
208
183
|
}, type === 1 && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("img", {
|
|
@@ -212,18 +187,16 @@ var EvaluteCard = function EvaluteCard(props) {
|
|
|
212
187
|
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
213
188
|
className: "".concat(preCls, "__evalute-text"),
|
|
214
189
|
onClick: handleClickEvaluate
|
|
215
|
-
}, "\u4FEE\u6539")), type === 2 &&
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
}, "\u4FEE\u6539"));
|
|
226
|
-
})), /*#__PURE__*/_react["default"].createElement(_commentsDialog["default"], {
|
|
190
|
+
}, "\u4FEE\u6539")), type === 2 && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("img", {
|
|
191
|
+
src: evaluateConfig.writeImg,
|
|
192
|
+
className: "".concat(preCls, "__evalute-img"),
|
|
193
|
+
alt: ""
|
|
194
|
+
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
195
|
+
className: "".concat(preCls, "__evalute-text"),
|
|
196
|
+
style: {
|
|
197
|
+
color: evaluateConfig.textColor
|
|
198
|
+
}
|
|
199
|
+
}, "\u4FEE\u6539"))), /*#__PURE__*/_react["default"].createElement(_commentsDialog["default"], {
|
|
227
200
|
visible: evaluateVisible,
|
|
228
201
|
feedId: feedId,
|
|
229
202
|
toUserId: publishUser.userId,
|
|
@@ -5,6 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.dailyContentType = exports.Motion = exports.EEmotionType = void 0;
|
|
7
7
|
|
|
8
|
+
var _getLocale = require("../../../../utils/getLocale");
|
|
9
|
+
|
|
8
10
|
var _fighting = _interopRequireDefault(require("./img/fighting.png"));
|
|
9
11
|
|
|
10
12
|
var _happy = _interopRequireDefault(require("./img/happy.png"));
|
|
@@ -28,19 +30,24 @@ exports.EEmotionType = EEmotionType;
|
|
|
28
30
|
|
|
29
31
|
var Motion = [{
|
|
30
32
|
id: EEmotionType.Unset,
|
|
31
|
-
img: ""
|
|
33
|
+
img: "",
|
|
34
|
+
tips: ""
|
|
32
35
|
}, {
|
|
33
36
|
id: EEmotionType.Happy,
|
|
34
|
-
img: _happy["default"]
|
|
37
|
+
img: _happy["default"],
|
|
38
|
+
tips: (0, _getLocale.getLocale)("Rep_NewS_HappFly")
|
|
35
39
|
}, {
|
|
36
40
|
id: EEmotionType.Fighting,
|
|
37
|
-
img: _fighting["default"]
|
|
41
|
+
img: _fighting["default"],
|
|
42
|
+
tips: (0, _getLocale.getLocale)("Rep_NewS_HardWorking")
|
|
38
43
|
}, {
|
|
39
44
|
id: EEmotionType.HardToPutWords,
|
|
40
|
-
img: _longStory["default"]
|
|
45
|
+
img: _longStory["default"],
|
|
46
|
+
tips: (0, _getLocale.getLocale)("Rep_NewS_Indescribable")
|
|
41
47
|
}, {
|
|
42
48
|
id: EEmotionType.Stressful,
|
|
43
|
-
img: _pressure["default"]
|
|
49
|
+
img: _pressure["default"],
|
|
50
|
+
tips: (0, _getLocale.getLocale)("Rep_NewS_SoPressure")
|
|
44
51
|
}];
|
|
45
52
|
exports.Motion = Motion;
|
|
46
53
|
var dailyContentType;
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
.titaui-dynamic-new-report-item__content {
|
|
14
|
-
margin-left:
|
|
14
|
+
margin-left: 80px;
|
|
15
15
|
line-height: 24px;
|
|
16
16
|
word-wrap: break-word;
|
|
17
17
|
}
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
align-items: center;
|
|
22
22
|
justify-content: space-between;
|
|
23
23
|
width: 100%;
|
|
24
|
-
|
|
24
|
+
padding-bottom: 4px;
|
|
25
25
|
display: flex;
|
|
26
26
|
overflow: hidden;
|
|
27
27
|
}
|
|
@@ -31,60 +31,8 @@
|
|
|
31
31
|
height: 44px;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
.titaui-dynamic-new-report-item__content ul {
|
|
35
|
-
list-style-type: disc;
|
|
36
|
-
padding-left: 20px;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.titaui-dynamic-new-report-item__content ol {
|
|
40
|
-
list-style-type: decimal;
|
|
41
|
-
padding-left: 20px;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.titaui-dynamic-new-report-item__content li {
|
|
45
|
-
list-style-type: inherit;
|
|
46
|
-
margin: 5px 0;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.titaui-dynamic-new-report-item__content table td {
|
|
50
|
-
padding: 3px 5px;
|
|
51
|
-
min-width: 50px;
|
|
52
|
-
height: 20px;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.titaui-dynamic-new-report-item__content p {
|
|
56
|
-
margin: 5px 0;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.titaui-dynamic-new-report-item__content blockquote {
|
|
60
|
-
display: block;
|
|
61
|
-
border-left: 4px solid #e3ecf1;
|
|
62
|
-
padding: 5px;
|
|
63
|
-
font-size: 12px;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.titaui-dynamic-new-report-item__content p,
|
|
67
|
-
.titaui-dynamic-new-report-item__content li {
|
|
68
|
-
line-height: 1.7;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.titaui-dynamic-new-report-item__content a {
|
|
72
|
-
word-wrap: break-word;
|
|
73
|
-
word-break: break-all;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.titaui-dynamic-new-report-item__content pre {
|
|
77
|
-
padding: 10px;
|
|
78
|
-
margin: 5px 0px;
|
|
79
|
-
font-size: 0.8em;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.titaui-dynamic-new-report-item__content pre code {
|
|
83
|
-
line-height: 1.5;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
34
|
.titaui-dynamic-new-report-item__upload {
|
|
87
|
-
margin-top:
|
|
35
|
+
margin-top: 16px;
|
|
88
36
|
}
|
|
89
37
|
|
|
90
38
|
.titaui-dynamic-new-report-item__summary {
|
|
@@ -172,7 +120,7 @@
|
|
|
172
120
|
}
|
|
173
121
|
|
|
174
122
|
.titaui-dynamic-new-report-item__work {
|
|
175
|
-
|
|
123
|
+
padding: 12px 0;
|
|
176
124
|
font-size: 18px;
|
|
177
125
|
font-weight: 600;
|
|
178
126
|
color: #141c28;
|
|
@@ -13,6 +13,8 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
13
13
|
|
|
14
14
|
var _richEditor = _interopRequireWildcard(require("@titaui/rich-editor"));
|
|
15
15
|
|
|
16
|
+
var _tooltip = _interopRequireDefault(require("../../../tooltip"));
|
|
17
|
+
|
|
16
18
|
var _context = require("../../context");
|
|
17
19
|
|
|
18
20
|
var _summaryHeader = _interopRequireDefault(require("../components/summary-header"));
|
|
@@ -93,10 +95,10 @@ var DynamicReply = function DynamicReply(_ref) {
|
|
|
93
95
|
canEvaluate = data.canEvaluate;
|
|
94
96
|
var files = (0, _util.formatAttachments)(attachments);
|
|
95
97
|
|
|
96
|
-
var _useState = (0, _react.useState)(
|
|
98
|
+
var _useState = (0, _react.useState)(),
|
|
97
99
|
_useState2 = _slicedToArray(_useState, 2),
|
|
98
|
-
|
|
99
|
-
|
|
100
|
+
motionValue = _useState2[0],
|
|
101
|
+
setMotionValue = _useState2[1];
|
|
100
102
|
|
|
101
103
|
var contentRichTextRef = (0, _react.useRef)();
|
|
102
104
|
var workPlanRichTextRef = (0, _react.useRef)();
|
|
@@ -143,17 +145,18 @@ var DynamicReply = function DynamicReply(_ref) {
|
|
|
143
145
|
}, [data, searchKeyWord]);
|
|
144
146
|
(0, _react.useEffect)(function () {
|
|
145
147
|
if (dailyContent) {
|
|
146
|
-
var
|
|
148
|
+
var mindData = dailyContent.find(function (item) {
|
|
149
|
+
return item.contentType === 1;
|
|
150
|
+
});
|
|
151
|
+
if (!(mindData !== null && mindData !== void 0 && mindData.content)) return;
|
|
147
152
|
|
|
148
|
-
var
|
|
149
|
-
|
|
153
|
+
var motion = _constant.Motion.find(function (item) {
|
|
154
|
+
var _JSON$parse$SelectedV;
|
|
155
|
+
|
|
156
|
+
return item.id === (((_JSON$parse$SelectedV = JSON.parse(mindData.content || "{}").SelectedValues) === null || _JSON$parse$SelectedV === void 0 ? void 0 : _JSON$parse$SelectedV[0]) || 0);
|
|
150
157
|
});
|
|
151
158
|
|
|
152
|
-
|
|
153
|
-
setMindImg(_constant.Motion.filter(function (item) {
|
|
154
|
-
return item.id === JSON.parse(mindData[0].content).SelectedValues[0];
|
|
155
|
-
})[0].img);
|
|
156
|
-
}
|
|
159
|
+
setMotionValue(motion);
|
|
157
160
|
}
|
|
158
161
|
}, [dailyContent]);
|
|
159
162
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -177,11 +180,17 @@ var DynamicReply = function DynamicReply(_ref) {
|
|
|
177
180
|
typeBgColor: "rgba(92, 142, 255, 0.5)",
|
|
178
181
|
titleBgColor: "rgba(92, 142, 255, 0.1)",
|
|
179
182
|
contentColor: "#5C8EFF"
|
|
180
|
-
}),
|
|
181
|
-
|
|
183
|
+
}), motionValue && /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
184
|
+
overlay: motionValue.tips,
|
|
185
|
+
placement: "top",
|
|
186
|
+
align: {
|
|
187
|
+
offset: [0, 5]
|
|
188
|
+
}
|
|
189
|
+
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
190
|
+
src: motionValue.img,
|
|
182
191
|
className: "".concat(prefix, "__content-mind"),
|
|
183
192
|
alt: ""
|
|
184
|
-
})), dailyContent.map(function (item) {
|
|
193
|
+
}))), dailyContent.map(function (item) {
|
|
185
194
|
if (item.contentType === _constant.dailyContentType.richText) {
|
|
186
195
|
return item.richContent !== "" && typeof item.richContent === "string" && /*#__PURE__*/_react["default"].createElement("div", {
|
|
187
196
|
className: "".concat(prefix, "__work")
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
.titaui-pc__guide-tip__popup {
|
|
2
|
+
position: relative;
|
|
2
3
|
display: flex;
|
|
3
4
|
align-items: flex-start;
|
|
4
|
-
background: #
|
|
5
|
+
background: #5c8eff;
|
|
5
6
|
box-shadow: 0px -4px 12px 0px rgba(127, 145, 180, 0.2);
|
|
6
|
-
border: 1px solid #
|
|
7
|
+
border: 1px solid #ffffff;
|
|
7
8
|
padding: 16px;
|
|
8
9
|
box-sizing: border-box;
|
|
9
10
|
border-radius: 24px;
|
|
@@ -46,3 +47,22 @@
|
|
|
46
47
|
border-top: solid 4px #5c8eff;
|
|
47
48
|
z-index: 99;
|
|
48
49
|
}
|
|
50
|
+
|
|
51
|
+
.titaui-pc__guide-tip__popup-triangle--bottom {
|
|
52
|
+
top: -4px;
|
|
53
|
+
transform: rotate(180deg);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.titaui-pc__guide-tip__popup-triangle--left {
|
|
57
|
+
top: 50%;
|
|
58
|
+
margin-top: -4px;
|
|
59
|
+
left: 100.5%;
|
|
60
|
+
transform: rotate(-90deg);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.titaui-pc__guide-tip__popup-triangle--right {
|
|
64
|
+
left: -4px;
|
|
65
|
+
top: 50%;
|
|
66
|
+
margin-top: -4px;
|
|
67
|
+
transform: rotate(90deg);
|
|
68
|
+
}
|
|
@@ -47,7 +47,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
47
47
|
|
|
48
48
|
var preCls = 'titaui-pc__guide-tip';
|
|
49
49
|
var GuideTip = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
50
|
-
var _useState = (0, _react.useState)(
|
|
50
|
+
var _useState = (0, _react.useState)(false),
|
|
51
51
|
_useState2 = _slicedToArray(_useState, 2),
|
|
52
52
|
popupVisible = _useState2[0],
|
|
53
53
|
setPopupVisible = _useState2[1];
|
|
@@ -94,12 +94,19 @@ var GuideTip = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
94
94
|
text: buttonTitle,
|
|
95
95
|
size: "small"
|
|
96
96
|
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
97
|
-
className: (0, _classnames["default"])("".concat(preCls, "__popup-triangle"))
|
|
97
|
+
className: (0, _classnames["default"])("".concat(preCls, "__popup-triangle"), "".concat(preCls, "__popup-triangle--").concat(popupPlacement))
|
|
98
98
|
}));
|
|
99
99
|
};
|
|
100
100
|
|
|
101
101
|
(0, _react.useImperativeHandle)(ref, function () {
|
|
102
|
-
|
|
102
|
+
return {
|
|
103
|
+
showGuideTip: function showGuideTip() {
|
|
104
|
+
return setPopupVisible(true);
|
|
105
|
+
},
|
|
106
|
+
hideGuideTip: function hideGuideTip() {
|
|
107
|
+
return setPopupVisible(false);
|
|
108
|
+
}
|
|
109
|
+
};
|
|
103
110
|
});
|
|
104
111
|
(0, _react.useEffect)(function () {
|
|
105
112
|
if (type === 'time') {
|
|
@@ -163,7 +163,7 @@ var getCycleDate = function getCycleDate(date) {
|
|
|
163
163
|
newEndDate.setDate(0);
|
|
164
164
|
return {
|
|
165
165
|
start: "".concat(newStartDate.getFullYear(), "/").concat(newStartDate.getMonth() + 1, "/").concat(newStartDate.getDate()),
|
|
166
|
-
end: "".concat(newEndDate.getFullYear(), "/").concat(newEndDate.getMonth() + 1, "/").concat(newEndDate.getDate())
|
|
166
|
+
end: "".concat(newEndDate.getFullYear(), "/").concat(newEndDate.getMonth() + 1, "/").concat(newEndDate.getDate() + 1)
|
|
167
167
|
};
|
|
168
168
|
};
|
|
169
169
|
|
|
@@ -170,37 +170,27 @@ var OkrTree = function OkrTree(_ref) {
|
|
|
170
170
|
|
|
171
171
|
var getTreeNodes = /*#__PURE__*/function () {
|
|
172
172
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
173
|
-
var
|
|
173
|
+
var _yield$okrSearch, works, total;
|
|
174
174
|
|
|
175
175
|
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
176
176
|
while (1) {
|
|
177
177
|
switch (_context.prev = _context.next) {
|
|
178
178
|
case 0:
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
if ((query === null || query === void 0 ? void 0 : query.cycleType) !== '-1') {
|
|
182
|
-
date = new Date((query === null || query === void 0 ? void 0 : query.endDate) || new Date().valueOf());
|
|
183
|
-
date.setDate(date.getDate() + 1);
|
|
184
|
-
newQuery = _objectSpread(_objectSpread({}, query), {}, {
|
|
185
|
-
endDate: "".concat(date.getFullYear(), "/").concat(date.getMonth() + 1 >= 10 ? date.getMonth() + 1 : '0' + (date.getMonth() + 1), "/").concat(date.getDate() >= 10 ? date.getDate() : '0' + date.getDate())
|
|
186
|
-
});
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
_context.next = 4;
|
|
179
|
+
_context.next = 2;
|
|
190
180
|
return (0, _requestApi.okrSearch)(_objectSpread({
|
|
191
181
|
pageNum: pageNum,
|
|
192
182
|
pageSize: pageSize,
|
|
193
183
|
toUserId: toUserId
|
|
194
|
-
},
|
|
184
|
+
}, query));
|
|
195
185
|
|
|
196
|
-
case
|
|
186
|
+
case 2:
|
|
197
187
|
_yield$okrSearch = _context.sent;
|
|
198
188
|
works = _yield$okrSearch.works;
|
|
199
189
|
total = _yield$okrSearch.total;
|
|
200
190
|
setWorks(works || []);
|
|
201
191
|
setTotal(total);
|
|
202
192
|
|
|
203
|
-
case
|
|
193
|
+
case 7:
|
|
204
194
|
case "end":
|
|
205
195
|
return _context.stop();
|
|
206
196
|
}
|
|
@@ -23,18 +23,18 @@ var _index = require("../../../components/menu-tree/tree-node/index");
|
|
|
23
23
|
|
|
24
24
|
var _utils = require("../../../utils");
|
|
25
25
|
|
|
26
|
-
var _bsGlobal = require("../../../../../utils/bs-global.js");
|
|
27
|
-
|
|
28
26
|
var _precls = _interopRequireDefault(require("../../../precls"));
|
|
29
27
|
|
|
30
28
|
var _scrollbar = _interopRequireDefault(require("../../../../scrollbar"));
|
|
31
29
|
|
|
30
|
+
var _helper = require("./helper");
|
|
31
|
+
|
|
32
|
+
var _auth = require("../../../../../utils/auth");
|
|
33
|
+
|
|
32
34
|
require("../../../index.css");
|
|
33
35
|
|
|
34
36
|
require("./index.css");
|
|
35
37
|
|
|
36
|
-
var _helper = require("./helper");
|
|
37
|
-
|
|
38
38
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
39
39
|
|
|
40
40
|
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); }
|
|
@@ -96,9 +96,10 @@ var _default = function _default() {
|
|
|
96
96
|
_useState12 = _slicedToArray(_useState11, 1),
|
|
97
97
|
itemHeight = _useState12[0];
|
|
98
98
|
|
|
99
|
-
var
|
|
99
|
+
var baseAuth = new _auth.BaseAuth();
|
|
100
|
+
var showCompanyAll = baseAuth.isBoss() || baseAuth.isAssistant() || baseAuth.isPlanDailyManager();
|
|
100
101
|
(0, _react.useEffect)(function () {
|
|
101
|
-
if (
|
|
102
|
+
if (showCompanyAll) {
|
|
102
103
|
window.location.href = '#/summary/manage?departmentName=公司全部&departmentId=0';
|
|
103
104
|
|
|
104
105
|
var allDepartmentText = window.getLocale && window.getLocale(_i18n.locale.menu_alldeparment) || _i18n.locale.menu_alldeparment;
|
|
@@ -24,10 +24,19 @@
|
|
|
24
24
|
color: #141C28;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
.titaui__picker__week
|
|
27
|
+
.titaui__picker__week:hover {
|
|
28
28
|
color: #2879ff;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
+
.titaui__picker__week--current {
|
|
32
|
+
color: #2879ff;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.titaui__picker__week--select .titaui__picker__week-box {
|
|
36
|
+
background-color: #2879ff;
|
|
37
|
+
color: #fff;
|
|
38
|
+
}
|
|
39
|
+
|
|
31
40
|
.titaui__picker__week-box {
|
|
32
41
|
background: #F6F8FC;
|
|
33
42
|
border-radius: 8px;
|
|
@@ -17,6 +17,8 @@ var _weekHead = _interopRequireDefault(require("./week-head"));
|
|
|
17
17
|
|
|
18
18
|
var _weekBody = _interopRequireDefault(require("./week-body"));
|
|
19
19
|
|
|
20
|
+
var _utils2 = require("./utils");
|
|
21
|
+
|
|
20
22
|
require("./index.css");
|
|
21
23
|
|
|
22
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -25,19 +27,26 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
25
27
|
|
|
26
28
|
var DatePanel = function DatePanel(props) {
|
|
27
29
|
var viewDate = props.viewDate,
|
|
28
|
-
onViewDateChange = props.onViewDateChange
|
|
30
|
+
onViewDateChange = props.onViewDateChange,
|
|
31
|
+
selectWeekDate = props.selectWeekDate;
|
|
29
32
|
var startDate = viewDate[0];
|
|
30
33
|
|
|
31
34
|
var onMonthChange = function onMonthChange(diff) {
|
|
32
35
|
if (onViewDateChange) {
|
|
33
|
-
|
|
36
|
+
if (typeof startDate === 'string') {
|
|
37
|
+
onViewDateChange((0, _moment["default"])("".concat(new Date(startDate).getFullYear(), "/").concat(new Date(startDate).getMonth() + 1, "/15")).add(diff, "M"));
|
|
38
|
+
} else {
|
|
39
|
+
var startYear = (0, _utils2.getWeek)(new Date(startDate))[2];
|
|
40
|
+
var startMonth = (0, _utils2.getWeek)(new Date(startDate))[1];
|
|
41
|
+
onViewDateChange((0, _moment["default"])("".concat(startYear, "/").concat(startMonth, "/15")).add(diff, "M")); //日期写死15 是因为这里是控制头部的月的显示,如果日期为归类上一个月的,头部会乱
|
|
42
|
+
}
|
|
34
43
|
}
|
|
35
44
|
};
|
|
36
45
|
|
|
37
46
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
38
47
|
className: (0, _classnames["default"])("".concat(_utils.PickerPanelClass, "__date"))
|
|
39
48
|
}, /*#__PURE__*/_react["default"].createElement(_weekHead["default"], _extends({}, props, {
|
|
40
|
-
startDate:
|
|
49
|
+
startDate: startDate,
|
|
41
50
|
onPrev: function onPrev() {
|
|
42
51
|
return onMonthChange(-1);
|
|
43
52
|
},
|
|
@@ -45,7 +54,8 @@ var DatePanel = function DatePanel(props) {
|
|
|
45
54
|
return onMonthChange(1);
|
|
46
55
|
}
|
|
47
56
|
})), /*#__PURE__*/_react["default"].createElement(_weekBody["default"], _extends({}, props, {
|
|
48
|
-
startDate: viewDate[0]
|
|
57
|
+
startDate: viewDate[0],
|
|
58
|
+
selectWeekDate: selectWeekDate
|
|
49
59
|
})));
|
|
50
60
|
};
|
|
51
61
|
|
|
@@ -9,8 +9,6 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
|
|
10
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
11
|
|
|
12
|
-
var _moment = _interopRequireDefault(require("moment"));
|
|
13
|
-
|
|
14
12
|
var _utils = require("./utils");
|
|
15
13
|
|
|
16
14
|
var _utils2 = require("../../../utils");
|
|
@@ -27,22 +25,24 @@ var preCls = 'titaui__picker';
|
|
|
27
25
|
|
|
28
26
|
var WeekPanelBody = function WeekPanelBody(props) {
|
|
29
27
|
var startDate = props.startDate,
|
|
30
|
-
onSelect = props.onSelect
|
|
28
|
+
onSelect = props.onSelect,
|
|
29
|
+
selectWeekDate = props.selectWeekDate;
|
|
31
30
|
|
|
32
31
|
var getCells = function getCells(date) {
|
|
33
32
|
var currentYear = (0, _utils.getWeek)(new Date(new Date()))[2];
|
|
34
33
|
var currentMonth = (0, _utils.getWeek)(new Date(new Date()))[1];
|
|
35
34
|
var currentWeek = (0, _utils.getWeek)(new Date(new Date()))[0];
|
|
36
|
-
var year =
|
|
35
|
+
var year = (0, _utils.getWeek)(new Date(new Date(date)))[2]; //获取年
|
|
37
36
|
|
|
38
|
-
var month =
|
|
39
|
-
var
|
|
40
|
-
var
|
|
37
|
+
var month = (0, _utils.getWeek)(new Date(new Date(date)))[1];
|
|
38
|
+
var selectYear;
|
|
39
|
+
var selectMonth;
|
|
40
|
+
var selectWeek;
|
|
41
41
|
|
|
42
|
-
if (
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
42
|
+
if (selectWeekDate && typeof selectWeekDate[0] === 'string') {
|
|
43
|
+
selectYear = (0, _utils.getWeek)(new Date(new Date(selectWeekDate[0])))[2];
|
|
44
|
+
selectMonth = (0, _utils.getWeek)(new Date(new Date(selectWeekDate[0])))[1];
|
|
45
|
+
selectWeek = (0, _utils.getWeek)(new Date(new Date(selectWeekDate[0])))[0];
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
var range = (0, _utils.getPointYearMonthWeeksRange)(year, month);
|
|
@@ -51,7 +51,7 @@ var WeekPanelBody = function WeekPanelBody(props) {
|
|
|
51
51
|
return range.map(function (item, i) {
|
|
52
52
|
return /*#__PURE__*/_react["default"].createElement("tr", {
|
|
53
53
|
key: i,
|
|
54
|
-
className: (0, _classnames["default"])("".concat(preCls, "__week"), _defineProperty({}, "".concat(preCls, "__week--
|
|
54
|
+
className: (0, _classnames["default"])("".concat(preCls, "__week"), _defineProperty({}, "".concat(preCls, "__week--current"), currentWeek === i + 1 && (0, _utils.getWeek)(new Date("".concat(year, "/").concat(item.startTime)))[2] === currentYear && (0, _utils.getWeek)(new Date("".concat(year, "/").concat(item.startTime)))[1] === currentMonth), _defineProperty({}, "".concat(preCls, "__week--select"), selectWeek === i + 1 && selectYear === (0, _utils.getWeek)(new Date("".concat(year, "/").concat(item.startTime)))[2] && selectMonth === (0, _utils.getWeek)(new Date("".concat(year, "/").concat(item.startTime)))[1]))
|
|
55
55
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
56
56
|
onClick: function onClick() {
|
|
57
57
|
if (onSelect) {
|
|
@@ -72,7 +72,7 @@ var WeekPanelBody = function WeekPanelBody(props) {
|
|
|
72
72
|
className: (0, _classnames["default"])(_utils2.PickerBodyClass)
|
|
73
73
|
}, /*#__PURE__*/_react["default"].createElement("table", {
|
|
74
74
|
className: (0, _classnames["default"])("".concat(_utils2.PickerClass, "-content"))
|
|
75
|
-
}, /*#__PURE__*/_react["default"].createElement("tbody", null, getCells(
|
|
75
|
+
}, /*#__PURE__*/_react["default"].createElement("tbody", null, getCells(startDate))));
|
|
76
76
|
};
|
|
77
77
|
|
|
78
78
|
var _default = WeekPanelBody;
|
|
@@ -9,8 +9,6 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
|
|
10
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
11
|
|
|
12
|
-
var _moment = _interopRequireDefault(require("moment"));
|
|
13
|
-
|
|
14
12
|
var _getLocale = require("../../../../../utils/getLocale");
|
|
15
13
|
|
|
16
14
|
var _utils = require("../../../utils");
|
|
@@ -26,7 +24,7 @@ function DatePanelHead(props) {
|
|
|
26
24
|
onPrev = props.onPrev,
|
|
27
25
|
onNext = props.onNext,
|
|
28
26
|
onPanelChange = props.onPanelChange;
|
|
29
|
-
var yearText = (0,
|
|
27
|
+
var yearText = (0, _utils2.getWeek)(new Date(startDate))[2];
|
|
30
28
|
var monthText = (0, _utils2.getWeek)(new Date(startDate))[1];
|
|
31
29
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
32
30
|
className: (0, _classnames["default"])(_utils.PickerHeadClass)
|
|
@@ -65,6 +65,11 @@ var PickerPanels = function PickerPanels(props) {
|
|
|
65
65
|
viewDate = _useState4[0],
|
|
66
66
|
setViewDate = _useState4[1];
|
|
67
67
|
|
|
68
|
+
var _useState5 = (0, _react.useState)(),
|
|
69
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
70
|
+
selectWeekDate = _useState6[0],
|
|
71
|
+
setSelectWeekDate = _useState6[1];
|
|
72
|
+
|
|
68
73
|
var onViewDateChange = function onViewDateChange(date) {
|
|
69
74
|
setViewDate(function () {
|
|
70
75
|
return [date];
|
|
@@ -122,9 +127,7 @@ var PickerPanels = function PickerPanels(props) {
|
|
|
122
127
|
};
|
|
123
128
|
|
|
124
129
|
var onWeekSelect = function onWeekSelect(date, year) {
|
|
125
|
-
|
|
126
|
-
return date;
|
|
127
|
-
});
|
|
130
|
+
setSelectWeekDate(date);
|
|
128
131
|
|
|
129
132
|
if (onChange) {
|
|
130
133
|
onChange(date);
|
|
@@ -197,7 +200,8 @@ var PickerPanels = function PickerPanels(props) {
|
|
|
197
200
|
onSelect: onSelectChange,
|
|
198
201
|
onViewDateChange: onViewDateChange,
|
|
199
202
|
onPanelChange: onPanelChange,
|
|
200
|
-
valueTypeIsRange: true
|
|
203
|
+
valueTypeIsRange: true,
|
|
204
|
+
selectWeekDate: selectWeekDate
|
|
201
205
|
});
|
|
202
206
|
|
|
203
207
|
default:
|
|
@@ -205,7 +209,12 @@ var PickerPanels = function PickerPanels(props) {
|
|
|
205
209
|
}
|
|
206
210
|
|
|
207
211
|
return panel;
|
|
208
|
-
}, [pickerMode, viewDate]);
|
|
212
|
+
}, [pickerMode, viewDate, selectWeekDate]);
|
|
213
|
+
(0, _react.useEffect)(function () {
|
|
214
|
+
if (typeof value[0] === 'string') {
|
|
215
|
+
setSelectWeekDate(value);
|
|
216
|
+
}
|
|
217
|
+
}, [value]);
|
|
209
218
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
210
219
|
className: _utils.PickerClass
|
|
211
220
|
}, renderPanels());
|
|
@@ -107,7 +107,7 @@ var Picker = function Picker(props) {
|
|
|
107
107
|
onClose: onCloseHandler,
|
|
108
108
|
settingType: settingType
|
|
109
109
|
}, restProps));
|
|
110
|
-
}, [settingType, value]);
|
|
110
|
+
}, [settingType, value, picker]);
|
|
111
111
|
return /*#__PURE__*/_react["default"].createElement(_context["default"].Provider, {
|
|
112
112
|
value: {
|
|
113
113
|
picker: picker,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@titaui/pc",
|
|
3
|
-
"version": "1.12.26-beta.
|
|
3
|
+
"version": "1.12.26-beta.4",
|
|
4
4
|
"nameCN": "",
|
|
5
5
|
"description": "",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"@titaui/rc-trigger": "5.2.5",
|
|
79
79
|
"@titaui/react-flow-renderer": "9.5.4",
|
|
80
80
|
"@titaui/request": "^1.0.1",
|
|
81
|
-
"@titaui/rich-editor": "
|
|
81
|
+
"@titaui/rich-editor": "0.1.50-beta.14",
|
|
82
82
|
"@titaui/toast": "1.0.0",
|
|
83
83
|
"@types/color": "3.0.3",
|
|
84
84
|
"@types/prosemirror-commands": "1.0.4",
|