@titaui/pc 1.7.61 → 1.7.65
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/dynamic/dynamic-item/dynamic-milestone/constant.js +7 -10
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.js +1 -1
- package/lib/components/dynamic/dynamic.js +0 -11
- package/lib/components/file-list/index.js +14 -13
- package/lib/components/okr-detail/components/okr-tree/tree-node/o-child-node/index.js +4 -0
- package/lib/components/okr-detail/components/okr-tree/tree-node/o-child-node/weight-input.js +1 -2
- package/lib/components/okr-detail/okr-list/index.js +2 -1
- package/lib/pages/home/components/data-list/table/utils-function.js +76 -74
- package/package.json +1 -1
- package/src/components/dynamic/dynamic-item/dynamic-milestone/constant.ts +5 -8
- package/src/components/dynamic/dynamic-item/dynamic-milestone/index.tsx +2 -2
- package/src/components/dynamic/dynamic.tsx +0 -9
- package/src/components/file-list/index.tsx +12 -11
- package/src/components/okr-detail/components/okr-tree/tree-node/o-child-node/index.js +3 -1
- package/src/components/okr-detail/components/okr-tree/tree-node/o-child-node/weight-input.tsx +1 -2
- package/src/components/okr-detail/okr-list/index.js +1 -0
- package/src/pages/home/components/data-list/table/utils-function.ts +42 -40
|
@@ -3,14 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
7
|
-
var
|
|
8
|
-
2: '
|
|
9
|
-
1: '
|
|
10
|
-
4: '
|
|
11
|
-
3: '
|
|
12
|
-
6: '暂停中',
|
|
13
|
-
0: '未开始',
|
|
14
|
-
5: '未接受'
|
|
6
|
+
exports.MileStoneStatusClass2StatusTypeText = void 0;
|
|
7
|
+
var MileStoneStatusClass2StatusTypeText = {
|
|
8
|
+
2: '未完成',
|
|
9
|
+
1: '未开始',
|
|
10
|
+
4: '已过期',
|
|
11
|
+
3: '已完成'
|
|
15
12
|
};
|
|
16
|
-
exports.
|
|
13
|
+
exports.MileStoneStatusClass2StatusTypeText = MileStoneStatusClass2StatusTypeText;
|
|
@@ -130,7 +130,7 @@ var DynamicMilestone = function DynamicMilestone(_ref) {
|
|
|
130
130
|
className: (0, _classnames["default"])(_constant2.EStatusStatus2ClassType[status])
|
|
131
131
|
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
132
132
|
className: prefix + '__content-status-text'
|
|
133
|
-
}, _constant.
|
|
133
|
+
}, _constant.MileStoneStatusClass2StatusTypeText[status]), /*#__PURE__*/_react["default"].createElement("i", {
|
|
134
134
|
className: (0, _classnames["default"])('tu-icon-deferred')
|
|
135
135
|
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
136
136
|
className: prefix + '__content-time-range'
|
|
@@ -321,17 +321,6 @@ var Dynamic = function Dynamic() {
|
|
|
321
321
|
}, []);
|
|
322
322
|
(0, _react.useEffect)(function () {
|
|
323
323
|
if (searchKeyWord || searchKeyType || searchUser) {
|
|
324
|
-
// 搜索跳到全部动态
|
|
325
|
-
if (searchKeyWord) {
|
|
326
|
-
setActiveFirstLevelTabKey(1006); // @ts-ignore
|
|
327
|
-
|
|
328
|
-
var secondTabsArr = tabsInfo.find(function (item) {
|
|
329
|
-
return item.CodeId === 1006;
|
|
330
|
-
}).ChildMenus;
|
|
331
|
-
setSecondTabs(secondTabsArr);
|
|
332
|
-
setActiveSecondLevelTabKey(secondTabsArr[0].CodeId);
|
|
333
|
-
}
|
|
334
|
-
|
|
335
324
|
setIsChangeConditionLoading(true);
|
|
336
325
|
resetValue();
|
|
337
326
|
getDynamicData(true);
|
|
@@ -30,30 +30,31 @@ var FileList = function FileList(_ref) {
|
|
|
30
30
|
_ref$showDownload = _ref.showDownload,
|
|
31
31
|
showDownload = _ref$showDownload === void 0 ? true : _ref$showDownload;
|
|
32
32
|
var imgViewerRef = (0, _react.useRef)();
|
|
33
|
-
var imageIndexRef = (0, _react.useRef)(0);
|
|
34
33
|
|
|
35
|
-
var
|
|
36
|
-
|
|
37
|
-
imgViewerRef.current && imgViewerRef.current.show(index);
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
var getIndex = function getIndex(file) {
|
|
41
|
-
var index = imageIndexRef.current;
|
|
34
|
+
var getImgIndex = function getImgIndex(index) {
|
|
35
|
+
var newIndex = 0;
|
|
42
36
|
|
|
43
|
-
|
|
44
|
-
|
|
37
|
+
for (var i = 0; i < index; i++) {
|
|
38
|
+
if ((0, _util.isImg)(data[i].fileType)) {
|
|
39
|
+
newIndex++;
|
|
40
|
+
}
|
|
45
41
|
}
|
|
46
42
|
|
|
47
|
-
return
|
|
43
|
+
return newIndex;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
var handleImgPreview = function handleImgPreview(index) {
|
|
47
|
+
// @ts-ignore
|
|
48
|
+
imgViewerRef.current && imgViewerRef.current.show(getImgIndex(index));
|
|
48
49
|
};
|
|
49
50
|
|
|
50
51
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
51
52
|
className: prefix
|
|
52
53
|
}, data.map(function (file, index) {
|
|
53
54
|
return /*#__PURE__*/_react["default"].createElement(_singleFile["default"], {
|
|
54
|
-
key: file.
|
|
55
|
+
key: file.documentId + index,
|
|
55
56
|
data: file,
|
|
56
|
-
index:
|
|
57
|
+
index: index,
|
|
57
58
|
showDownload: showDownload,
|
|
58
59
|
onPreview: handleImgPreview
|
|
59
60
|
});
|
|
@@ -80,6 +80,9 @@ var _default = function _default(props) {
|
|
|
80
80
|
refreshAll = _useContext.refreshAll,
|
|
81
81
|
okrInfo = _useContext.okrInfo;
|
|
82
82
|
|
|
83
|
+
var _useContext2 = (0, _react.useContext)(_context.OkrListContext),
|
|
84
|
+
getParentAndChildWorks = _useContext2.getParentAndChildWorks;
|
|
85
|
+
|
|
83
86
|
var _useState3 = (0, _react.useState)(data.principalUser),
|
|
84
87
|
_useState4 = _slicedToArray(_useState3, 1),
|
|
85
88
|
user = _useState4[0];
|
|
@@ -131,6 +134,7 @@ var _default = function _default(props) {
|
|
|
131
134
|
var handleOk = function handleOk() {
|
|
132
135
|
setEditVisible(false);
|
|
133
136
|
refreshAll();
|
|
137
|
+
getParentAndChildWorks();
|
|
134
138
|
};
|
|
135
139
|
|
|
136
140
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
package/lib/components/okr-detail/components/okr-tree/tree-node/o-child-node/weight-input.js
CHANGED
|
@@ -60,7 +60,7 @@ var WeightInput = function WeightInput(props) {
|
|
|
60
60
|
var onBlurHandler = function onBlurHandler(e) {
|
|
61
61
|
var currentValue = e.currentTarget.value;
|
|
62
62
|
|
|
63
|
-
if (currentValue == "") {
|
|
63
|
+
if (currentValue.trim() == "") {
|
|
64
64
|
onChange({
|
|
65
65
|
workId: workId,
|
|
66
66
|
value: 0,
|
|
@@ -82,7 +82,6 @@ var WeightInput = function WeightInput(props) {
|
|
|
82
82
|
visible: isError
|
|
83
83
|
}, /*#__PURE__*/_react["default"].createElement("input", {
|
|
84
84
|
className: "".concat(precls, "__item-weight-input"),
|
|
85
|
-
type: "number",
|
|
86
85
|
value: value,
|
|
87
86
|
onChange: onChangeHandler,
|
|
88
87
|
onBlur: onBlurHandler
|
|
@@ -473,7 +473,8 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
473
473
|
modifyOParent: onAddParentOkrHandler,
|
|
474
474
|
removeKr: onKrRemoveHandler,
|
|
475
475
|
removeParent: onParentRemoveHandler,
|
|
476
|
-
updateKrs: updateKrs
|
|
476
|
+
updateKrs: updateKrs,
|
|
477
|
+
getParentAndChildWorks: getParentAndChildWorks
|
|
477
478
|
}
|
|
478
479
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
479
480
|
className: (0, _classnames["default"])(preCls)
|
|
@@ -109,85 +109,87 @@ var _default = function _default(source, params) {
|
|
|
109
109
|
if (res.Code == 1) {
|
|
110
110
|
var listData = [];
|
|
111
111
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
var
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
}
|
|
140
|
-
});
|
|
141
|
-
|
|
142
|
-
if (item.Krs.length && source !== 'align') {
|
|
143
|
-
var _iterator2 = _createForOfIteratorHelper(item.Krs),
|
|
144
|
-
_step2;
|
|
145
|
-
|
|
146
|
-
try {
|
|
147
|
-
var _loop2 = function _loop2() {
|
|
148
|
-
var item1 = _step2.value;
|
|
149
|
-
listData.push({
|
|
150
|
-
columnId: item1.mileStoneId,
|
|
151
|
-
okrType: 'KR',
|
|
152
|
-
okrName: item1.mileStoneName,
|
|
153
|
-
cycleTime: "".concat(item1.startDate.slice(-5), "~").concat(item1.endDate.slice(-5)),
|
|
154
|
-
userInfo: {
|
|
155
|
-
name: item1.user.name,
|
|
156
|
-
avatarImg: item1.user.avatar.medium,
|
|
157
|
-
userId: item1.user.userId,
|
|
158
|
-
avatarColor: item1.user.avatar.color
|
|
159
|
-
},
|
|
160
|
-
riskLevel: item1.manualRiskLevel,
|
|
161
|
-
progress: item1.progress,
|
|
162
|
-
status: item1.status,
|
|
163
|
-
updateTime: item1.progressDescriptionDate,
|
|
164
|
-
createDate: item1.CreateDate,
|
|
165
|
-
behave: function behave() {
|
|
166
|
-
return _drawerManager["default"].open('krDetail', {
|
|
167
|
-
krId: item1.mileStoneId
|
|
168
|
-
});
|
|
169
|
-
}
|
|
112
|
+
if (res.Data.componentData) {
|
|
113
|
+
var _iterator = _createForOfIteratorHelper(res.Data.componentData),
|
|
114
|
+
_step;
|
|
115
|
+
|
|
116
|
+
try {
|
|
117
|
+
var _loop = function _loop() {
|
|
118
|
+
var item = _step.value;
|
|
119
|
+
listData.push({
|
|
120
|
+
columnId: item.workId,
|
|
121
|
+
okrType: 'O',
|
|
122
|
+
okrName: item.workName,
|
|
123
|
+
cycleTime: cycleTimeDisplay(item.cycleType, item.annualNum, item.yqmnum),
|
|
124
|
+
userInfo: {
|
|
125
|
+
name: item.principalUser.name,
|
|
126
|
+
avatarImg: item.principalUser.avatar.medium,
|
|
127
|
+
userId: item.principalUser.userId,
|
|
128
|
+
avatarColor: item.principalUser.avatar.color
|
|
129
|
+
},
|
|
130
|
+
riskLevel: item.manualRiskLevel,
|
|
131
|
+
progress: item.progress,
|
|
132
|
+
typeName: item.parentId > 0 || item.parentKrId > 0 ? '已对齐' : '未对齐',
|
|
133
|
+
updateTime: item.lastUpdatedDate,
|
|
134
|
+
status: item.status,
|
|
135
|
+
createDate: item.CreateDate,
|
|
136
|
+
behave: function behave() {
|
|
137
|
+
return _drawerManager["default"].open('okrDetail', {
|
|
138
|
+
okrId: item.workId
|
|
170
139
|
});
|
|
171
|
-
};
|
|
172
|
-
|
|
173
|
-
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
174
|
-
_loop2();
|
|
175
140
|
}
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
_iterator2.
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
if (item.Krs.length && source !== 'align') {
|
|
144
|
+
var _iterator2 = _createForOfIteratorHelper(item.Krs),
|
|
145
|
+
_step2;
|
|
146
|
+
|
|
147
|
+
try {
|
|
148
|
+
var _loop2 = function _loop2() {
|
|
149
|
+
var item1 = _step2.value;
|
|
150
|
+
listData.push({
|
|
151
|
+
columnId: item1.mileStoneId,
|
|
152
|
+
okrType: 'KR',
|
|
153
|
+
okrName: item1.mileStoneName,
|
|
154
|
+
cycleTime: "".concat(item1.startDate.slice(-5), "~").concat(item1.endDate.slice(-5)),
|
|
155
|
+
userInfo: {
|
|
156
|
+
name: item1.user.name,
|
|
157
|
+
avatarImg: item1.user.avatar.medium,
|
|
158
|
+
userId: item1.user.userId,
|
|
159
|
+
avatarColor: item1.user.avatar.color
|
|
160
|
+
},
|
|
161
|
+
riskLevel: item1.manualRiskLevel,
|
|
162
|
+
progress: item1.progress,
|
|
163
|
+
status: item1.status,
|
|
164
|
+
updateTime: item1.progressDescriptionDate,
|
|
165
|
+
createDate: item1.CreateDate,
|
|
166
|
+
behave: function behave() {
|
|
167
|
+
return _drawerManager["default"].open('krDetail', {
|
|
168
|
+
krId: item1.mileStoneId
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
});
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
175
|
+
_loop2();
|
|
176
|
+
}
|
|
177
|
+
} catch (err) {
|
|
178
|
+
_iterator2.e(err);
|
|
179
|
+
} finally {
|
|
180
|
+
_iterator2.f();
|
|
181
|
+
}
|
|
180
182
|
}
|
|
181
|
-
}
|
|
182
|
-
};
|
|
183
|
+
};
|
|
183
184
|
|
|
184
|
-
|
|
185
|
-
|
|
185
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
186
|
+
_loop();
|
|
187
|
+
}
|
|
188
|
+
} catch (err) {
|
|
189
|
+
_iterator.e(err);
|
|
190
|
+
} finally {
|
|
191
|
+
_iterator.f();
|
|
186
192
|
}
|
|
187
|
-
} catch (err) {
|
|
188
|
-
_iterator.e(err);
|
|
189
|
-
} finally {
|
|
190
|
-
_iterator.f();
|
|
191
193
|
}
|
|
192
194
|
|
|
193
195
|
dataList = listData;
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@ import React, { FC, useContext, useMemo, Fragment } from "react";
|
|
|
2
2
|
import classNames from "classnames";
|
|
3
3
|
import { IDynamicItemContentProps } from "../../interface";
|
|
4
4
|
import DynamicItemHeader from "../components/header";
|
|
5
|
-
import {
|
|
5
|
+
import { MileStoneStatusClass2StatusTypeText } from "./constant";
|
|
6
6
|
import { EObjType, EStatusStatus2ClassType } from "../../constant";
|
|
7
7
|
import { SearchKeyContext } from "../../context";
|
|
8
8
|
import SearchKeyHandle from "../../../search-key-handle";
|
|
@@ -91,7 +91,7 @@ const DynamicMilestone: FC<IDynamicItemContentProps> = ({
|
|
|
91
91
|
<div className={prefix + '__content-status-and-time-range'}>
|
|
92
92
|
<i className={classNames(EStatusStatus2ClassType[status])} />
|
|
93
93
|
<span className={prefix + '__content-status-text'}>
|
|
94
|
-
{
|
|
94
|
+
{MileStoneStatusClass2StatusTypeText[status]}
|
|
95
95
|
</span>
|
|
96
96
|
<i className={classNames('tu-icon-deferred')} />
|
|
97
97
|
<span className={prefix + '__content-time-range'}>
|
|
@@ -223,15 +223,6 @@ const Dynamic: FC = () => {
|
|
|
223
223
|
|
|
224
224
|
useEffect(() => {
|
|
225
225
|
if (searchKeyWord || searchKeyType || searchUser) {
|
|
226
|
-
// 搜索跳到全部动态
|
|
227
|
-
if (searchKeyWord) {
|
|
228
|
-
setActiveFirstLevelTabKey(1006);
|
|
229
|
-
// @ts-ignore
|
|
230
|
-
const secondTabsArr = tabsInfo.find((item) => item.CodeId === 1006)
|
|
231
|
-
.ChildMenus;
|
|
232
|
-
setSecondTabs(secondTabsArr);
|
|
233
|
-
setActiveSecondLevelTabKey(secondTabsArr[0].CodeId);
|
|
234
|
-
}
|
|
235
226
|
setIsChangeConditionLoading(true);
|
|
236
227
|
resetValue();
|
|
237
228
|
getDynamicData(true);
|
|
@@ -9,24 +9,25 @@ const prefix = "titaui-new-file-list";
|
|
|
9
9
|
|
|
10
10
|
const FileList: FC<IFileListProps> = ({ data, showDownload = true }) => {
|
|
11
11
|
const imgViewerRef = useRef();
|
|
12
|
-
const
|
|
12
|
+
const getImgIndex = (index) => {
|
|
13
|
+
let newIndex = 0;
|
|
14
|
+
for (let i = 0; i < index; i++) {
|
|
15
|
+
if (isImg(data[i].fileType)) {
|
|
16
|
+
newIndex++;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return newIndex;
|
|
20
|
+
}
|
|
21
|
+
|
|
13
22
|
const handleImgPreview = (index) => {
|
|
14
23
|
// @ts-ignore
|
|
15
|
-
imgViewerRef.current && imgViewerRef.current.show(index);
|
|
24
|
+
imgViewerRef.current && imgViewerRef.current.show(getImgIndex(index));
|
|
16
25
|
};
|
|
17
26
|
|
|
18
|
-
const getIndex = (file) => {
|
|
19
|
-
let index = imageIndexRef.current;
|
|
20
|
-
if (isImg(file.fileType)) {
|
|
21
|
-
imageIndexRef.current = index + 1;
|
|
22
|
-
}
|
|
23
|
-
return index
|
|
24
|
-
}
|
|
25
|
-
|
|
26
27
|
return (
|
|
27
28
|
<div className={prefix}>
|
|
28
29
|
{data.map((file, index) => (
|
|
29
|
-
<SingleFileCmp key={file.
|
|
30
|
+
<SingleFileCmp key={file.documentId+index} data={file} index={index} showDownload={showDownload} onPreview={handleImgPreview} />
|
|
30
31
|
))}
|
|
31
32
|
<ImgViewer showDownload={showDownload} data={data.filter(file => isImg(file.fileType))} ref={imgViewerRef}/>
|
|
32
33
|
</div>
|
|
@@ -2,7 +2,7 @@ import React, { useState, useContext } from "react";
|
|
|
2
2
|
import classNames from "classnames";
|
|
3
3
|
import { getBSGlobal } from "../../../../../../utils/bs-global";
|
|
4
4
|
import { ChildAuth } from "../../../../../../utils/auth";
|
|
5
|
-
import { CommonContext } from "../../../../context";
|
|
5
|
+
import { CommonContext, OkrListContext } from "../../../../context";
|
|
6
6
|
import { OkrRiskMapping } from "../../../../../progress/utils";
|
|
7
7
|
import drawerManager from "../../../../../drawer-manager";
|
|
8
8
|
import Progress from "../../../../../progress";
|
|
@@ -27,6 +27,7 @@ export default (props) => {
|
|
|
27
27
|
const [editVisible, setEditVisible] = useState(false);
|
|
28
28
|
|
|
29
29
|
const { refreshAll, okrInfo } = useContext(CommonContext);
|
|
30
|
+
const { getParentAndChildWorks } = useContext(OkrListContext);
|
|
30
31
|
const [user] = useState(data.principalUser);
|
|
31
32
|
const [OKrWeightSetting] = useState(
|
|
32
33
|
getBSGlobal("OkrAdvancedSetting")?.KRSetting?.OKrWeight || false
|
|
@@ -58,6 +59,7 @@ export default (props) => {
|
|
|
58
59
|
const handleOk = () => {
|
|
59
60
|
setEditVisible(false);
|
|
60
61
|
refreshAll();
|
|
62
|
+
getParentAndChildWorks()
|
|
61
63
|
};
|
|
62
64
|
|
|
63
65
|
return (
|
package/src/components/okr-detail/components/okr-tree/tree-node/o-child-node/weight-input.tsx
CHANGED
|
@@ -22,7 +22,7 @@ const WeightInput = (props: IProps) => {
|
|
|
22
22
|
|
|
23
23
|
const onBlurHandler = (e) => {
|
|
24
24
|
const currentValue = e.currentTarget.value;
|
|
25
|
-
if (currentValue == "") {
|
|
25
|
+
if (currentValue.trim() == "") {
|
|
26
26
|
onChange({ workId, value: 0, isError: false });
|
|
27
27
|
setIsError(false);
|
|
28
28
|
}
|
|
@@ -45,7 +45,6 @@ const WeightInput = (props: IProps) => {
|
|
|
45
45
|
>
|
|
46
46
|
<input
|
|
47
47
|
className={`${precls}__item-weight-input`}
|
|
48
|
-
type="number"
|
|
49
48
|
value={value}
|
|
50
49
|
onChange={onChangeHandler}
|
|
51
50
|
onBlur={onBlurHandler}
|
|
@@ -81,46 +81,48 @@ export default (source, params): Promise<{ dataList: TableData[], dataTotal: num
|
|
|
81
81
|
}).then(res => {
|
|
82
82
|
if (res.Code == 1) {
|
|
83
83
|
const listData: TableData[] = []
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
84
|
+
if (res.Data.componentData) {
|
|
85
|
+
for (let item of res.Data.componentData) {
|
|
86
|
+
listData.push({
|
|
87
|
+
columnId: item.workId,
|
|
88
|
+
okrType: 'O',
|
|
89
|
+
okrName: item.workName,
|
|
90
|
+
cycleTime: cycleTimeDisplay(item.cycleType, item.annualNum, item.yqmnum),
|
|
91
|
+
userInfo: {
|
|
92
|
+
name: item.principalUser.name,
|
|
93
|
+
avatarImg: item.principalUser.avatar.medium,
|
|
94
|
+
userId: item.principalUser.userId,
|
|
95
|
+
avatarColor: item.principalUser.avatar.color
|
|
96
|
+
},
|
|
97
|
+
riskLevel: item.manualRiskLevel,
|
|
98
|
+
progress: item.progress,
|
|
99
|
+
typeName: item.parentId > 0 || item.parentKrId > 0 ? '已对齐' : '未对齐',
|
|
100
|
+
updateTime: item.lastUpdatedDate,
|
|
101
|
+
status: item.status,
|
|
102
|
+
createDate: item.CreateDate,
|
|
103
|
+
behave: () => drawerManager.open('okrDetail', { okrId: item.workId })
|
|
104
|
+
})
|
|
105
|
+
if (item.Krs.length && source !== 'align') {
|
|
106
|
+
for (let item1 of item.Krs) {
|
|
107
|
+
listData.push({
|
|
108
|
+
columnId: item1.mileStoneId,
|
|
109
|
+
okrType: 'KR',
|
|
110
|
+
okrName: item1.mileStoneName,
|
|
111
|
+
cycleTime: `${item1.startDate.slice(-5)}~${item1.endDate.slice(-5)}`,
|
|
112
|
+
userInfo: {
|
|
113
|
+
name: item1.user.name,
|
|
114
|
+
avatarImg: item1.user.avatar.medium,
|
|
115
|
+
userId: item1.user.userId,
|
|
116
|
+
avatarColor: item1.user.avatar.color
|
|
117
|
+
},
|
|
118
|
+
riskLevel: item1.manualRiskLevel,
|
|
119
|
+
progress: item1.progress,
|
|
120
|
+
status: item1.status,
|
|
121
|
+
updateTime: item1.progressDescriptionDate,
|
|
122
|
+
createDate: item1.CreateDate,
|
|
123
|
+
behave: () => drawerManager.open('krDetail', { krId: item1.mileStoneId })
|
|
124
|
+
})
|
|
125
|
+
}
|
|
124
126
|
}
|
|
125
127
|
}
|
|
126
128
|
}
|