@titaui/pc 1.9.133 → 1.9.136
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/.eslintrc.js +1 -1
- package/lib/components/book-demo/components/pc/components/content/index.js +1 -1
- package/lib/components/book-demo/constant.js +2 -1
- package/lib/components/book-demo/utils.js +11 -2
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-task.js +25 -25
- package/lib/components/upload-photo-modal/index.js +1 -1
- package/package.json +1 -1
package/.eslintrc.js
CHANGED
|
@@ -176,7 +176,7 @@ var BookDemoPCContent = function BookDemoPCContent(_ref) {
|
|
|
176
176
|
source: source > 0 ? source : Source
|
|
177
177
|
}).then(function (res) {
|
|
178
178
|
if (res.data.Code) {
|
|
179
|
-
(0, _request.sendBookDemoJson)((0, _utils.bookDemoTransformDataToJson)(result, source > 0 ? source : Source, _constant.DemoTypeTextMap[type]));
|
|
179
|
+
(0, _request.sendBookDemoJson)((0, _utils.bookDemoTransformDataToJson)(result, source > 0 ? source : Source, _constant.DemoTypeTextMap[type], content));
|
|
180
180
|
|
|
181
181
|
_toast["default"].Success("提交成功");
|
|
182
182
|
|
|
@@ -810,7 +810,8 @@ var defaultBookDemoJsonValue = {
|
|
|
810
810
|
interestLearningTutoring: 0,
|
|
811
811
|
hasUseOKRManage: "",
|
|
812
812
|
hasCompanyDonePerAppraisals: "",
|
|
813
|
-
isCompanyHasPerSystem: ""
|
|
813
|
+
isCompanyHasPerSystem: "",
|
|
814
|
+
content: ""
|
|
814
815
|
};
|
|
815
816
|
exports.defaultBookDemoJsonValue = defaultBookDemoJsonValue;
|
|
816
817
|
var _default = bookTypeInfo;
|
|
@@ -33,12 +33,20 @@ var getSource = function getSource() {
|
|
|
33
33
|
|
|
34
34
|
exports.getSource = getSource;
|
|
35
35
|
|
|
36
|
-
var bookDemoTransformDataToJson = function bookDemoTransformDataToJson(data, source, appliedProduct) {
|
|
36
|
+
var bookDemoTransformDataToJson = function bookDemoTransformDataToJson(data, source, appliedProduct, content) {
|
|
37
37
|
var result = _objectSpread({}, _constant.defaultBookDemoJsonValue);
|
|
38
38
|
|
|
39
39
|
data.forEach(function (item) {
|
|
40
40
|
if (typeof item.value === "string") {
|
|
41
|
-
|
|
41
|
+
if (item.id === "employeeRange") {
|
|
42
|
+
if (/-/.test(item.value)) {
|
|
43
|
+
result.employeeCount = item.value.split("-")[1];
|
|
44
|
+
} else {
|
|
45
|
+
result.employeeCount = item.value;
|
|
46
|
+
}
|
|
47
|
+
} else {
|
|
48
|
+
result[item.id] = item.value;
|
|
49
|
+
}
|
|
42
50
|
} else if (item.type === "checkbox" && item.multiSelect) {
|
|
43
51
|
Object.keys(item.value).forEach(function (key) {
|
|
44
52
|
result[key] = item.value[key].isSelected ? 1 : 0;
|
|
@@ -57,6 +65,7 @@ var bookDemoTransformDataToJson = function bookDemoTransformDataToJson(data, sou
|
|
|
57
65
|
});
|
|
58
66
|
result.source = source;
|
|
59
67
|
result.appliedProduct = appliedProduct;
|
|
68
|
+
result.content = content;
|
|
60
69
|
delete result.verificationCode;
|
|
61
70
|
return result;
|
|
62
71
|
};
|
|
@@ -5,7 +5,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports["default"] =
|
|
8
|
+
exports["default"] = void 0;
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
@@ -80,12 +80,10 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
80
80
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
81
81
|
|
|
82
82
|
// status=3 已过期 status=2 已完成
|
|
83
|
-
function
|
|
83
|
+
function ETaskNode(props) {
|
|
84
84
|
var index = props.index,
|
|
85
85
|
title = props.title,
|
|
86
86
|
data = props.data,
|
|
87
|
-
level = props.level,
|
|
88
|
-
isLeaf = props.isLeaf,
|
|
89
87
|
createUserId = props.createUserId,
|
|
90
88
|
krUser = props.krUser;
|
|
91
89
|
|
|
@@ -95,9 +93,8 @@ function _default(props) {
|
|
|
95
93
|
setUnConnectVisible = _useState2[1];
|
|
96
94
|
|
|
97
95
|
var _useState3 = (0, _react.useState)(data.progress),
|
|
98
|
-
_useState4 = _slicedToArray(_useState3,
|
|
99
|
-
progress = _useState4[0]
|
|
100
|
-
setProgress = _useState4[1];
|
|
96
|
+
_useState4 = _slicedToArray(_useState3, 1),
|
|
97
|
+
progress = _useState4[0];
|
|
101
98
|
|
|
102
99
|
var _useState5 = (0, _react.useState)(data.principalUser || {}),
|
|
103
100
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
@@ -126,8 +123,8 @@ function _default(props) {
|
|
|
126
123
|
riskLevel: data.riskLevel
|
|
127
124
|
}),
|
|
128
125
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
129
|
-
|
|
130
|
-
|
|
126
|
+
dataInfo = _useState14[0],
|
|
127
|
+
setDataInfo = _useState14[1];
|
|
131
128
|
|
|
132
129
|
var _useContext = (0, _react.useContext)(_context2.CommonContext),
|
|
133
130
|
okrInfo = _useContext.okrInfo;
|
|
@@ -190,7 +187,7 @@ function _default(props) {
|
|
|
190
187
|
canClose: false
|
|
191
188
|
});
|
|
192
189
|
|
|
193
|
-
|
|
190
|
+
setDataInfo(_objectSpread(_objectSpread({}, dataInfo), {}, {
|
|
194
191
|
status: _constant.EStatusClass2StatusType[statusType]
|
|
195
192
|
}));
|
|
196
193
|
setIsGray(_constant.EStatusClass2StatusType[statusType] === 2);
|
|
@@ -239,7 +236,7 @@ function _default(props) {
|
|
|
239
236
|
while (1) {
|
|
240
237
|
switch (_context.prev = _context.next) {
|
|
241
238
|
case 0:
|
|
242
|
-
if (hasEditAuth) {
|
|
239
|
+
if (!(!hasEditAuth || dataInfo.status === 2)) {
|
|
243
240
|
_context.next = 2;
|
|
244
241
|
break;
|
|
245
242
|
}
|
|
@@ -251,8 +248,8 @@ function _default(props) {
|
|
|
251
248
|
return window.openDatePicker(e.target, {
|
|
252
249
|
isShowCycleView: false,
|
|
253
250
|
rangepickerOptions: {
|
|
254
|
-
startDate:
|
|
255
|
-
endDate:
|
|
251
|
+
startDate: dataInfo.startDate,
|
|
252
|
+
endDate: dataInfo.deadLine
|
|
256
253
|
}
|
|
257
254
|
});
|
|
258
255
|
|
|
@@ -266,7 +263,7 @@ function _default(props) {
|
|
|
266
263
|
isLongTerm: res.isLongTerm
|
|
267
264
|
}).then(function (resp) {
|
|
268
265
|
if (resp.Code === 1) {
|
|
269
|
-
|
|
266
|
+
setDataInfo(_objectSpread(_objectSpread({}, dataInfo), {}, {
|
|
270
267
|
deadLine: resp.Data.deadLine,
|
|
271
268
|
isLongTerm: resp.Data.isLongTerm,
|
|
272
269
|
status: resp.Data.status
|
|
@@ -319,7 +316,7 @@ function _default(props) {
|
|
|
319
316
|
_drawerManager["default"].close();
|
|
320
317
|
}
|
|
321
318
|
|
|
322
|
-
window.open("//".concat(location.host).concat(location.pathname, "#more/taskinfo?id=").concat(data.taskId));
|
|
319
|
+
window.open("//".concat(window.location.host).concat(window.location.pathname, "#more/taskinfo?id=").concat(data.taskId));
|
|
323
320
|
};
|
|
324
321
|
|
|
325
322
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -329,7 +326,7 @@ function _default(props) {
|
|
|
329
326
|
className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-node-prefix"))
|
|
330
327
|
}, /*#__PURE__*/_react["default"].createElement(_eStatusDropdown["default"], {
|
|
331
328
|
onChange: onEStatusChangeHandler,
|
|
332
|
-
checked: _constant.EStatusStatus2ClassType[
|
|
329
|
+
checked: _constant.EStatusStatus2ClassType[dataInfo.status],
|
|
333
330
|
hasAuth: hasEditAuth
|
|
334
331
|
})), /*#__PURE__*/_react["default"].createElement("span", {
|
|
335
332
|
className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-node-priority"))
|
|
@@ -352,7 +349,7 @@ function _default(props) {
|
|
|
352
349
|
name: user === null || user === void 0 ? void 0 : user.name,
|
|
353
350
|
id: user === null || user === void 0 ? void 0 : user.userId,
|
|
354
351
|
width: 64,
|
|
355
|
-
editable: hasEditAuth,
|
|
352
|
+
editable: dataInfo.status !== 2 && hasEditAuth,
|
|
356
353
|
onEditUser: onEditUserHandler,
|
|
357
354
|
isGetRoot: true,
|
|
358
355
|
extraCls: (isCancel || isGray) && "".concat(_precls["default"], "__e-project-node-gray")
|
|
@@ -360,10 +357,10 @@ function _default(props) {
|
|
|
360
357
|
className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-node-actions-date")),
|
|
361
358
|
onClick: updateDateHandler
|
|
362
359
|
}, /*#__PURE__*/_react["default"].createElement(_statusTime["default"], {
|
|
363
|
-
deadLine:
|
|
364
|
-
isLongTerm:
|
|
365
|
-
isCancel:
|
|
366
|
-
isComplete:
|
|
360
|
+
deadLine: dataInfo.deadLine,
|
|
361
|
+
isLongTerm: dataInfo.isLongTerm,
|
|
362
|
+
isCancel: dataInfo.status === 4,
|
|
363
|
+
isComplete: dataInfo.status === 2
|
|
367
364
|
})), /*#__PURE__*/_react["default"].createElement("span", {
|
|
368
365
|
className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-node-actions-progress ").concat((isGray || isCancel) && "".concat(_precls["default"], "__e-project-node-gray")))
|
|
369
366
|
}, /*#__PURE__*/_react["default"].createElement(_progress["default"].Circle, {
|
|
@@ -372,9 +369,9 @@ function _default(props) {
|
|
|
372
369
|
percent: progress,
|
|
373
370
|
linear: true,
|
|
374
371
|
linearId: data.taskId,
|
|
375
|
-
linearStartColor: (0, _getProcessColor["default"])(
|
|
376
|
-
linearEndColor: (0, _getProcessColor["default"])(
|
|
377
|
-
backgroundColor: (0, _getProcessColor["default"])(
|
|
372
|
+
linearStartColor: (0, _getProcessColor["default"])(dataInfo.riskLevel, "linearStartColor", dataInfo.status),
|
|
373
|
+
linearEndColor: (0, _getProcessColor["default"])(dataInfo.riskLevel, "linearEndColor", dataInfo.status),
|
|
374
|
+
backgroundColor: (0, _getProcessColor["default"])(dataInfo.riskLevel, "backgroundColor", dataInfo.status)
|
|
378
375
|
})), okrInfo.status === 1 && (hasRelativeAuth || isParticipant) ? /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
379
376
|
overlay: (0, _getLocale.getLocale)("OKR_MyO_Text_Cancel"),
|
|
380
377
|
placement: "top"
|
|
@@ -401,4 +398,7 @@ function _default(props) {
|
|
|
401
398
|
type: "button",
|
|
402
399
|
onClick: onSureUnConnectHandler
|
|
403
400
|
}, (0, _getLocale.getLocale)("OKR_MyO_Butt_Determine"))));
|
|
404
|
-
}
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
var _default = ETaskNode;
|
|
404
|
+
exports["default"] = _default;
|