@titaui/pc 1.7.48 → 1.7.49
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/nav-top/components/user-message/components/inform/inform-item.js +25 -9
- package/lib/components/nav-top/components/user-message/constant.js +6 -4
- package/lib/components/nav-top/index.js +3 -1
- package/lib/components/task-relation-modal/index.js +1 -0
- package/lib/components/task-relation-modal/tree/okr-tree/index.js +6 -4
- package/lib/components/task-relation-modal/tree/work-tree/index.js +4 -2
- package/lib/components/task-relation-modal/tree-node/kr-node/index.js +3 -3
- package/lib/components/task-relation-modal/tree-node/milestone-node/index.js +2 -2
- package/lib/components/task-relation-modal/tree-node/o-node/index.js +3 -3
- package/package.json +1 -1
|
@@ -87,14 +87,13 @@ var Inform = function Inform(props) {
|
|
|
87
87
|
if (messageType === _constant.informType.details) {
|
|
88
88
|
(0, _tools.openPage)("".concat(_constant.apiServer, "/u/").concat(_constant.userId, "/Home#more/taskinfo?Id=").concat(item.objId));
|
|
89
89
|
return;
|
|
90
|
-
} else if (objId && objType !== 8) {
|
|
91
|
-
window.open("".concat(_constant.apiServer, "/u/").concat(_constant.userId, "/Home#work?work_id=").concat(item.objId));
|
|
92
|
-
return;
|
|
93
90
|
} else if (messageType === _constant.informType.todayJob) {
|
|
94
91
|
window.open("".concat(_constant.apiServer, "/u/").concat(_constant.userId, "/Home#plan?tag_id=0&tag_type=0&filter=1"));
|
|
95
92
|
return;
|
|
96
93
|
} else if (objType === 0) {
|
|
97
|
-
var str = item.content.match(/\/\/.*?[\"|\']/gi)
|
|
94
|
+
var str = item.content.match(/\/\/.*?[\"|\']/gi);
|
|
95
|
+
if (!str) return;
|
|
96
|
+
str = str.join("");
|
|
98
97
|
var url = str.slice(0, str.length - 1);
|
|
99
98
|
|
|
100
99
|
if (url) {
|
|
@@ -118,20 +117,37 @@ var Inform = function Inform(props) {
|
|
|
118
117
|
window.open("".concat(_constant.apiServer, "/u/").concat(_constant.userId, "/Home#/work?iTalentNavCode=tita-work&work_id=").concat(objId));
|
|
119
118
|
return;
|
|
120
119
|
} else if (objType === _constant.informType.plan) {
|
|
121
|
-
var _str = item.content.match(/\/\/.*?[\"|\']/gi)
|
|
120
|
+
var _str = item.content.match(/\/\/.*?[\"|\']/gi);
|
|
121
|
+
|
|
122
|
+
if (!_str) return;
|
|
123
|
+
_str = _str.join("");
|
|
122
124
|
|
|
123
125
|
var _url2 = _str.slice(0, _str.length - 1);
|
|
124
126
|
|
|
125
127
|
(0, _tools.openPage)(_url2);
|
|
128
|
+
return;
|
|
129
|
+
} else if (objType === _constant.informType.remindLeader) {
|
|
130
|
+
var _str2 = item.content.match(/https:.*?[\"|\']/gi);
|
|
131
|
+
|
|
132
|
+
if (!_str2) return;
|
|
133
|
+
_str2 = _str2.join("");
|
|
134
|
+
|
|
135
|
+
var _url3 = _str2.slice(0, _str2.length - 1);
|
|
136
|
+
|
|
137
|
+
(0, _tools.openPage)(_url3);
|
|
138
|
+
return;
|
|
139
|
+
} else if (objId && objType !== 8) {
|
|
140
|
+
window.open("".concat(_constant.apiServer, "/u/").concat(_constant.userId, "/Home#work?work_id=").concat(item.objId));
|
|
141
|
+
return;
|
|
126
142
|
} else {
|
|
127
143
|
var reg = /href='.*?(?=')/g;
|
|
128
|
-
var
|
|
144
|
+
var _url4 = '';
|
|
129
145
|
item.content.replace(reg, function ($0) {
|
|
130
|
-
|
|
146
|
+
_url4 = $0.slice(6);
|
|
131
147
|
});
|
|
132
148
|
|
|
133
|
-
if (
|
|
134
|
-
(0, _tools.openPage)(
|
|
149
|
+
if (_url4) {
|
|
150
|
+
(0, _tools.openPage)(_url4);
|
|
135
151
|
return;
|
|
136
152
|
}
|
|
137
153
|
}
|
|
@@ -25,14 +25,16 @@ var informType = {
|
|
|
25
25
|
//进入项目
|
|
26
26
|
"details": 69,
|
|
27
27
|
//查看详情
|
|
28
|
-
"
|
|
28
|
+
"daily1": 0,
|
|
29
29
|
//日报月报周报
|
|
30
30
|
"todayJob": 81,
|
|
31
31
|
//进入今日工作
|
|
32
|
-
"Okr":
|
|
33
|
-
//Okr
|
|
32
|
+
"Okr": 83,
|
|
34
33
|
"okrRemind": 4,
|
|
35
|
-
|
|
34
|
+
//okr提醒
|
|
35
|
+
"plan": 11,
|
|
36
|
+
//计划
|
|
37
|
+
"remindLeader": 74 //提醒上级邀请
|
|
36
38
|
|
|
37
39
|
};
|
|
38
40
|
exports.informType = informType;
|
|
@@ -108,7 +108,9 @@ var NavTop = function NavTop() {
|
|
|
108
108
|
|
|
109
109
|
if (hash) {
|
|
110
110
|
var activeMenu = menu.find(function (item) {
|
|
111
|
-
|
|
111
|
+
var _item$href$split, _item$href$split$;
|
|
112
|
+
|
|
113
|
+
return hash.includes((_item$href$split = item.href.split("#")) === null || _item$href$split === void 0 ? void 0 : (_item$href$split$ = _item$href$split[1]) === null || _item$href$split$ === void 0 ? void 0 : _item$href$split$.split('?')[0]);
|
|
112
114
|
});
|
|
113
115
|
|
|
114
116
|
if (hash.includes('homepage')) {
|
|
@@ -126,6 +126,8 @@ var OkrTree = function OkrTree() {
|
|
|
126
126
|
};
|
|
127
127
|
|
|
128
128
|
(0, _react.useEffect)(function () {
|
|
129
|
+
console.log(treeNodes);
|
|
130
|
+
|
|
129
131
|
if (contentRef.current) {
|
|
130
132
|
contentRef.current.addEventListener("scroll", setScorll, true);
|
|
131
133
|
}
|
|
@@ -138,10 +140,10 @@ var OkrTree = function OkrTree() {
|
|
|
138
140
|
var formatKrNodes = function formatKrNodes(krs) {
|
|
139
141
|
return krs.map(function (item, index) {
|
|
140
142
|
var checked = !!selected.find(function (i) {
|
|
141
|
-
return i.id == item.
|
|
143
|
+
return i.id == item.feedId;
|
|
142
144
|
});
|
|
143
145
|
return {
|
|
144
|
-
key: "".concat(item.
|
|
146
|
+
key: "".concat(item.feedId),
|
|
145
147
|
nodeType: "kr-node",
|
|
146
148
|
data: item,
|
|
147
149
|
title: "",
|
|
@@ -157,10 +159,10 @@ var OkrTree = function OkrTree() {
|
|
|
157
159
|
var _item$Krs = item.Krs,
|
|
158
160
|
Krs = _item$Krs === void 0 ? [] : _item$Krs;
|
|
159
161
|
var checked = !!selected.find(function (i) {
|
|
160
|
-
return i.id == item.
|
|
162
|
+
return i.id == item.feedId;
|
|
161
163
|
});
|
|
162
164
|
return {
|
|
163
|
-
key: item.
|
|
165
|
+
key: item.feedId,
|
|
164
166
|
nodeType: "o-node",
|
|
165
167
|
title: "",
|
|
166
168
|
children: formatKrNodes(Krs.filter(function (item) {
|
|
@@ -114,6 +114,8 @@ var WorkTree = function WorkTree() {
|
|
|
114
114
|
};
|
|
115
115
|
|
|
116
116
|
(0, _react.useEffect)(function () {
|
|
117
|
+
console.log(treeNodes);
|
|
118
|
+
|
|
117
119
|
if (contentRef.current) {
|
|
118
120
|
contentRef.current.addEventListener("scroll", setScorll, true);
|
|
119
121
|
}
|
|
@@ -126,10 +128,10 @@ var WorkTree = function WorkTree() {
|
|
|
126
128
|
var formatKrNodes = function formatKrNodes(krs) {
|
|
127
129
|
return krs.map(function (item, key) {
|
|
128
130
|
var checked = !!selected.find(function (i) {
|
|
129
|
-
return i.id == item.mileStoneId;
|
|
131
|
+
return i.id == "mileStoneId-".concat(item.mileStoneId);
|
|
130
132
|
});
|
|
131
133
|
return {
|
|
132
|
-
key: item.mileStoneId,
|
|
134
|
+
key: "mileStoneId-".concat(item.mileStoneId),
|
|
133
135
|
nodeType: "milestone",
|
|
134
136
|
data: item,
|
|
135
137
|
title: "",
|
|
@@ -63,10 +63,10 @@ var KrNode = function KrNode(props) {
|
|
|
63
63
|
type: "kr",
|
|
64
64
|
workId: data.workId,
|
|
65
65
|
krId: data.mileStoneId,
|
|
66
|
-
id: data.
|
|
66
|
+
id: data.feedId,
|
|
67
67
|
name: data.mileStoneName
|
|
68
68
|
});
|
|
69
|
-
!checked && removeSelected(data.
|
|
69
|
+
!checked && removeSelected(data.feedId);
|
|
70
70
|
};
|
|
71
71
|
|
|
72
72
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -84,7 +84,7 @@ var KrNode = function KrNode(props) {
|
|
|
84
84
|
className: "".concat(precls, "__checkbox")
|
|
85
85
|
}, /*#__PURE__*/_react["default"].createElement(_radio["default"], {
|
|
86
86
|
onChange: onCheckHandler,
|
|
87
|
-
id: data.
|
|
87
|
+
id: data.feedId,
|
|
88
88
|
checked: checked
|
|
89
89
|
})), /*#__PURE__*/_react["default"].createElement("span", {
|
|
90
90
|
className: (0, _classnames["default"])("".concat(precls, "__pointer"), _defineProperty({}, "".concat(precls, "__pointer-first"), krIndex === 1))
|
|
@@ -68,10 +68,10 @@ var MileStone = function MileStone(props) {
|
|
|
68
68
|
type: "milestone",
|
|
69
69
|
workId: data.workId,
|
|
70
70
|
krId: data.mileStoneId,
|
|
71
|
-
id: data.mileStoneId,
|
|
71
|
+
id: "mileStoneId-".concat(data.mileStoneId),
|
|
72
72
|
name: data.mileStoneName
|
|
73
73
|
});
|
|
74
|
-
!checked && removeSelected(data.mileStoneId);
|
|
74
|
+
!checked && removeSelected("mileStoneId-".concat(data.mileStoneId));
|
|
75
75
|
};
|
|
76
76
|
|
|
77
77
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -85,10 +85,10 @@ var ONode = function ONode(props) {
|
|
|
85
85
|
type: "okr",
|
|
86
86
|
workId: data.workId,
|
|
87
87
|
krId: 0,
|
|
88
|
-
id: data.
|
|
88
|
+
id: data.feedId,
|
|
89
89
|
name: data.workName
|
|
90
90
|
});
|
|
91
|
-
!checked && removeSelected(data.
|
|
91
|
+
!checked && removeSelected(data.feedId);
|
|
92
92
|
};
|
|
93
93
|
|
|
94
94
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -106,7 +106,7 @@ var ONode = function ONode(props) {
|
|
|
106
106
|
className: "".concat(precls, "__checkbox")
|
|
107
107
|
}, /*#__PURE__*/_react["default"].createElement(_radio["default"], {
|
|
108
108
|
onChange: onCheckHandler,
|
|
109
|
-
id: data.
|
|
109
|
+
id: data.feedId,
|
|
110
110
|
checked: checked
|
|
111
111
|
})), /*#__PURE__*/_react["default"].createElement("span", {
|
|
112
112
|
className: "".concat(precls, "__name")
|