@titaui/pc 1.11.13-beta.2 → 1.11.14-beta.1
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/.husky/pre-commit +1 -1
- package/lib/components/avatar/name-avatar/index.css +0 -1
- package/lib/components/avatar/name-avatar/index.js +13 -22
- package/lib/components/button/rect-btn/index.css +11 -25
- package/lib/components/button/rect-btn/index.js +4 -8
- package/lib/components/create-okr-modal/request-api.js +1 -1
- package/lib/components/drawer/headerAction.js +1 -5
- package/lib/components/drawer/headerDrop.js +4 -41
- package/lib/components/drawer/index.css +0 -44
- package/lib/components/drawer/index.js +6 -35
- package/lib/components/dynamic/constant.js +4 -2
- package/lib/components/dynamic/dynamic-item/dynamic-kr/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-progress/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-reply/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-task/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/index.js +14 -2
- package/lib/components/dynamic/dynamic-list/index.js +1 -9
- package/lib/components/icon-button-list/index.css +1 -56
- package/lib/components/icon-button-list/index.js +8 -5
- package/lib/components/nav-top/index.js +2 -6
- package/lib/components/okr-detail/base-info/other-infos/date-cycle/index.js +4 -16
- package/lib/components/okr-detail/base-info/other-infos/principal/index.js +1 -9
- package/lib/components/okr-detail/components/header/index.js +3 -9
- package/lib/components/okr-detail/components/header/o-name.js +3 -9
- package/lib/components/okr-detail/components/o-classify.js +1 -5
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.js +6 -9
- package/lib/components/okr-detail/detail-header/index.js +1 -12
- package/lib/components/okr-detail/index.js +2 -21
- package/lib/components/okr-detail/okr-list/index.js +2 -7
- package/lib/components/okr-detail/request-apis.js +1 -7
- package/lib/components/okr-flow/child-node/index.css +2 -0
- package/lib/components/okr-flow/child-node/work-node.js +3 -1
- package/lib/components/okr-period-selector/select-cycle.js +19 -23
- package/lib/components/okrcase-library/index.css +6 -4
- package/lib/index.js +0 -40
- package/lib/pages/new-okr-list/header/index.css +0 -45
- package/lib/pages/new-okr-list/header/index.js +16 -28
- package/lib/pages/new-okr-list/index.js +1 -3
- package/lib/pages/new-okr-list/list/index.js +2 -19
- package/lib/pages/okr-map/export-modules/okr-map/header/index.css +1 -1
- package/lib/pages/okr-map/export-modules/okr-map/header/index.js +14 -9
- package/lib/utils/format-time.js +1 -8
- package/lib/utils/open-data.js +1 -5
- package/package.json +1 -1
- package/lib/components/okr-detail/detail-header/constant.js +0 -53
- package/lib/components/okr-detail/helper.js +0 -62
- package/lib/components/textarea/index.css +0 -120
- package/lib/components/textarea/index.js +0 -257
- package/lib/pages/new-okr-list/header/common.js +0 -52
- package/lib/pages/new-okr-list/header/operate-record.js +0 -88
|
@@ -49,7 +49,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
49
49
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
50
50
|
|
|
51
51
|
function _formatCycleData(periodParams, getCycleRange) {
|
|
52
|
-
if (!periodParams) return
|
|
52
|
+
if (!periodParams) return "";
|
|
53
53
|
var startDate = periodParams.startDate;
|
|
54
54
|
var endDate = periodParams.endDate;
|
|
55
55
|
|
|
@@ -58,7 +58,7 @@ function _formatCycleData(periodParams, getCycleRange) {
|
|
|
58
58
|
endDate = periodParams.endDate.slice(5);
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
return "".concat(_periodSelector["default"].formatPeriod(periodParams)).concat(getCycleRange ? ",".concat(startDate, "~").concat(endDate) :
|
|
61
|
+
return "".concat(_periodSelector["default"].formatPeriod(periodParams)).concat(getCycleRange ? ",".concat(startDate, "~").concat(endDate) : "");
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
function CreateCycle(_ref) {
|
|
@@ -94,21 +94,21 @@ function CreateCycle(_ref) {
|
|
|
94
94
|
setCycleSetting = _useState4[1];
|
|
95
95
|
|
|
96
96
|
(0, _react.useEffect)(function () {
|
|
97
|
-
var settings = localStorage.getItem(
|
|
97
|
+
var settings = localStorage.getItem("OKR_CYCLE_SETTING");
|
|
98
98
|
|
|
99
99
|
if (settings) {
|
|
100
100
|
setCycleSetting(JSON.parse(settings));
|
|
101
101
|
return;
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
var url = (0, _helper.getApiUrl)(
|
|
105
|
-
(0, _helper.taker)(url,
|
|
104
|
+
var url = (0, _helper.getApiUrl)("okr/cycleSetting");
|
|
105
|
+
(0, _helper.taker)(url, "GET").then(function (res) {
|
|
106
106
|
if (res.Code == 1) {
|
|
107
107
|
setCycleSetting(res.Data);
|
|
108
108
|
}
|
|
109
109
|
});
|
|
110
110
|
}, []);
|
|
111
|
-
var cycleWrapperRef = (0, _react.useRef)(document.createElement(
|
|
111
|
+
var cycleWrapperRef = (0, _react.useRef)(document.createElement("div"));
|
|
112
112
|
|
|
113
113
|
var onPeriodSelectorChangeHandler = function onPeriodSelectorChangeHandler(c) {
|
|
114
114
|
setSelfCycle(_objectSpread(_objectSpread({}, selfCycle), c));
|
|
@@ -148,13 +148,13 @@ function CreateCycle(_ref) {
|
|
|
148
148
|
},
|
|
149
149
|
ref: cycleWrapperRef,
|
|
150
150
|
style: {
|
|
151
|
-
backgroundColor:
|
|
152
|
-
boxShadow:
|
|
151
|
+
backgroundColor: "white",
|
|
152
|
+
boxShadow: "0px 4px 12px 0px rgb(127 145 180 / 20%)",
|
|
153
153
|
borderRadius: 4
|
|
154
154
|
}
|
|
155
155
|
}, /*#__PURE__*/_react["default"].createElement(_periodSelector["default"], {
|
|
156
156
|
style: {
|
|
157
|
-
width:
|
|
157
|
+
width: "100%"
|
|
158
158
|
},
|
|
159
159
|
selected: selfCycle,
|
|
160
160
|
showFullCycle: false,
|
|
@@ -176,9 +176,9 @@ function CreateCycle(_ref) {
|
|
|
176
176
|
}))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
177
177
|
className: "okr-detail-date-cycle__date-line",
|
|
178
178
|
style: {
|
|
179
|
-
borderBottom:
|
|
179
|
+
borderBottom: "1px solid #F0F2F5"
|
|
180
180
|
}
|
|
181
|
-
}, (0, _getLocale.getLocale)(
|
|
181
|
+
}, (0, _getLocale.getLocale)("Mod_StartDate"), "\uFF1A", /*#__PURE__*/_react["default"].createElement(_rangePickerPop["default"], {
|
|
182
182
|
format: "YYYY/MM/DD",
|
|
183
183
|
controlled: true,
|
|
184
184
|
onConfirm: onStartDateConfirmHandler,
|
|
@@ -193,7 +193,7 @@ function CreateCycle(_ref) {
|
|
|
193
193
|
className: "tu-icon-arrow-down okr-detail-date-cycle__select-time-down-icon"
|
|
194
194
|
})))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
195
195
|
className: "okr-detail-date-cycle__date-line"
|
|
196
|
-
}, (0, _getLocale.getLocale)(
|
|
196
|
+
}, (0, _getLocale.getLocale)("Mod_EndDate"), "\uFF1A", /*#__PURE__*/_react["default"].createElement(_rangePickerPop["default"], {
|
|
197
197
|
format: "YYYY/MM/DD",
|
|
198
198
|
controlled: true,
|
|
199
199
|
onConfirm: onEndDateCOnfirmHandler,
|
|
@@ -208,8 +208,8 @@ function CreateCycle(_ref) {
|
|
|
208
208
|
className: "tu-icon-arrow-down okr-detail-date-cycle__select-time-down-icon"
|
|
209
209
|
})))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
210
210
|
style: {
|
|
211
|
-
display:
|
|
212
|
-
justifyContent:
|
|
211
|
+
display: "flex",
|
|
212
|
+
justifyContent: "flex-end"
|
|
213
213
|
}
|
|
214
214
|
}, /*#__PURE__*/_react["default"].createElement(_titaUi.Button, {
|
|
215
215
|
size: "s",
|
|
@@ -217,15 +217,15 @@ function CreateCycle(_ref) {
|
|
|
217
217
|
marginRight: 12
|
|
218
218
|
},
|
|
219
219
|
onClick: onCancelClickHandler
|
|
220
|
-
}, (0, _getLocale.getLocale)(
|
|
220
|
+
}, (0, _getLocale.getLocale)("Mod_Cancel")), /*#__PURE__*/_react["default"].createElement(_titaUi.Button, {
|
|
221
221
|
size: "s",
|
|
222
222
|
type: "primary",
|
|
223
223
|
onClick: onSureClickHandler
|
|
224
|
-
}, (0, _getLocale.getLocale)(
|
|
224
|
+
}, (0, _getLocale.getLocale)("OKR_MyO_Butt_Determine"))));
|
|
225
225
|
} else {
|
|
226
|
-
return
|
|
226
|
+
return /*#__PURE__*/_react["default"].createElement(_periodSelector["default"], {
|
|
227
227
|
style: {
|
|
228
|
-
width:
|
|
228
|
+
width: "100%"
|
|
229
229
|
},
|
|
230
230
|
selected: cycle,
|
|
231
231
|
showFullCycle: false,
|
|
@@ -245,11 +245,7 @@ function CreateCycle(_ref) {
|
|
|
245
245
|
btnRef: btnRef,
|
|
246
246
|
clickCallback: function clickCallback() {},
|
|
247
247
|
text: _formatCycleData(cycle, getCycleRange)
|
|
248
|
-
}))
|
|
249
|
-
btnRef: btnRef,
|
|
250
|
-
clickCallback: function clickCallback() {},
|
|
251
|
-
text: _formatCycleData(cycle, getCycleRange)
|
|
252
|
-
});
|
|
248
|
+
}));
|
|
253
249
|
}
|
|
254
250
|
}
|
|
255
251
|
|
|
@@ -647,12 +647,14 @@
|
|
|
647
647
|
}
|
|
648
648
|
|
|
649
649
|
.okr-cases-library__pay-window__commit-order {
|
|
650
|
-
background: #
|
|
650
|
+
background: #ffffff;
|
|
651
651
|
border-radius: 8px;
|
|
652
|
-
border: 1px solid #
|
|
652
|
+
border: 1px solid #dfe3ea;
|
|
653
653
|
padding: 12px 20px;
|
|
654
|
-
color: #
|
|
654
|
+
color: #3f4755;
|
|
655
655
|
cursor: pointer;
|
|
656
|
+
display: flex;
|
|
657
|
+
align-items: center;
|
|
656
658
|
}
|
|
657
659
|
|
|
658
660
|
.okr-cases-library__pay-window__commit-order--wx {
|
|
@@ -660,7 +662,7 @@
|
|
|
660
662
|
}
|
|
661
663
|
|
|
662
664
|
.okr-cases-library__pay-window__commit-order--active {
|
|
663
|
-
border-color: #
|
|
665
|
+
border-color: #2879ff;
|
|
664
666
|
position: relative;
|
|
665
667
|
}
|
|
666
668
|
|
package/lib/index.js
CHANGED
|
@@ -51,12 +51,6 @@ Object.defineProperty(exports, "Communication", {
|
|
|
51
51
|
return _communication["default"];
|
|
52
52
|
}
|
|
53
53
|
});
|
|
54
|
-
Object.defineProperty(exports, "ConditionRender", {
|
|
55
|
-
enumerable: true,
|
|
56
|
-
get: function get() {
|
|
57
|
-
return _conditionRender["default"];
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
54
|
Object.defineProperty(exports, "Confidence", {
|
|
61
55
|
enumerable: true,
|
|
62
56
|
get: function get() {
|
|
@@ -69,12 +63,6 @@ Object.defineProperty(exports, "CreateOkrModal", {
|
|
|
69
63
|
return _createOkrModal["default"];
|
|
70
64
|
}
|
|
71
65
|
});
|
|
72
|
-
Object.defineProperty(exports, "DangerousHtml", {
|
|
73
|
-
enumerable: true,
|
|
74
|
-
get: function get() {
|
|
75
|
-
return _dangerousHtml["default"];
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
66
|
Object.defineProperty(exports, "DatePicker", {
|
|
79
67
|
enumerable: true,
|
|
80
68
|
get: function get() {
|
|
@@ -171,12 +159,6 @@ Object.defineProperty(exports, "Form", {
|
|
|
171
159
|
return _form["default"];
|
|
172
160
|
}
|
|
173
161
|
});
|
|
174
|
-
Object.defineProperty(exports, "FormatTime", {
|
|
175
|
-
enumerable: true,
|
|
176
|
-
get: function get() {
|
|
177
|
-
return _formatTime["default"];
|
|
178
|
-
}
|
|
179
|
-
});
|
|
180
162
|
Object.defineProperty(exports, "GridLayout", {
|
|
181
163
|
enumerable: true,
|
|
182
164
|
get: function get() {
|
|
@@ -393,12 +375,6 @@ Object.defineProperty(exports, "Progress", {
|
|
|
393
375
|
return _progress["default"];
|
|
394
376
|
}
|
|
395
377
|
});
|
|
396
|
-
Object.defineProperty(exports, "PublishDynamicModal", {
|
|
397
|
-
enumerable: true,
|
|
398
|
-
get: function get() {
|
|
399
|
-
return _publishDynamicModal["default"];
|
|
400
|
-
}
|
|
401
|
-
});
|
|
402
378
|
Object.defineProperty(exports, "Radio", {
|
|
403
379
|
enumerable: true,
|
|
404
380
|
get: function get() {
|
|
@@ -495,12 +471,6 @@ Object.defineProperty(exports, "TaskRelationModal", {
|
|
|
495
471
|
return _taskRelationModal["default"];
|
|
496
472
|
}
|
|
497
473
|
});
|
|
498
|
-
Object.defineProperty(exports, "Textarea", {
|
|
499
|
-
enumerable: true,
|
|
500
|
-
get: function get() {
|
|
501
|
-
return _textarea["default"];
|
|
502
|
-
}
|
|
503
|
-
});
|
|
504
474
|
Object.defineProperty(exports, "TitaChart", {
|
|
505
475
|
enumerable: true,
|
|
506
476
|
get: function get() {
|
|
@@ -812,14 +782,4 @@ var _weeklyReport = _interopRequireDefault(require("./components/weekly-report")
|
|
|
812
782
|
|
|
813
783
|
var _wechatBtn = _interopRequireDefault(require("./components/wechat-btn"));
|
|
814
784
|
|
|
815
|
-
var _conditionRender = _interopRequireDefault(require("./components/condition-render"));
|
|
816
|
-
|
|
817
|
-
var _publishDynamicModal = _interopRequireDefault(require("./components/publish-dynamic-modal"));
|
|
818
|
-
|
|
819
|
-
var _dangerousHtml = _interopRequireDefault(require("./components/dangerous-html"));
|
|
820
|
-
|
|
821
|
-
var _textarea = _interopRequireDefault(require("./components/textarea"));
|
|
822
|
-
|
|
823
|
-
var _formatTime = _interopRequireDefault(require("./utils/format-time"));
|
|
824
|
-
|
|
825
785
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -36,51 +36,6 @@
|
|
|
36
36
|
color: #2879ff;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
.tita-okr-list-v2__header-record {
|
|
40
|
-
display: flex;
|
|
41
|
-
box-sizing: border-box;
|
|
42
|
-
justify-content: center;
|
|
43
|
-
align-items: center;
|
|
44
|
-
transform: rotate(90deg);
|
|
45
|
-
background: #fff;
|
|
46
|
-
box-shadow: 0px 0px 8px 0px rgba(127, 145, 180, 0.1);
|
|
47
|
-
width: 36px;
|
|
48
|
-
height: 36px;
|
|
49
|
-
margin-left: 12px;
|
|
50
|
-
border-radius: 18px;
|
|
51
|
-
font-size: 20px;
|
|
52
|
-
cursor: pointer;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.tita-okr-list-v2__header-record-popup {
|
|
56
|
-
padding: 16px 12px;
|
|
57
|
-
box-sizing: border-box;
|
|
58
|
-
background: #ffffff;
|
|
59
|
-
box-shadow: 0px 4px 12px 0px rgba(127, 145, 180, 0.2);
|
|
60
|
-
border-radius: 12px;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.tita-okr-list-v2__header-record-item {
|
|
64
|
-
display: flex;
|
|
65
|
-
align-items: center;
|
|
66
|
-
padding: 5px 8px;
|
|
67
|
-
box-sizing: border-box;
|
|
68
|
-
font-size: 14px;
|
|
69
|
-
color: #3f4755;
|
|
70
|
-
line-height: 22px;
|
|
71
|
-
cursor: pointer;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.tita-okr-list-v2__header-record-item:hover {
|
|
75
|
-
color: #2879ff;
|
|
76
|
-
background: #f7f8fa;
|
|
77
|
-
border-radius: 8px;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.tita-okr-list-v2__header-record-item-content {
|
|
81
|
-
margin-left: 8px;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
39
|
.tita-okr-list-v2__header-filter {
|
|
85
40
|
box-sizing: border-box;
|
|
86
41
|
height: 36px;
|
|
@@ -29,8 +29,6 @@ var _filter = _interopRequireDefault(require("./filter"));
|
|
|
29
29
|
|
|
30
30
|
var _comments = _interopRequireDefault(require("./comments"));
|
|
31
31
|
|
|
32
|
-
var _operateRecord = _interopRequireDefault(require("./operate-record"));
|
|
33
|
-
|
|
34
32
|
var _context = require("../context");
|
|
35
33
|
|
|
36
34
|
var _requestApi = require("../request-api");
|
|
@@ -67,7 +65,6 @@ function Header(props, ref) {
|
|
|
67
65
|
cycleType = _useContext.cycleType,
|
|
68
66
|
yqmNum = _useContext.yqmNum;
|
|
69
67
|
|
|
70
|
-
var relationShip = parseInt(relation, 10);
|
|
71
68
|
var onSearch = props.onSearch,
|
|
72
69
|
onFrontAddOKR = props.onFrontAddOKR;
|
|
73
70
|
|
|
@@ -87,26 +84,21 @@ function Header(props, ref) {
|
|
|
87
84
|
setUserInfo = _useState6[1];
|
|
88
85
|
|
|
89
86
|
(0, _react.useEffect)(function () {
|
|
90
|
-
if (toUserId !== undefined ||
|
|
87
|
+
if (toUserId !== undefined || relation == 1) {
|
|
91
88
|
var userId = toUserId;
|
|
92
|
-
if (
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
setUserInfo(res.Data);
|
|
97
|
-
});
|
|
98
|
-
}
|
|
89
|
+
if (relation == 1) userId = (0, _bsGlobal.getUserInfo)().Id;
|
|
90
|
+
userId && (0, _requestApi.getUserInfoById)(userId).then(function (res) {
|
|
91
|
+
setUserInfo(res.Data);
|
|
92
|
+
});
|
|
99
93
|
}
|
|
100
94
|
}, [toUserId, relation]);
|
|
101
95
|
(0, _react.useEffect)(function () {
|
|
102
96
|
setInit(true);
|
|
103
97
|
}, []);
|
|
104
98
|
(0, _react.useEffect)(function () {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
});
|
|
109
|
-
}
|
|
99
|
+
init && onSearch({
|
|
100
|
+
onlyThisDept: onlyThisDept
|
|
101
|
+
});
|
|
110
102
|
}, [onlyThisDept]);
|
|
111
103
|
var createOkrRef = (0, _react.useRef)();
|
|
112
104
|
(0, _react.useImperativeHandle)(ref, function () {
|
|
@@ -133,7 +125,7 @@ function Header(props, ref) {
|
|
|
133
125
|
};
|
|
134
126
|
var searchType = "company";
|
|
135
127
|
|
|
136
|
-
if (departmentId && departmentId
|
|
128
|
+
if (departmentId && departmentId != -1) {
|
|
137
129
|
rootNode.rootId = departmentId;
|
|
138
130
|
rootNode.rootName = departmentName || "";
|
|
139
131
|
searchType = "depart";
|
|
@@ -149,7 +141,7 @@ function Header(props, ref) {
|
|
|
149
141
|
level2Selected.name = userInfo.name || "";
|
|
150
142
|
}
|
|
151
143
|
|
|
152
|
-
if (
|
|
144
|
+
if (relation == 1) {
|
|
153
145
|
rootNode.rootId = (0, _bsGlobal.getUserInfo)().Id;
|
|
154
146
|
rootNode.rootName = (0, _bsGlobal.getUserInfo)().Name || "";
|
|
155
147
|
searchType = "user";
|
|
@@ -162,18 +154,18 @@ function Header(props, ref) {
|
|
|
162
154
|
annualNum: annualNum,
|
|
163
155
|
yqmNum: yqmNum
|
|
164
156
|
})), "rootNode=".concat(JSON.stringify(rootNode)), "level2Selected=".concat(JSON.stringify(level2Selected))].join("&");
|
|
165
|
-
var origin = window.location.href.split(
|
|
157
|
+
var origin = window.location.href.split('#')[0];
|
|
166
158
|
window.location.href = "".concat(origin, "/#okr/map?").concat(urlQuery);
|
|
167
159
|
};
|
|
168
160
|
|
|
169
161
|
var getTitle = function getTitle() {
|
|
170
|
-
if (
|
|
162
|
+
if (relation == 1) {
|
|
171
163
|
return /*#__PURE__*/_react["default"].createElement(_userTitle["default"], {
|
|
172
164
|
toUserId: (0, _bsGlobal.getUserInfo)().Id
|
|
173
165
|
});
|
|
174
166
|
}
|
|
175
167
|
|
|
176
|
-
if (
|
|
168
|
+
if (relation == 2 || relation == 3) {
|
|
177
169
|
return /*#__PURE__*/_react["default"].createElement(_relationTitle["default"], {
|
|
178
170
|
relation: relation
|
|
179
171
|
});
|
|
@@ -205,11 +197,11 @@ function Header(props, ref) {
|
|
|
205
197
|
className: "".concat(_precls.precls, "__header-item")
|
|
206
198
|
}, getTitle())), /*#__PURE__*/_react["default"].createElement("div", {
|
|
207
199
|
className: "".concat(_precls.precls, "__header-right")
|
|
208
|
-
}, departmentId
|
|
200
|
+
}, departmentId == 0 && /*#__PURE__*/_react["default"].createElement("div", {
|
|
209
201
|
className: "".concat(_precls.precls, "__header-item")
|
|
210
202
|
}, /*#__PURE__*/_react["default"].createElement(_keywordSearch["default"], {
|
|
211
203
|
onSearch: onSearch
|
|
212
|
-
})),
|
|
204
|
+
})), relation != 2 && relation != 3 &&
|
|
213
205
|
/*#__PURE__*/
|
|
214
206
|
// 我关注的 我参与的 没有创建按钮
|
|
215
207
|
_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -229,14 +221,10 @@ function Header(props, ref) {
|
|
|
229
221
|
className: "tu-icon-yangshi-ditu"
|
|
230
222
|
}))))), /*#__PURE__*/_react["default"].createElement(_comments["default"], {
|
|
231
223
|
toUserId: toUserId,
|
|
232
|
-
relation:
|
|
224
|
+
relation: relation,
|
|
233
225
|
userInfo: userInfo
|
|
234
226
|
}), /*#__PURE__*/_react["default"].createElement(_filter["default"], {
|
|
235
227
|
onSearch: onSearch
|
|
236
|
-
}), /*#__PURE__*/_react["default"].createElement(_operateRecord["default"], {
|
|
237
|
-
toUserId: toUserId,
|
|
238
|
-
userInfo: userInfo,
|
|
239
|
-
relation: relationShip
|
|
240
228
|
})));
|
|
241
229
|
}
|
|
242
230
|
|
|
@@ -85,8 +85,7 @@ var NewOkrList = function NewOkrList(props) {
|
|
|
85
85
|
var OkrListCmp = props.OkrListCmp,
|
|
86
86
|
OkrCommunicationPush = props.OkrCommunicationPush,
|
|
87
87
|
Empty = props.Empty,
|
|
88
|
-
SetCycleModal = props.SetCycleModal
|
|
89
|
-
OkrOperateRecordDrawer = props.OkrOperateRecordDrawer;
|
|
88
|
+
SetCycleModal = props.SetCycleModal;
|
|
90
89
|
var useLocalStorage = new _localStorage.LocalStorage();
|
|
91
90
|
var formFieldValues = useLocalStorage.getItem("okr-filter-values") || {
|
|
92
91
|
targetType: "",
|
|
@@ -317,7 +316,6 @@ var NewOkrList = function NewOkrList(props) {
|
|
|
317
316
|
return /*#__PURE__*/_react["default"].createElement(_context.Context.Provider, {
|
|
318
317
|
value: _objectSpread({
|
|
319
318
|
OkrCommunicationPush: OkrCommunicationPush,
|
|
320
|
-
OkrOperateRecordDrawer: OkrOperateRecordDrawer,
|
|
321
319
|
relation: relation,
|
|
322
320
|
departmentName: departmentName,
|
|
323
321
|
departmentId: departmentId,
|
|
@@ -1,19 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
6
|
exports["default"] = void 0;
|
|
9
7
|
|
|
10
|
-
var _react =
|
|
11
|
-
|
|
12
|
-
var _context = require("../context");
|
|
13
|
-
|
|
14
|
-
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); }
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
15
9
|
|
|
16
|
-
function
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
11
|
|
|
18
12
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
19
13
|
|
|
@@ -37,19 +31,8 @@ function List(props) {
|
|
|
37
31
|
refreshList = props.refreshList,
|
|
38
32
|
replaceOkr = props.replaceOkr;
|
|
39
33
|
var OkrListCmp = props.OkrListCmp;
|
|
40
|
-
|
|
41
|
-
var _useContext = (0, _react.useContext)(_context.Context),
|
|
42
|
-
annualNum = _useContext.annualNum,
|
|
43
|
-
cycleType = _useContext.cycleType,
|
|
44
|
-
yqmNum = _useContext.yqmNum;
|
|
45
|
-
|
|
46
34
|
return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(OkrListCmp, {
|
|
47
35
|
okrData: okrs,
|
|
48
|
-
cycle: {
|
|
49
|
-
annualNum: annualNum,
|
|
50
|
-
cycleType: cycleType,
|
|
51
|
-
yqmNum: yqmNum
|
|
52
|
-
},
|
|
53
36
|
addOkr: function addOkr(okr) {
|
|
54
37
|
setOkrs([].concat(_toConsumableArray(okrs), [okr]));
|
|
55
38
|
},
|
|
@@ -85,18 +85,23 @@ function _default(props) {
|
|
|
85
85
|
setOVisible = _useState4[1];
|
|
86
86
|
|
|
87
87
|
var iconButtons = [{
|
|
88
|
-
icon: "
|
|
89
|
-
overlay: (0, _getLocale.getLocale)("Mod_Export")
|
|
88
|
+
icon: "daochu",
|
|
89
|
+
overlay: (0, _getLocale.getLocale)("Mod_Export"),
|
|
90
|
+
type: 'export'
|
|
90
91
|
}, {
|
|
91
|
-
icon: "
|
|
92
|
-
overlay: (0, _getLocale.getLocale)("OKR_MyO_Share")
|
|
92
|
+
icon: "fenxiang",
|
|
93
|
+
overlay: (0, _getLocale.getLocale)("OKR_MyO_Share"),
|
|
94
|
+
type: 'share'
|
|
93
95
|
}, {
|
|
94
|
-
icon: fullScreen ? "
|
|
95
|
-
overlay: (0, _getLocale.getLocale)("OKR_Ali_Butt_Fullscreen")
|
|
96
|
+
icon: fullScreen ? "restore" : "quanping",
|
|
97
|
+
overlay: (0, _getLocale.getLocale)("OKR_Ali_Butt_Fullscreen"),
|
|
98
|
+
type: fullScreen ? 'quit-fullscreen' : 'fullscreen'
|
|
96
99
|
}, {
|
|
97
|
-
icon: direction == "horizontal" ? "
|
|
100
|
+
icon: direction == "horizontal" ? "yangshi-ditu" : "yangshi-ditu",
|
|
98
101
|
overlay: direction == "horizontal" ? "".concat((0, _getLocale.getLocale)("OKR_Ali_Butt_Toggleportrait")) : "".concat((0, _getLocale.getLocale)("OKR_Ali_Butt_Togglelandscape")),
|
|
99
|
-
placement: "topRight"
|
|
102
|
+
placement: "topRight",
|
|
103
|
+
rotate: direction == "horizontal" ? 0 : -90,
|
|
104
|
+
type: direction == "horizontal" ? "vertical" : "horizontal"
|
|
100
105
|
}];
|
|
101
106
|
|
|
102
107
|
var onConfirmHandler = function onConfirmHandler(checked) {
|
|
@@ -124,7 +129,7 @@ function _default(props) {
|
|
|
124
129
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
125
130
|
className: (0, _classnames["default"])("".concat(preCls, "__header-action-showkr"))
|
|
126
131
|
}, /*#__PURE__*/_react["default"].createElement(_switch["default"], {
|
|
127
|
-
label:
|
|
132
|
+
label: (0, _getLocale.getLocale)("OKR_Db_KRDetails"),
|
|
128
133
|
checked: showCardKr,
|
|
129
134
|
onChange: onhandleShowCardKr
|
|
130
135
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
package/lib/utils/format-time.js
CHANGED
|
@@ -167,12 +167,5 @@ var showNextMonthFirstDay = function showNextMonthFirstDay() {
|
|
|
167
167
|
};
|
|
168
168
|
|
|
169
169
|
exports.showNextMonthFirstDay = showNextMonthFirstDay;
|
|
170
|
-
var _default =
|
|
171
|
-
getTimeString: getTimeString,
|
|
172
|
-
timeFormat: timeFormat,
|
|
173
|
-
showWeekFirstDay: showWeekFirstDay,
|
|
174
|
-
showMonthFirstDay: showMonthFirstDay,
|
|
175
|
-
showNextWeekFirstDay: showNextWeekFirstDay,
|
|
176
|
-
showNextMonthFirstDay: showNextMonthFirstDay
|
|
177
|
-
};
|
|
170
|
+
var _default = getTimeString;
|
|
178
171
|
exports["default"] = _default;
|
package/lib/utils/open-data.js
CHANGED
|
@@ -356,10 +356,6 @@ exports.parseHtmlAndTextTag = parseHtmlAndTextTag;
|
|
|
356
356
|
var _default = {
|
|
357
357
|
OpenUserName: OpenUserName,
|
|
358
358
|
OpenDepartmentName: OpenDepartmentName,
|
|
359
|
-
isWechat: isWechat
|
|
360
|
-
isPlatform: isPlatform,
|
|
361
|
-
parseString: parseString,
|
|
362
|
-
parseTag: parseTag,
|
|
363
|
-
parseHtmlAndTextTag: parseHtmlAndTextTag
|
|
359
|
+
isWechat: isWechat
|
|
364
360
|
};
|
|
365
361
|
exports["default"] = _default;
|
package/package.json
CHANGED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.getApproveStatusTextMap = exports.ApproveStatusColor = exports.ApproveStatus = void 0;
|
|
7
|
-
|
|
8
|
-
var _getLocale = require("../../../utils/getLocale");
|
|
9
|
-
|
|
10
|
-
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; }
|
|
11
|
-
|
|
12
|
-
var ApproveStatus;
|
|
13
|
-
exports.ApproveStatus = ApproveStatus;
|
|
14
|
-
|
|
15
|
-
(function (ApproveStatus) {
|
|
16
|
-
ApproveStatus[ApproveStatus["None"] = 0] = "None";
|
|
17
|
-
ApproveStatus[ApproveStatus["WaitCommit"] = 6] = "WaitCommit";
|
|
18
|
-
ApproveStatus[ApproveStatus["Rejected"] = 3] = "Rejected";
|
|
19
|
-
ApproveStatus[ApproveStatus["UnderApproval"] = 1] = "UnderApproval";
|
|
20
|
-
ApproveStatus[ApproveStatus["ApproveAgree"] = 2] = "ApproveAgree";
|
|
21
|
-
ApproveStatus[ApproveStatus["WithDraw"] = 4] = "WithDraw";
|
|
22
|
-
ApproveStatus[ApproveStatus["Done"] = 5] = "Done";
|
|
23
|
-
})(ApproveStatus || (exports.ApproveStatus = ApproveStatus = {}));
|
|
24
|
-
|
|
25
|
-
var getApproveStatusTextMap = function getApproveStatusTextMap(status) {
|
|
26
|
-
var _ApproveStatusTextMap;
|
|
27
|
-
|
|
28
|
-
var ApproveStatusTextMap = (_ApproveStatusTextMap = {}, _defineProperty(_ApproveStatusTextMap, ApproveStatus.WaitCommit, (0, _getLocale.getLocale)('OKR_MyO_Tobesubmitted')), _defineProperty(_ApproveStatusTextMap, ApproveStatus.Rejected, (0, _getLocale.getLocale)('OKR_MyO_Tobesubmitted')), _defineProperty(_ApproveStatusTextMap, ApproveStatus.UnderApproval, (0, _getLocale.getLocale)('Pro_detail_Approval')), _defineProperty(_ApproveStatusTextMap, ApproveStatus.ApproveAgree, ''), _defineProperty(_ApproveStatusTextMap, ApproveStatus.WithDraw, ''), _defineProperty(_ApproveStatusTextMap, ApproveStatus.None, ''), _defineProperty(_ApproveStatusTextMap, ApproveStatus.Done, ''), _ApproveStatusTextMap);
|
|
29
|
-
return ApproveStatusTextMap[status];
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
exports.getApproveStatusTextMap = getApproveStatusTextMap;
|
|
33
|
-
|
|
34
|
-
var ApproveStatusColor = function ApproveStatusColor(status) {
|
|
35
|
-
var _ApprovalStatusColorM;
|
|
36
|
-
|
|
37
|
-
var ApprovalStatusColorMap = (_ApprovalStatusColorM = {}, _defineProperty(_ApprovalStatusColorM, ApproveStatus.WaitCommit, {
|
|
38
|
-
color: '#F0A326',
|
|
39
|
-
bgColor: 'rgba(240, 163, 38, 0.1)'
|
|
40
|
-
}), _defineProperty(_ApprovalStatusColorM, ApproveStatus.Rejected, {
|
|
41
|
-
color: '#F0A326',
|
|
42
|
-
bgColor: 'rgba(240, 163, 38, 0.1)'
|
|
43
|
-
}), _defineProperty(_ApprovalStatusColorM, ApproveStatus.UnderApproval, {
|
|
44
|
-
color: '#2879FF',
|
|
45
|
-
bgColor: 'rgba(40, 121, 255, 0.1)'
|
|
46
|
-
}), _defineProperty(_ApprovalStatusColorM, ApproveStatus.ApproveAgree, {
|
|
47
|
-
color: '#ffffff',
|
|
48
|
-
bgColor: '#ffffff'
|
|
49
|
-
}), _ApprovalStatusColorM);
|
|
50
|
-
return ApprovalStatusColorMap[status];
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
exports.ApproveStatusColor = ApproveStatusColor;
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.getApprovalOpenItem = exports.getApprovalIsShow = exports.EApproveStatus = exports.EApprovalTypes = void 0;
|
|
7
|
-
var EApprovalTypes;
|
|
8
|
-
exports.EApprovalTypes = EApprovalTypes;
|
|
9
|
-
|
|
10
|
-
(function (EApprovalTypes) {
|
|
11
|
-
EApprovalTypes[EApprovalTypes["CreateOkr"] = 53] = "CreateOkr";
|
|
12
|
-
EApprovalTypes[EApprovalTypes["ChangeOkrName"] = 54] = "ChangeOkrName";
|
|
13
|
-
EApprovalTypes[EApprovalTypes["ChangeOkrTime"] = 56] = "ChangeOkrTime";
|
|
14
|
-
EApprovalTypes[EApprovalTypes["DeleteOkr"] = 55] = "DeleteOkr";
|
|
15
|
-
})(EApprovalTypes || (exports.EApprovalTypes = EApprovalTypes = {}));
|
|
16
|
-
|
|
17
|
-
var EApproveStatus;
|
|
18
|
-
exports.EApproveStatus = EApproveStatus;
|
|
19
|
-
|
|
20
|
-
(function (EApproveStatus) {
|
|
21
|
-
EApproveStatus[EApproveStatus["None"] = 0] = "None";
|
|
22
|
-
EApproveStatus[EApproveStatus["WaitCommit"] = 6] = "WaitCommit";
|
|
23
|
-
EApproveStatus[EApproveStatus["Rejected"] = 3] = "Rejected";
|
|
24
|
-
EApproveStatus[EApproveStatus["UnderApproval"] = 1] = "UnderApproval";
|
|
25
|
-
EApproveStatus[EApproveStatus["ApproveAgree"] = 2] = "ApproveAgree";
|
|
26
|
-
EApproveStatus[EApproveStatus["WithDraw"] = 4] = "WithDraw";
|
|
27
|
-
EApproveStatus[EApproveStatus["Done"] = 5] = "Done";
|
|
28
|
-
})(EApproveStatus || (exports.EApproveStatus = EApproveStatus = {}));
|
|
29
|
-
|
|
30
|
-
var getApprovalOpenItem = function getApprovalOpenItem(setting) {
|
|
31
|
-
var result = {
|
|
32
|
-
isOpen: setting.isOpened === 1,
|
|
33
|
-
changeOkrName: false,
|
|
34
|
-
changeOkrTime: false,
|
|
35
|
-
deleteOkr: false,
|
|
36
|
-
createOkr: false
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
if (setting !== null && setting !== void 0 && setting.okrApprovalSettings) {
|
|
40
|
-
setting.okrApprovalSettings.forEach(function (item) {
|
|
41
|
-
if (item.approvalType === EApprovalTypes.ChangeOkrName) {
|
|
42
|
-
result.changeOkrName = true;
|
|
43
|
-
} else if (item.approvalType === EApprovalTypes.ChangeOkrTime) {
|
|
44
|
-
result.changeOkrTime = true;
|
|
45
|
-
} else if (item.approvalType === EApprovalTypes.CreateOkr) {
|
|
46
|
-
result.createOkr = true;
|
|
47
|
-
} else if (item.approvalType === EApprovalTypes.DeleteOkr) {
|
|
48
|
-
result.deleteOkr = true;
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
return result;
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
exports.getApprovalOpenItem = getApprovalOpenItem;
|
|
57
|
-
|
|
58
|
-
var getApprovalIsShow = function getApprovalIsShow(approvalSetting, type, applyState) {
|
|
59
|
-
return !approvalSetting.isOpen || approvalSetting.isOpen && !(approvalSetting !== null && approvalSetting !== void 0 && approvalSetting[type]) || approvalSetting.isOpen && (approvalSetting === null || approvalSetting === void 0 ? void 0 : approvalSetting[type]) && applyState !== EApproveStatus.UnderApproval;
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
exports.getApprovalIsShow = getApprovalIsShow;
|