@titaui/pc 1.7.65 → 1.7.69
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/button/rect-btn/index.css +3 -3
- package/lib/components/button/rect-btn/index.js +3 -1
- package/lib/components/dynamic/constant.js +3 -1
- package/lib/components/dynamic/dynamic-item/dynamic-okrs-communication/img/okrs-icon.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-okrs-communication/index.css +86 -0
- package/lib/components/dynamic/dynamic-item/dynamic-okrs-communication/index.js +107 -0
- package/lib/components/dynamic/dynamic-item/dynamic-plan-communication/img/plan-icon.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-plan-communication/index.css +86 -0
- package/lib/components/dynamic/dynamic-item/dynamic-plan-communication/index.js +107 -0
- package/lib/components/dynamic/dynamic-item/dynamic-share-to-dynamic/img/jiantou-right@3x.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-share-to-dynamic/img/user-photo.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-share-to-dynamic/index.css +77 -0
- package/lib/components/dynamic/dynamic-item/dynamic-share-to-dynamic/index.js +110 -0
- package/lib/components/dynamic/dynamic-item/dynamic-task/index.js +3 -1
- package/lib/components/dynamic/quick-operation/index.js +2 -1
- package/lib/components/dynamic/util.js +10 -0
- package/lib/components/nav-top/index.js +2 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/o-child-node/weight-input.js +3 -2
- package/lib/components/tooltip/index.css +1 -1
- package/lib/components/user-selector/select-tree/tree-nodes/tree-depart-node/index.css +0 -1
- package/lib/components/user-selector/select-tree/tree-nodes/tree-depart-node/index.js +8 -3
- package/lib/components/version-change-modal/index.js +1 -1
- package/lib/components/weekly-report/common-painter/openDataPainter.js +3 -3
- package/lib/index.js +8 -0
- package/lib/pages/new-okr-list/header/comments.js +1 -1
- package/lib/utils/mblog.js +2 -1
- package/package.json +1 -1
- package/src/components/button/rect-btn/index.scss +3 -3
- package/src/components/button/rect-btn/index.tsx +3 -1
- package/src/components/button/types.ts +1 -0
- package/src/components/dynamic/constant.ts +3 -1
- package/src/components/dynamic/dynamic-item/dynamic-okrs-communication/img/okrs-icon.png +0 -0
- package/src/components/dynamic/dynamic-item/dynamic-okrs-communication/index.scss +77 -0
- package/src/components/dynamic/dynamic-item/dynamic-okrs-communication/index.tsx +81 -0
- package/src/components/dynamic/dynamic-item/dynamic-plan-communication/img/plan-icon.png +0 -0
- package/src/components/dynamic/dynamic-item/dynamic-plan-communication/index.scss +77 -0
- package/src/components/dynamic/dynamic-item/dynamic-plan-communication/index.tsx +81 -0
- package/src/components/dynamic/dynamic-item/dynamic-share-to-dynamic/img/jiantou-right@3x.png +0 -0
- package/src/components/dynamic/dynamic-item/dynamic-share-to-dynamic/img/user-photo.png +0 -0
- package/src/components/dynamic/dynamic-item/dynamic-share-to-dynamic/index.scss +72 -0
- package/src/components/dynamic/dynamic-item/dynamic-share-to-dynamic/index.tsx +82 -0
- package/src/components/dynamic/dynamic-item/dynamic-task/index.tsx +2 -1
- package/src/components/dynamic/quick-operation/index.tsx +3 -1
- package/src/components/dynamic/util.ts +8 -0
- package/src/components/nav-top/index.tsx +2 -1
- package/src/components/okr-detail/components/okr-tree/tree-node/o-child-node/weight-input.tsx +3 -2
- package/src/components/tooltip/index.scss +1 -1
- package/src/components/user-selector/select-tree/tree-nodes/tree-depart-node/index.js +2 -1
- package/src/components/user-selector/select-tree/tree-nodes/tree-depart-node/index.scss +0 -1
- package/src/components/version-change-modal/index.tsx +1 -1
- package/src/components/weekly-report/common-painter/openDataPainter.ts +2 -2
- package/src/index.js +1 -0
- package/src/pages/new-okr-list/header/comments.tsx +1 -2
- package/src/utils/mblog.js +2 -1
|
@@ -49,7 +49,8 @@ var DynamicQuickOperation = function DynamicQuickOperation(_ref) {
|
|
|
49
49
|
var hasDynamicAnnouncementAuth = new _auth.DynamicManagerAuth().hasAuth();
|
|
50
50
|
var createTaskDivRef = (0, _react.useRef)(document.createElement("div"));
|
|
51
51
|
var isNewUI = (0, _bsGlobal.getBSGlobal)("tenantInfo").isNewIndex;
|
|
52
|
-
var
|
|
52
|
+
var newNavigation = (0, _bsGlobal.getBSGlobal)("newNavigation") || [];
|
|
53
|
+
var hasOKRApp = newNavigation.find(function (item) {
|
|
53
54
|
return item.appId === 113;
|
|
54
55
|
});
|
|
55
56
|
|
|
@@ -77,6 +77,16 @@ var getFeedTypeAndTypeColor = function getFeedTypeAndTypeColor(feedType) {
|
|
|
77
77
|
feedTypeColor = "linear-gradient(90deg, #0080FF 0%, #8FC7FF 100%)";
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
+
if (feedType === _constant.EFeedType.PlanCommunication) {
|
|
81
|
+
feedTypeText = "计划表";
|
|
82
|
+
feedTypeColor = "linear-gradient(90deg, #0080FF 0%, #8FC7FF 100%)";
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
if (feedType === _constant.EFeedType.OKRsCommunication) {
|
|
86
|
+
feedTypeText = "OKRs";
|
|
87
|
+
feedTypeColor = "linear-gradient(90deg, #2879FF 0%, #9FBFFF 100%)";
|
|
88
|
+
}
|
|
89
|
+
|
|
80
90
|
return {
|
|
81
91
|
feedTypeText: feedTypeText,
|
|
82
92
|
feedTypeColor: feedTypeColor
|
|
@@ -52,7 +52,8 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
52
52
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
53
53
|
|
|
54
54
|
var Logo = (0, _utils.getLogo)();
|
|
55
|
-
var
|
|
55
|
+
var newNavigation = (0, _bsGlobal.getBSGlobal)("newNavigation") || [];
|
|
56
|
+
var hasOKRApp = newNavigation.find(function (item) {
|
|
56
57
|
return item.appId === 113;
|
|
57
58
|
});
|
|
58
59
|
var preCls = "titaui-nav-top";
|
package/lib/components/okr-detail/components/okr-tree/tree-node/o-child-node/weight-input.js
CHANGED
|
@@ -49,11 +49,12 @@ var WeightInput = function WeightInput(props) {
|
|
|
49
49
|
|
|
50
50
|
var onChangeHandler = function onChangeHandler(e) {
|
|
51
51
|
var currentValue = e.currentTarget.value;
|
|
52
|
-
|
|
52
|
+
var error = !/^(\d{1,2}(\.\d{1})?|100)$/g.test(currentValue);
|
|
53
|
+
setIsError(error);
|
|
53
54
|
onChange({
|
|
54
55
|
workId: workId,
|
|
55
56
|
value: currentValue,
|
|
56
|
-
|
|
57
|
+
error: error
|
|
57
58
|
});
|
|
58
59
|
};
|
|
59
60
|
|
|
@@ -9,6 +9,8 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
|
|
10
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
11
|
|
|
12
|
+
var _tooltip = _interopRequireDefault(require("../../../../tooltip"));
|
|
13
|
+
|
|
12
14
|
var _openData = require("../../../../../utils/open-data");
|
|
13
15
|
|
|
14
16
|
require("./index.css");
|
|
@@ -31,9 +33,12 @@ var _default = function _default(props) {
|
|
|
31
33
|
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
32
34
|
className: "perspm-depart__name",
|
|
33
35
|
title: ""
|
|
34
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
35
|
-
|
|
36
|
-
|
|
36
|
+
}, /*#__PURE__*/_react["default"].createElement(_tooltip["default"].Text, {
|
|
37
|
+
text: /*#__PURE__*/_react["default"].createElement(_openData.OpenDepartmentName, {
|
|
38
|
+
id: data.id,
|
|
39
|
+
name: data.name
|
|
40
|
+
}),
|
|
41
|
+
isPercent: true
|
|
37
42
|
})), !isSelectedPanel ? /*#__PURE__*/_react["default"].createElement("span", {
|
|
38
43
|
className: (0, _classnames["default"])('perspm-tree__selector', 'perspm-tree__selector-depart')
|
|
39
44
|
}) : undefined, isSelectedPanel ? /*#__PURE__*/_react["default"].createElement("span", {
|
|
@@ -19,7 +19,7 @@ var _constant = require("./constant");
|
|
|
19
19
|
|
|
20
20
|
require("./index.css");
|
|
21
21
|
|
|
22
|
-
var _helpers = require("
|
|
22
|
+
var _helpers = require("../../utils/helpers");
|
|
23
23
|
|
|
24
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
25
25
|
|
|
@@ -5,9 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = _default;
|
|
7
7
|
|
|
8
|
-
var _openData = require("
|
|
8
|
+
var _openData = require("../../../utils/open-data");
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _bsGlobal = require("../../../utils/bs-global");
|
|
11
11
|
|
|
12
12
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
13
13
|
|
|
@@ -33,7 +33,7 @@ function _ref() {
|
|
|
33
33
|
maxWidth = _args.length > 3 && _args[3] !== undefined ? _args[3] : Infinity;
|
|
34
34
|
name = openDataParams.name;
|
|
35
35
|
|
|
36
|
-
if (!(0,
|
|
36
|
+
if (!(0, _bsGlobal.isWx)()) {
|
|
37
37
|
_context.next = 6;
|
|
38
38
|
break;
|
|
39
39
|
}
|
package/lib/index.js
CHANGED
|
@@ -435,6 +435,12 @@ Object.defineProperty(exports, "Tooltip", {
|
|
|
435
435
|
return _tooltip["default"];
|
|
436
436
|
}
|
|
437
437
|
});
|
|
438
|
+
Object.defineProperty(exports, "TooltipText", {
|
|
439
|
+
enumerable: true,
|
|
440
|
+
get: function get() {
|
|
441
|
+
return _tooltipText["default"];
|
|
442
|
+
}
|
|
443
|
+
});
|
|
438
444
|
Object.defineProperty(exports, "Tree", {
|
|
439
445
|
enumerable: true,
|
|
440
446
|
get: function get() {
|
|
@@ -640,6 +646,8 @@ var _titaChart = _interopRequireDefault(require("./components/tita-chart"));
|
|
|
640
646
|
|
|
641
647
|
var _tooltip = _interopRequireDefault(require("./components/tooltip"));
|
|
642
648
|
|
|
649
|
+
var _tooltipText = _interopRequireDefault(require("./components/tooltip/tooltip-text"));
|
|
650
|
+
|
|
643
651
|
var _updateModal = _interopRequireDefault(require("./components/update-modal"));
|
|
644
652
|
|
|
645
653
|
var _upload = _interopRequireDefault(require("./components/upload"));
|
package/lib/utils/mblog.js
CHANGED
|
@@ -15,6 +15,7 @@ function htmlEncodeByRegExp(str) {
|
|
|
15
15
|
temp = temp.replace(/\'/g, "'");
|
|
16
16
|
temp = temp.replace(/\"/g, """);
|
|
17
17
|
temp = temp.replace(/\n/g, "<br/>");
|
|
18
|
+
temp = temp.replace(/\+/g, "+");
|
|
18
19
|
return temp;
|
|
19
20
|
}
|
|
20
21
|
|
|
@@ -27,6 +28,6 @@ function htmlDecodeByRegExp(str) {
|
|
|
27
28
|
temp = temp.replace(/ /g, " ");
|
|
28
29
|
temp = temp.replace(/'/g, "\'");
|
|
29
30
|
temp = temp.replace(/"/g, "\"");
|
|
30
|
-
temp = temp.replace(
|
|
31
|
+
temp = temp.replace(/+/g, "+");
|
|
31
32
|
return temp;
|
|
32
33
|
}
|
package/package.json
CHANGED
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
|
|
25
25
|
&--big {
|
|
26
26
|
border-radius: 18px;
|
|
27
|
-
height:
|
|
28
|
-
line-height:
|
|
27
|
+
height: 36px;
|
|
28
|
+
line-height: 34px;
|
|
29
29
|
min-width: 90px;
|
|
30
30
|
padding: 0 16px;
|
|
31
31
|
}
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
.titaui-rect-btn--primary.titaui-rect-btn--big {
|
|
98
|
-
line-height:
|
|
98
|
+
line-height: 36px;
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
.titaui-rect-btn--primary.titaui-rect-btn--disabled {
|
|
@@ -8,11 +8,12 @@ const RectBtn = (props: RectBtnProps) => {
|
|
|
8
8
|
const {
|
|
9
9
|
type = "default",
|
|
10
10
|
icon = "",
|
|
11
|
-
size = "normal"
|
|
11
|
+
size = "normal",//big|normal|small
|
|
12
12
|
text = "确定",
|
|
13
13
|
onClick = () => {},
|
|
14
14
|
className = "",
|
|
15
15
|
disabled = false,
|
|
16
|
+
style,
|
|
16
17
|
} = props;
|
|
17
18
|
|
|
18
19
|
const renderIcon = () => {
|
|
@@ -40,6 +41,7 @@ const RectBtn = (props: RectBtnProps) => {
|
|
|
40
41
|
{ [`${precls}--disabled`]: disabled },
|
|
41
42
|
className
|
|
42
43
|
)}
|
|
44
|
+
style={style}
|
|
43
45
|
onClick={onClickHandler}
|
|
44
46
|
>
|
|
45
47
|
{icon && renderIcon()}
|
|
@@ -20,7 +20,7 @@ export enum EFeedType {
|
|
|
20
20
|
Bless = 14, // 祝福
|
|
21
21
|
Kr = 15, // 关键成果
|
|
22
22
|
MileStone = 16, // 里程碑
|
|
23
|
-
|
|
23
|
+
OKREStatistics = 17, // E报告
|
|
24
24
|
Reply = 18, // 复盘
|
|
25
25
|
OkrCycle = 19, // 目标周期
|
|
26
26
|
Task = 20, // 任务
|
|
@@ -30,6 +30,8 @@ export enum EFeedType {
|
|
|
30
30
|
Announcement = 24, // 公告
|
|
31
31
|
Signin = 80, // 签到
|
|
32
32
|
O = 101, // 目标
|
|
33
|
+
OKRsCommunication = 102, // okr页面沟通
|
|
34
|
+
PlanCommunication = 103, // 计划表页面沟通
|
|
33
35
|
}
|
|
34
36
|
|
|
35
37
|
export enum EObjType {
|
|
Binary file
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
.titaui-dynamic-okrs-communication-item {
|
|
2
|
+
border-radius: 12px;
|
|
3
|
+
box-shadow: 0px 0px 8px 0px rgba(127, 145, 180, 0.1);
|
|
4
|
+
background: #ffffff;
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
overflow: hidden;
|
|
7
|
+
font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica,
|
|
8
|
+
sans-serif, PingFang SC, Microsoft YaHei;
|
|
9
|
+
&__content {
|
|
10
|
+
height: 78px;
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
border-radius: 8px;
|
|
14
|
+
background: rgba(240, 244, 250, 0.5);
|
|
15
|
+
padding: 16px 12px 16px 16px;
|
|
16
|
+
box-sizing: border-box;
|
|
17
|
+
margin-left: 69px;
|
|
18
|
+
&-img {
|
|
19
|
+
display: inline-block;
|
|
20
|
+
width: 36px;
|
|
21
|
+
border-radius: 6px;
|
|
22
|
+
}
|
|
23
|
+
&-info {
|
|
24
|
+
flex: 1;
|
|
25
|
+
display: flex;
|
|
26
|
+
flex-direction: column;
|
|
27
|
+
margin-left: 16px;
|
|
28
|
+
overflow: hidden;
|
|
29
|
+
}
|
|
30
|
+
&-title {
|
|
31
|
+
flex: 1;
|
|
32
|
+
word-break: keep-all;
|
|
33
|
+
white-space: nowrap;
|
|
34
|
+
overflow: hidden;
|
|
35
|
+
font-size: 16px;
|
|
36
|
+
font-weight: 600;
|
|
37
|
+
color: #3f4755;
|
|
38
|
+
line-height: 24px;
|
|
39
|
+
&-text {
|
|
40
|
+
cursor: pointer;
|
|
41
|
+
&:hover {
|
|
42
|
+
color: #2879ff;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
&-priority {
|
|
46
|
+
width: 18px;
|
|
47
|
+
height: 26px;
|
|
48
|
+
margin-right: 4px;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
&__operate-desc {
|
|
53
|
+
font-size: 14px;
|
|
54
|
+
font-weight: 400;
|
|
55
|
+
color: #89919f;
|
|
56
|
+
line-height: 22px;
|
|
57
|
+
margin: 0 8px 0 4px;
|
|
58
|
+
overflow: hidden;
|
|
59
|
+
&-wrapper {
|
|
60
|
+
display: flex;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
&-desc-operate-type {
|
|
64
|
+
display: inline-flex;
|
|
65
|
+
align-items: center;
|
|
66
|
+
justify-content: center;
|
|
67
|
+
padding: 0 2px;
|
|
68
|
+
height: 18px;
|
|
69
|
+
min-width: 40px;
|
|
70
|
+
clip-path: polygon(0 100%, 100% 100%, 100% 0, 15% 0);
|
|
71
|
+
-webkit-clip-path: polygon(0 100%, 100% 100%, 100% 0, 15% 0);
|
|
72
|
+
border-radius: 14px 10px 10px 4px;
|
|
73
|
+
font-size: 12px;
|
|
74
|
+
color: #ffffff;
|
|
75
|
+
line-height: 18px;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import React, { FC, useContext, useMemo, Fragment } from "react";
|
|
2
|
+
import classNames from "classnames";
|
|
3
|
+
import { IDynamicItemContentProps } from "../../interface";
|
|
4
|
+
import DynamicItemHeader from "../components/header";
|
|
5
|
+
import TaskPng from "./img/okrs-icon.png";
|
|
6
|
+
import {
|
|
7
|
+
EObjType,
|
|
8
|
+
EStatusStatus2ClassType,
|
|
9
|
+
ObjTypeMapText,
|
|
10
|
+
} from "../../constant";
|
|
11
|
+
import { SearchKeyContext } from "../../context";
|
|
12
|
+
import SearchKeyHandle from "../../../search-key-handle";
|
|
13
|
+
import { TooltipText } from "../../../tooltip";
|
|
14
|
+
import { getFeedTypeAndTypeColor } from "../../util";
|
|
15
|
+
import drawerManager from "../../../drawer/manager";
|
|
16
|
+
import "./index.scss";
|
|
17
|
+
|
|
18
|
+
const prefix = "titaui-dynamic-okrs-communication-item";
|
|
19
|
+
|
|
20
|
+
const DynamicTask: FC<IDynamicItemContentProps> = ({ data, ...restProps }) => {
|
|
21
|
+
const {
|
|
22
|
+
status,
|
|
23
|
+
taskName,
|
|
24
|
+
startDate,
|
|
25
|
+
deadline,
|
|
26
|
+
feedType,
|
|
27
|
+
principalUser,
|
|
28
|
+
} = data;
|
|
29
|
+
const { searchKeyWord } = useContext(SearchKeyContext);
|
|
30
|
+
const { feedTypeText, feedTypeColor } = getFeedTypeAndTypeColor(feedType);
|
|
31
|
+
|
|
32
|
+
const handleClickPlanTitle = () => {
|
|
33
|
+
window.Talent.app.vent.trigger("global-pull-screen", data.taskId, "task");
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
const renderName = useMemo(() => {
|
|
37
|
+
return (
|
|
38
|
+
<span
|
|
39
|
+
className={prefix + "__content-title-text"}
|
|
40
|
+
onClick={handleClickPlanTitle}
|
|
41
|
+
>
|
|
42
|
+
<SearchKeyHandle str={taskName} keyWord={searchKeyWord} />
|
|
43
|
+
</span>
|
|
44
|
+
);
|
|
45
|
+
}, [taskName, searchKeyWord]);
|
|
46
|
+
|
|
47
|
+
const renderDesc = useMemo(() => {
|
|
48
|
+
return (
|
|
49
|
+
<Fragment>
|
|
50
|
+
<span className={prefix + "__operate-desc"}>的计划表</span>
|
|
51
|
+
<span
|
|
52
|
+
className={prefix + "-desc-operate-type"}
|
|
53
|
+
style={{ background: feedTypeColor }}
|
|
54
|
+
>
|
|
55
|
+
{feedTypeText}
|
|
56
|
+
</span>
|
|
57
|
+
</Fragment>
|
|
58
|
+
);
|
|
59
|
+
}, []);
|
|
60
|
+
|
|
61
|
+
return (
|
|
62
|
+
<div className={prefix}>
|
|
63
|
+
<DynamicItemHeader
|
|
64
|
+
data={data}
|
|
65
|
+
{...restProps}
|
|
66
|
+
desc={renderDesc}
|
|
67
|
+
user={principalUser}
|
|
68
|
+
/>
|
|
69
|
+
<div className={`${prefix}__content`}>
|
|
70
|
+
<img className={`${prefix}__content-img`} src={TaskPng} />
|
|
71
|
+
<div className={prefix + "__content-info"}>
|
|
72
|
+
<div className={prefix + "__content-title"}>
|
|
73
|
+
<TooltipText isPercent text={renderName} minusWidth={30} />
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
|
+
);
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
export default DynamicTask;
|
|
Binary file
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
.titaui-dynamic-plan-communication-item {
|
|
2
|
+
border-radius: 12px;
|
|
3
|
+
box-shadow: 0px 0px 8px 0px rgba(127, 145, 180, 0.1);
|
|
4
|
+
background: #ffffff;
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
overflow: hidden;
|
|
7
|
+
font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica,
|
|
8
|
+
sans-serif, PingFang SC, Microsoft YaHei;
|
|
9
|
+
&__content {
|
|
10
|
+
height: 78px;
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
border-radius: 8px;
|
|
14
|
+
background: rgba(240, 244, 250, 0.5);
|
|
15
|
+
padding: 16px 12px 16px 16px;
|
|
16
|
+
box-sizing: border-box;
|
|
17
|
+
margin-left: 69px;
|
|
18
|
+
&-img {
|
|
19
|
+
display: inline-block;
|
|
20
|
+
width: 36px;
|
|
21
|
+
border-radius: 6px;
|
|
22
|
+
}
|
|
23
|
+
&-info {
|
|
24
|
+
flex: 1;
|
|
25
|
+
display: flex;
|
|
26
|
+
flex-direction: column;
|
|
27
|
+
margin-left: 16px;
|
|
28
|
+
overflow: hidden;
|
|
29
|
+
}
|
|
30
|
+
&-title {
|
|
31
|
+
flex: 1;
|
|
32
|
+
word-break: keep-all;
|
|
33
|
+
white-space: nowrap;
|
|
34
|
+
overflow: hidden;
|
|
35
|
+
font-size: 16px;
|
|
36
|
+
font-weight: 600;
|
|
37
|
+
color: #3f4755;
|
|
38
|
+
line-height: 24px;
|
|
39
|
+
&-text {
|
|
40
|
+
cursor: pointer;
|
|
41
|
+
&:hover {
|
|
42
|
+
color: #2879ff;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
&-priority {
|
|
46
|
+
width: 18px;
|
|
47
|
+
height: 26px;
|
|
48
|
+
margin-right: 4px;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
&__operate-desc {
|
|
53
|
+
font-size: 14px;
|
|
54
|
+
font-weight: 400;
|
|
55
|
+
color: #89919f;
|
|
56
|
+
line-height: 22px;
|
|
57
|
+
margin: 0 8px 0 4px;
|
|
58
|
+
overflow: hidden;
|
|
59
|
+
&-wrapper {
|
|
60
|
+
display: flex;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
&-desc-operate-type {
|
|
64
|
+
display: inline-flex;
|
|
65
|
+
align-items: center;
|
|
66
|
+
justify-content: center;
|
|
67
|
+
padding: 0 2px;
|
|
68
|
+
height: 18px;
|
|
69
|
+
min-width: 40px;
|
|
70
|
+
clip-path: polygon(0 100%, 100% 100%, 100% 0, 15% 0);
|
|
71
|
+
-webkit-clip-path: polygon(0 100%, 100% 100%, 100% 0, 15% 0);
|
|
72
|
+
border-radius: 14px 10px 10px 4px;
|
|
73
|
+
font-size: 12px;
|
|
74
|
+
color: #ffffff;
|
|
75
|
+
line-height: 18px;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import React, { FC, useContext, useMemo, Fragment } from "react";
|
|
2
|
+
import classNames from "classnames";
|
|
3
|
+
import { IDynamicItemContentProps } from "../../interface";
|
|
4
|
+
import DynamicItemHeader from "../components/header";
|
|
5
|
+
import TaskPng from "./img/plan-icon.png";
|
|
6
|
+
import {
|
|
7
|
+
EObjType,
|
|
8
|
+
EStatusStatus2ClassType,
|
|
9
|
+
ObjTypeMapText,
|
|
10
|
+
} from "../../constant";
|
|
11
|
+
import { SearchKeyContext } from "../../context";
|
|
12
|
+
import SearchKeyHandle from "../../../search-key-handle";
|
|
13
|
+
import { TooltipText } from "../../../tooltip";
|
|
14
|
+
import { getFeedTypeAndTypeColor } from "../../util";
|
|
15
|
+
import drawerManager from "../../../drawer/manager";
|
|
16
|
+
import "./index.scss";
|
|
17
|
+
|
|
18
|
+
const prefix = "titaui-dynamic-plan-communication-item";
|
|
19
|
+
|
|
20
|
+
const DynamicTask: FC<IDynamicItemContentProps> = ({ data, ...restProps }) => {
|
|
21
|
+
const {
|
|
22
|
+
status,
|
|
23
|
+
taskName,
|
|
24
|
+
startDate,
|
|
25
|
+
deadline,
|
|
26
|
+
feedType,
|
|
27
|
+
principalUser,
|
|
28
|
+
} = data;
|
|
29
|
+
const { searchKeyWord } = useContext(SearchKeyContext);
|
|
30
|
+
const { feedTypeText, feedTypeColor } = getFeedTypeAndTypeColor(feedType);
|
|
31
|
+
|
|
32
|
+
const handleClickPlanTitle = () => {
|
|
33
|
+
window.Talent.app.vent.trigger("global-pull-screen", data.taskId, "task");
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
const renderName = useMemo(() => {
|
|
37
|
+
return (
|
|
38
|
+
<span
|
|
39
|
+
className={prefix + "__content-title-text"}
|
|
40
|
+
onClick={handleClickPlanTitle}
|
|
41
|
+
>
|
|
42
|
+
<SearchKeyHandle str={taskName} keyWord={searchKeyWord} />
|
|
43
|
+
</span>
|
|
44
|
+
);
|
|
45
|
+
}, [taskName, searchKeyWord]);
|
|
46
|
+
|
|
47
|
+
const renderDesc = useMemo(() => {
|
|
48
|
+
return (
|
|
49
|
+
<Fragment>
|
|
50
|
+
<span className={prefix + "__operate-desc"}>的计划表</span>
|
|
51
|
+
<span
|
|
52
|
+
className={prefix + "-desc-operate-type"}
|
|
53
|
+
style={{ background: feedTypeColor }}
|
|
54
|
+
>
|
|
55
|
+
{feedTypeText}
|
|
56
|
+
</span>
|
|
57
|
+
</Fragment>
|
|
58
|
+
);
|
|
59
|
+
}, []);
|
|
60
|
+
|
|
61
|
+
return (
|
|
62
|
+
<div className={prefix}>
|
|
63
|
+
<DynamicItemHeader
|
|
64
|
+
data={data}
|
|
65
|
+
{...restProps}
|
|
66
|
+
desc={renderDesc}
|
|
67
|
+
user={principalUser}
|
|
68
|
+
/>
|
|
69
|
+
<div className={`${prefix}__content`}>
|
|
70
|
+
<img className={`${prefix}__content-img`} src={TaskPng} />
|
|
71
|
+
<div className={prefix + "__content-info"}>
|
|
72
|
+
<div className={prefix + "__content-title"}>
|
|
73
|
+
<TooltipText isPercent text={renderName} minusWidth={30} />
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
|
+
);
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
export default DynamicTask;
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
.titaui-dynamic-share-to-dynamic {
|
|
2
|
+
&__operate-desc {
|
|
3
|
+
margin-left: 4px;
|
|
4
|
+
font-size: 14px;
|
|
5
|
+
font-family: OPPOSans-R, OPPOSans;
|
|
6
|
+
font-weight: normal;
|
|
7
|
+
color: #89919f;
|
|
8
|
+
line-height: 22px;
|
|
9
|
+
}
|
|
10
|
+
&__content {
|
|
11
|
+
height: 24px;
|
|
12
|
+
display: flex;
|
|
13
|
+
padding: 0 50px;
|
|
14
|
+
box-sizing: border-box;
|
|
15
|
+
margin-top: 16px;
|
|
16
|
+
font-size: 14px;
|
|
17
|
+
font-family: OPPOSans-R, OPPOSans;
|
|
18
|
+
font-weight: normal;
|
|
19
|
+
color: #3f4755;
|
|
20
|
+
line-height: 24px;
|
|
21
|
+
cursor: pointer;
|
|
22
|
+
&-quoto {
|
|
23
|
+
vertical-align: text-top;
|
|
24
|
+
margin-right: 6px;
|
|
25
|
+
width: 12px;
|
|
26
|
+
width: 12px;
|
|
27
|
+
height: 12px;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
&__share {
|
|
31
|
+
box-sizing: border-box;
|
|
32
|
+
height: 104px;
|
|
33
|
+
display: flex;
|
|
34
|
+
border-radius: 18px;
|
|
35
|
+
background: rgba(240, 244, 250, 0.5);
|
|
36
|
+
padding: 12px;
|
|
37
|
+
box-sizing: border-box;
|
|
38
|
+
margin-left: 68px;
|
|
39
|
+
margin-top: 12px;
|
|
40
|
+
&-img {
|
|
41
|
+
width: 80px;
|
|
42
|
+
height: 80px;
|
|
43
|
+
border-radius: 8px;
|
|
44
|
+
margin-right: 12px;
|
|
45
|
+
}
|
|
46
|
+
&-right {
|
|
47
|
+
cursor: pointer;
|
|
48
|
+
&-title {
|
|
49
|
+
display: block;
|
|
50
|
+
font-size: 16px;
|
|
51
|
+
font-family: OPPOSans-B, OPPOSans;
|
|
52
|
+
font-weight: normal;
|
|
53
|
+
color: #141c28;
|
|
54
|
+
line-height: 24px;
|
|
55
|
+
margin-bottom: 8px;
|
|
56
|
+
}
|
|
57
|
+
&-content {
|
|
58
|
+
font-size: 14px;
|
|
59
|
+
font-family: OPPOSans-R, OPPOSans;
|
|
60
|
+
font-weight: normal;
|
|
61
|
+
color: #3f4755;
|
|
62
|
+
line-height: 24px;
|
|
63
|
+
text-overflow: -o-ellipsis-lastline;
|
|
64
|
+
overflow: hidden;
|
|
65
|
+
text-overflow: ellipsis;
|
|
66
|
+
display: -webkit-box;
|
|
67
|
+
-webkit-line-clamp: 2;
|
|
68
|
+
-webkit-box-orient: vertical;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|