@titaui/pc 1.11.13-beta.1 → 1.11.13-beta.11
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/new-ui.css +1 -0
- package/lib/components/icon-button-list/index.css +1 -1
- package/lib/components/nav-top/index.js +5 -6
- 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 -10
- 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 +15 -54
- package/lib/components/okr-flow/child-node/work-node.js +3 -19
- package/lib/components/okr-flow/empty/index.css +1 -8
- package/lib/components/okr-flow/export-modal/index.js +2 -26
- package/lib/components/okr-flow/export-modules/okr-search-panel/index.css +1 -3
- package/lib/components/okr-flow/export-modules/okr-search-panel/index.js +9 -14
- package/lib/components/okr-flow/images/loading-light.gif +0 -0
- package/lib/components/okr-flow/okr-map/index.js +14 -32
- package/lib/components/okr-flow/request-apis.js +4 -11
- package/lib/components/okr-flow/root-node/index.css +2 -2
- package/lib/components/okr-flow/utils/index.js +26 -43
- package/lib/components/okr-flow/utils/tree-handler.js +3 -14
- package/lib/components/period-selector/index.js +0 -3
- 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 -6
- package/lib/pages/okr-map/export-modules/okr-map/header/index.js +13 -47
- package/lib/pages/okr-map/export-modules/okr-map/okr-map.js +17 -27
- package/lib/pages/okr-map/number-select/index.css +1 -4
- package/lib/pages/okr-map/number-select/index.js +1 -1
- 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
|
@@ -11,8 +11,6 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
11
11
|
|
|
12
12
|
var _reactFlowRenderer = _interopRequireWildcard(require("@titaui/react-flow-renderer"));
|
|
13
13
|
|
|
14
|
-
var _lodash = _interopRequireDefault(require("lodash"));
|
|
15
|
-
|
|
16
14
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
17
15
|
|
|
18
16
|
var _html2canvas = _interopRequireDefault(require("html2canvas"));
|
|
@@ -41,14 +39,6 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
41
39
|
|
|
42
40
|
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; }
|
|
43
41
|
|
|
44
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
45
|
-
|
|
46
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
47
|
-
|
|
48
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
49
|
-
|
|
50
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
51
|
-
|
|
52
42
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
53
43
|
|
|
54
44
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -78,12 +68,16 @@ var OkrMap = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
78
68
|
onChildClose = _props$onChildClose === void 0 ? function () {} : _props$onChildClose,
|
|
79
69
|
_props$dataSource = props.dataSource,
|
|
80
70
|
dataSource = _props$dataSource === void 0 ? [] : _props$dataSource;
|
|
81
|
-
var virtualElements = (0, _react.useRef)([]);
|
|
82
71
|
|
|
83
|
-
var _useState = (0, _react.useState)(),
|
|
72
|
+
var _useState = (0, _react.useState)([]),
|
|
84
73
|
_useState2 = _slicedToArray(_useState, 2),
|
|
85
|
-
|
|
86
|
-
|
|
74
|
+
elements = _useState2[0],
|
|
75
|
+
setElements = _useState2[1];
|
|
76
|
+
|
|
77
|
+
var _useState3 = (0, _react.useState)(),
|
|
78
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
79
|
+
flowInstance = _useState4[0],
|
|
80
|
+
setFlowInstance = _useState4[1];
|
|
87
81
|
|
|
88
82
|
var isMoving = (0, _react.useRef)(false);
|
|
89
83
|
|
|
@@ -95,10 +89,12 @@ var OkrMap = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
95
89
|
onNodeClick & onNodeClick(data);
|
|
96
90
|
};
|
|
97
91
|
|
|
92
|
+
var layoutedElements = (0, _utils.getLayoutedElements)(dataSource, direction);
|
|
93
|
+
|
|
98
94
|
var getDefaultPos = function getDefaultPos() {
|
|
99
95
|
var containerHeight = document.body.clientHeight - 200 - 96;
|
|
100
96
|
var containerWidth = document.body.clientWidth - 180 - 320;
|
|
101
|
-
var rootNode =
|
|
97
|
+
var rootNode = layoutedElements[0];
|
|
102
98
|
|
|
103
99
|
if (direction == "horizontal") {
|
|
104
100
|
var targetY = containerHeight / 2;
|
|
@@ -106,27 +102,13 @@ var OkrMap = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
106
102
|
}
|
|
107
103
|
|
|
108
104
|
var targetX = containerWidth / 2;
|
|
109
|
-
return [targetX - rootNode.position.x, -48];
|
|
110
|
-
// return [0, 0]
|
|
105
|
+
return [targetX - rootNode.position.x, -48];
|
|
111
106
|
};
|
|
112
107
|
|
|
113
108
|
var onLoad = function onLoad(reactFlowInstance) {
|
|
114
109
|
setFlowInstance(reactFlowInstance);
|
|
115
110
|
};
|
|
116
111
|
|
|
117
|
-
var NodeDebug = function NodeDebug() {
|
|
118
|
-
var elements = (0, _reactFlowRenderer.useStoreState)(function (state) {
|
|
119
|
-
return [].concat(_toConsumableArray(state.nodes), _toConsumableArray(state.edges));
|
|
120
|
-
}, _lodash["default"].isEqual);
|
|
121
|
-
var setElements = (0, _reactFlowRenderer.useStoreActions)(function (actions) {
|
|
122
|
-
return actions.setElements;
|
|
123
|
-
});
|
|
124
|
-
var newElements = (0, _utils.getLayoutedElements)(elements, direction);
|
|
125
|
-
virtualElements = newElements;
|
|
126
|
-
setElements(newElements);
|
|
127
|
-
return null;
|
|
128
|
-
};
|
|
129
|
-
|
|
130
112
|
(0, _react.useEffect)(function () {
|
|
131
113
|
if (flowInstance) {
|
|
132
114
|
var _getDefaultPos = getDefaultPos(),
|
|
@@ -192,7 +174,7 @@ var OkrMap = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
192
174
|
|
|
193
175
|
}, /*#__PURE__*/_react["default"].createElement(_reactFlowRenderer.ReactFlowProvider, null, dataSource.length == 0 ? /*#__PURE__*/_react["default"].createElement(_empty["default"], null) : /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_reactFlowRenderer["default"], {
|
|
194
176
|
onLoad: onLoad,
|
|
195
|
-
elements:
|
|
177
|
+
elements: layoutedElements,
|
|
196
178
|
nodesDraggable: false,
|
|
197
179
|
nodesConnectable: false,
|
|
198
180
|
nodeTypes: _utils.nodeTypes,
|
|
@@ -200,7 +182,7 @@ var OkrMap = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
200
182
|
minZoom: 0.25,
|
|
201
183
|
maxZoom: 1.5,
|
|
202
184
|
panOnScroll: true
|
|
203
|
-
}
|
|
185
|
+
}), /*#__PURE__*/_react["default"].createElement(_miniMap["default"], {
|
|
204
186
|
onMoveStart: function onMoveStart() {
|
|
205
187
|
return isMoving.current = true;
|
|
206
188
|
}
|
|
@@ -78,9 +78,7 @@ var expandNode = function expandNode(params) {
|
|
|
78
78
|
_params$okrIdParent = params.okrIdParent,
|
|
79
79
|
okrIdParent = _params$okrIdParent === void 0 ? 0 : _params$okrIdParent,
|
|
80
80
|
_params$currentOkrRol = params.currentOkrRole,
|
|
81
|
-
currentOkrRole = _params$currentOkrRol === void 0 ? true : _params$currentOkrRol
|
|
82
|
-
_params$showCardKr = params.showCardKr,
|
|
83
|
-
showCardKr = _params$showCardKr === void 0 ? 1 : _params$showCardKr;
|
|
81
|
+
currentOkrRole = _params$currentOkrRol === void 0 ? true : _params$currentOkrRol;
|
|
84
82
|
return _axios["default"].get("".concat(requestDomain(), "/api/v1/").concat(tenantId, "/").concat(userId, "/okr/map/expand"), {
|
|
85
83
|
params: {
|
|
86
84
|
okrId: okrId,
|
|
@@ -89,9 +87,7 @@ var expandNode = function expandNode(params) {
|
|
|
89
87
|
// true: 展开子节点, false: 展开父节点
|
|
90
88
|
okrIdParent: okrIdParent,
|
|
91
89
|
// 当前选中okr 或 当前选中kr 的okrId(kr的父节点是所属okr)
|
|
92
|
-
currentOkrRole: currentOkrRole
|
|
93
|
-
// 查看权限
|
|
94
|
-
showCardKr: showCardKr // o带上kr
|
|
90
|
+
currentOkrRole: currentOkrRole // 查看权限
|
|
95
91
|
|
|
96
92
|
}
|
|
97
93
|
}).then(function (res) {
|
|
@@ -107,15 +103,12 @@ var expandNodesByLevel = function expandNodesByLevel(_ref2) {
|
|
|
107
103
|
_ref2$okrIds = _ref2.okrIds,
|
|
108
104
|
okrIds = _ref2$okrIds === void 0 ? [] : _ref2$okrIds,
|
|
109
105
|
_ref2$showKr = _ref2.showKr,
|
|
110
|
-
showKr = _ref2$showKr === void 0 ? 0 : _ref2$showKr
|
|
111
|
-
_ref2$showCardKr = _ref2.showCardKr,
|
|
112
|
-
showCardKr = _ref2$showCardKr === void 0 ? 0 : _ref2$showCardKr;
|
|
106
|
+
showKr = _ref2$showKr === void 0 ? 0 : _ref2$showKr;
|
|
113
107
|
return (// const queryStr = qs.stringify({ okrIds, level }, { arrayFormat: 'repeat' });
|
|
114
108
|
_axios["default"].post("".concat(requestDomain(), "/api/v1/").concat(tenantId, "/").concat(userId, "/okr/map/generalview"), {
|
|
115
109
|
okrIds: okrIds,
|
|
116
110
|
level: level,
|
|
117
|
-
showKr: showKr
|
|
118
|
-
showCardKr: showCardKr
|
|
111
|
+
showKr: showKr
|
|
119
112
|
}).then(function (res) {
|
|
120
113
|
return res.data.Data;
|
|
121
114
|
})
|
|
@@ -15,12 +15,6 @@ var _rootNode = _interopRequireDefault(require("../root-node"));
|
|
|
15
15
|
|
|
16
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
17
|
|
|
18
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
19
|
-
|
|
20
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
21
|
-
|
|
22
|
-
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; }
|
|
23
|
-
|
|
24
18
|
var nodeTypes = {
|
|
25
19
|
ChildNode: _childNode["default"],
|
|
26
20
|
RootNode: _rootNode["default"]
|
|
@@ -30,53 +24,42 @@ exports.nodeTypes = nodeTypes;
|
|
|
30
24
|
var getLayoutedElements = function getLayoutedElements(elements) {
|
|
31
25
|
var direction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "horizontal";
|
|
32
26
|
var isHorizontal = direction === "horizontal";
|
|
33
|
-
var
|
|
34
|
-
|
|
27
|
+
var nodeWidth = 320;
|
|
28
|
+
var nodeHeight = 96;
|
|
29
|
+
var dagreGraph = new _dagre["default"].graphlib.Graph();
|
|
30
|
+
dagreGraph.setDefaultEdgeLabel(function () {
|
|
31
|
+
return {};
|
|
35
32
|
});
|
|
36
|
-
|
|
33
|
+
dagreGraph.setGraph({
|
|
37
34
|
rankdir: isHorizontal ? "LR" : "TB",
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
ranksep: 80,
|
|
36
|
+
nodesep: 12
|
|
40
37
|
});
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
var _element$__rf, _element$__rf2;
|
|
47
|
-
|
|
48
|
-
// const { data,id } = element
|
|
49
|
-
// if(id!=="0"){
|
|
50
|
-
// const {parentId} = data
|
|
51
|
-
// if(parentId===0||parentId){
|
|
52
|
-
// g.setParent(id, parentId+"");
|
|
53
|
-
// }
|
|
54
|
-
// }
|
|
55
|
-
g.setNode(element.id, {
|
|
56
|
-
width: (_element$__rf = element.__rf) === null || _element$__rf === void 0 ? void 0 : _element$__rf.width,
|
|
57
|
-
height: (_element$__rf2 = element.__rf) === null || _element$__rf2 === void 0 ? void 0 : _element$__rf2.height
|
|
38
|
+
elements.forEach(function (el) {
|
|
39
|
+
if ((0, _reactFlowRenderer.isNode)(el)) {
|
|
40
|
+
dagreGraph.setNode(el.id, {
|
|
41
|
+
width: nodeWidth,
|
|
42
|
+
height: nodeHeight
|
|
58
43
|
});
|
|
59
44
|
} else {
|
|
60
|
-
|
|
45
|
+
dagreGraph.setEdge(el.source, el.target);
|
|
61
46
|
}
|
|
62
47
|
});
|
|
63
48
|
|
|
64
|
-
_dagre["default"].layout(
|
|
65
|
-
|
|
66
|
-
return elements.map(function (
|
|
67
|
-
if ((0, _reactFlowRenderer.isNode)(
|
|
68
|
-
var
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
}
|
|
76
|
-
});
|
|
49
|
+
_dagre["default"].layout(dagreGraph);
|
|
50
|
+
|
|
51
|
+
return elements.map(function (el) {
|
|
52
|
+
if ((0, _reactFlowRenderer.isNode)(el)) {
|
|
53
|
+
var nodeWithPosition = dagreGraph.node(el.id);
|
|
54
|
+
el.targetPosition = isHorizontal ? "left" : "top";
|
|
55
|
+
el.sourcePosition = isHorizontal ? "right" : "bottom";
|
|
56
|
+
el.position = {
|
|
57
|
+
x: nodeWithPosition.x,
|
|
58
|
+
y: nodeWithPosition.y
|
|
59
|
+
};
|
|
77
60
|
}
|
|
78
61
|
|
|
79
|
-
return
|
|
62
|
+
return el;
|
|
80
63
|
});
|
|
81
64
|
};
|
|
82
65
|
|
|
@@ -130,7 +130,6 @@ exports.formatNodes = formatNodes;
|
|
|
130
130
|
|
|
131
131
|
var flatTree = function flatTree(current, elements, showkr) {
|
|
132
132
|
var isParentExpand = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
|
|
133
|
-
var parentId = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
|
|
134
133
|
if (!current) return;
|
|
135
134
|
var id = current.id,
|
|
136
135
|
data = current.data,
|
|
@@ -143,12 +142,7 @@ var flatTree = function flatTree(current, elements, showkr) {
|
|
|
143
142
|
elements.push({
|
|
144
143
|
id: "".concat(id),
|
|
145
144
|
type: "RootNode",
|
|
146
|
-
data: data
|
|
147
|
-
isParent: true,
|
|
148
|
-
position: {
|
|
149
|
-
x: 0,
|
|
150
|
-
y: 0
|
|
151
|
-
}
|
|
145
|
+
data: data
|
|
152
146
|
});
|
|
153
147
|
} else {
|
|
154
148
|
var isChildExpand = false;
|
|
@@ -170,16 +164,11 @@ var flatTree = function flatTree(current, elements, showkr) {
|
|
|
170
164
|
elements.push({
|
|
171
165
|
id: "".concat(id),
|
|
172
166
|
type: "ChildNode",
|
|
173
|
-
position: {
|
|
174
|
-
x: 0,
|
|
175
|
-
y: 0
|
|
176
|
-
},
|
|
177
167
|
data: {
|
|
178
168
|
id: id,
|
|
179
169
|
data: data,
|
|
180
170
|
isParentExpand: isParentExpand,
|
|
181
171
|
isChildExpand: isChildExpand,
|
|
182
|
-
parentId: parentId,
|
|
183
172
|
modelType: modelType,
|
|
184
173
|
isSearchRes: isSearchRes
|
|
185
174
|
}
|
|
@@ -202,7 +191,7 @@ var flatTree = function flatTree(current, elements, showkr) {
|
|
|
202
191
|
source: "".concat(id),
|
|
203
192
|
target: "".concat(sub.id)
|
|
204
193
|
});
|
|
205
|
-
flatTree(sub, elements, showkr, current.modelType != "root"
|
|
194
|
+
flatTree(sub, elements, showkr, current.modelType != "root");
|
|
206
195
|
});
|
|
207
196
|
}
|
|
208
197
|
} else {
|
|
@@ -211,7 +200,7 @@ var flatTree = function flatTree(current, elements, showkr) {
|
|
|
211
200
|
source: "".concat(id),
|
|
212
201
|
target: "".concat(child.id)
|
|
213
202
|
});
|
|
214
|
-
flatTree(child, elements, showkr, current.modelType != "root"
|
|
203
|
+
flatTree(child, elements, showkr, current.modelType != "root");
|
|
215
204
|
}
|
|
216
205
|
});
|
|
217
206
|
}
|
|
@@ -73,8 +73,6 @@ function PeriodSelector(_ref) {
|
|
|
73
73
|
wrapperStyle = _ref.wrapperStyle,
|
|
74
74
|
popClass = _ref.popClass,
|
|
75
75
|
style = _ref.style,
|
|
76
|
-
_ref$buttonClass = _ref.buttonClass,
|
|
77
|
-
buttonClass = _ref$buttonClass === void 0 ? "" : _ref$buttonClass,
|
|
78
76
|
_ref$noBorder = _ref.noBorder,
|
|
79
77
|
noBorder = _ref$noBorder === void 0 ? false : _ref$noBorder;
|
|
80
78
|
|
|
@@ -176,7 +174,6 @@ function PeriodSelector(_ref) {
|
|
|
176
174
|
className: className
|
|
177
175
|
}, children || /*#__PURE__*/_react["default"].createElement(_button["default"], {
|
|
178
176
|
type: "default",
|
|
179
|
-
className: buttonClass,
|
|
180
177
|
style: noBorder ? {
|
|
181
178
|
padding: "0",
|
|
182
179
|
border: "none"
|
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
|
},
|
|
@@ -6,10 +6,6 @@
|
|
|
6
6
|
border-bottom: 1px solid #e9ecf0;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
.titapage-okr-map__header-period {
|
|
10
|
-
border-radius: 18px;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
9
|
.titapage-okr-map__header__folded {
|
|
14
10
|
height: 0;
|
|
15
11
|
}
|
|
@@ -97,14 +93,13 @@
|
|
|
97
93
|
}
|
|
98
94
|
|
|
99
95
|
.titapage-okr-map__header-action-showkr .titaui-switch {
|
|
100
|
-
width:
|
|
96
|
+
width: 136px;
|
|
101
97
|
position: relative;
|
|
102
98
|
}
|
|
103
99
|
|
|
104
100
|
.titapage-okr-map__header-action-showkr .titaui-switch-label {
|
|
105
101
|
font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica, sans-serif, PingFang SC, Microsoft YaHei;
|
|
106
102
|
font-size: 14px;
|
|
107
|
-
font-weight: unset;
|
|
108
103
|
}
|
|
109
104
|
|
|
110
105
|
.titapage-okr-map__header-action-showkr .titaui-switch .tui-switch {
|