@titaui/pc 1.10.82-beta.2 → 1.10.82-beta.20
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 +1 -0
- package/lib/components/avatar/name-avatar/index.js +22 -13
- package/lib/components/button/rect-btn/index.css +25 -11
- package/lib/components/button/rect-btn/index.js +8 -4
- package/lib/components/create-okr-modal/request-api.js +1 -1
- package/lib/components/drawer/index.css +11 -0
- package/lib/components/drawer/index.js +31 -6
- package/lib/components/drawer-manager/index.js +25 -27
- package/lib/components/dynamic/dynamic-item/dynamic-ai-dialy/index.js +12 -3
- package/lib/components/dynamic/online-broadcast/data.js +7 -7
- package/lib/components/e-priority/index.js +11 -5
- package/lib/components/file-list/components/single-file/index.js +11 -11
- package/lib/components/icon-button-list/index.css +1 -1
- package/lib/components/img-viewer/index.css +7 -0
- package/lib/components/img-viewer/index.js +47 -8
- package/lib/components/menus/export-modules/demo-menus/menus.js +1 -23
- package/lib/components/menus/export-modules/okr-menus/menu-highlight.js +10 -0
- package/lib/components/nav-top/index.js +6 -2
- package/lib/components/okr-detail/components/okr-tree/tree-node/o-child-node/index.css +4 -3
- package/lib/components/okr-detail/detail-header/constant.js +53 -0
- package/lib/components/okr-detail/detail-header/index.js +11 -2
- package/lib/components/okr-flow/child-node/index.css +54 -15
- package/lib/components/okr-flow/child-node/work-node.js +19 -3
- package/lib/components/okr-flow/empty/index.css +8 -1
- package/lib/components/okr-flow/export-modal/index.js +26 -2
- package/lib/components/okr-flow/export-modules/okr-search-panel/index.css +3 -1
- package/lib/components/okr-flow/export-modules/okr-search-panel/index.js +14 -9
- package/lib/components/okr-flow/images/loading-light.gif +0 -0
- package/lib/components/okr-flow/okr-map/index.js +32 -14
- package/lib/components/okr-flow/request-apis.js +11 -4
- package/lib/components/okr-flow/root-node/index.css +2 -2
- package/lib/components/okr-flow/utils/index.js +43 -26
- package/lib/components/okr-flow/utils/tree-handler.js +14 -3
- package/lib/components/okr-progress-modal/index.css +16 -15
- package/lib/components/okrcase-library/okrcases-components/caseLibrary-main.js +14 -8
- package/lib/components/period-selector/index.js +3 -0
- package/lib/components/superset-charts/components/chart/index.js +8 -36
- package/lib/components/superset-charts/fetch-assets-and-append/get-assets-with-cache.js +8 -0
- package/lib/components/survey-model/contact.js +93 -0
- package/lib/components/survey-model/index.css +141 -0
- package/lib/components/survey-model/index.js +259 -0
- package/lib/components/survey-model/instance.js +86 -0
- package/lib/components/survey-model/request-api.js +80 -0
- package/lib/components/task-relation-modal/index.css +2 -2
- package/lib/components/task-relation-modal/tree-node/category-node/index.css +4 -0
- package/lib/components/task-relation-modal/tree-node/kr-node/index.css +4 -0
- package/lib/components/task-relation-modal/tree-node/milestone-node/index.css +4 -0
- package/lib/components/task-relation-modal/tree-node/o-node/index.css +4 -0
- package/lib/components/task-relation-modal/tree-node/work-node/index.css +4 -0
- package/lib/components/textarea/index.css +120 -0
- package/lib/components/textarea/index.js +257 -0
- package/lib/components/wechat-btn/index.css +4 -0
- package/lib/components/wechat-btn/index.js +134 -38
- package/lib/index.js +125 -77
- package/lib/pages/new-okr-list/header/common.js +52 -0
- package/lib/pages/new-okr-list/header/index.css +45 -0
- package/lib/pages/new-okr-list/header/index.js +28 -16
- package/lib/pages/new-okr-list/header/operate-record.js +88 -0
- package/lib/pages/new-okr-list/index.js +28 -15
- package/lib/pages/new-okr-list/list/index.js +19 -2
- package/lib/pages/okr-map/export-modules/okr-map/header/index.css +6 -1
- package/lib/pages/okr-map/export-modules/okr-map/header/index.js +47 -13
- package/lib/pages/okr-map/export-modules/okr-map/okr-map.js +27 -17
- package/lib/pages/okr-map/number-select/index.css +4 -1
- package/lib/pages/okr-map/number-select/index.js +1 -1
- package/lib/utils/auth.js +60 -3
- package/lib/utils/bs-global.js +14 -2
- package/lib/utils/format-time.js +8 -1
- package/lib/utils/open-data.js +5 -1
- package/package.json +1 -1
|
@@ -11,6 +11,8 @@ 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
|
+
|
|
14
16
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
17
|
|
|
16
18
|
var _html2canvas = _interopRequireDefault(require("html2canvas"));
|
|
@@ -39,6 +41,14 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
39
41
|
|
|
40
42
|
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; }
|
|
41
43
|
|
|
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
|
+
|
|
42
52
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
43
53
|
|
|
44
54
|
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."); }
|
|
@@ -68,16 +78,12 @@ var OkrMap = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
68
78
|
onChildClose = _props$onChildClose === void 0 ? function () {} : _props$onChildClose,
|
|
69
79
|
_props$dataSource = props.dataSource,
|
|
70
80
|
dataSource = _props$dataSource === void 0 ? [] : _props$dataSource;
|
|
81
|
+
var virtualElements = (0, _react.useRef)([]);
|
|
71
82
|
|
|
72
|
-
var _useState = (0, _react.useState)(
|
|
83
|
+
var _useState = (0, _react.useState)(),
|
|
73
84
|
_useState2 = _slicedToArray(_useState, 2),
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
var _useState3 = (0, _react.useState)(),
|
|
78
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
79
|
-
flowInstance = _useState4[0],
|
|
80
|
-
setFlowInstance = _useState4[1];
|
|
85
|
+
flowInstance = _useState2[0],
|
|
86
|
+
setFlowInstance = _useState2[1];
|
|
81
87
|
|
|
82
88
|
var isMoving = (0, _react.useRef)(false);
|
|
83
89
|
|
|
@@ -89,12 +95,10 @@ var OkrMap = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
89
95
|
onNodeClick & onNodeClick(data);
|
|
90
96
|
};
|
|
91
97
|
|
|
92
|
-
var layoutedElements = (0, _utils.getLayoutedElements)(dataSource, direction);
|
|
93
|
-
|
|
94
98
|
var getDefaultPos = function getDefaultPos() {
|
|
95
99
|
var containerHeight = document.body.clientHeight - 200 - 96;
|
|
96
100
|
var containerWidth = document.body.clientWidth - 180 - 320;
|
|
97
|
-
var rootNode =
|
|
101
|
+
var rootNode = virtualElements[0];
|
|
98
102
|
|
|
99
103
|
if (direction == "horizontal") {
|
|
100
104
|
var targetY = containerHeight / 2;
|
|
@@ -102,13 +106,27 @@ var OkrMap = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
102
106
|
}
|
|
103
107
|
|
|
104
108
|
var targetX = containerWidth / 2;
|
|
105
|
-
return [targetX - rootNode.position.x, -48];
|
|
109
|
+
return [targetX - rootNode.position.x, -48]; // debugger
|
|
110
|
+
// return [0, 0]
|
|
106
111
|
};
|
|
107
112
|
|
|
108
113
|
var onLoad = function onLoad(reactFlowInstance) {
|
|
109
114
|
setFlowInstance(reactFlowInstance);
|
|
110
115
|
};
|
|
111
116
|
|
|
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
|
+
|
|
112
130
|
(0, _react.useEffect)(function () {
|
|
113
131
|
if (flowInstance) {
|
|
114
132
|
var _getDefaultPos = getDefaultPos(),
|
|
@@ -174,7 +192,7 @@ var OkrMap = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
174
192
|
|
|
175
193
|
}, /*#__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"], {
|
|
176
194
|
onLoad: onLoad,
|
|
177
|
-
elements:
|
|
195
|
+
elements: dataSource,
|
|
178
196
|
nodesDraggable: false,
|
|
179
197
|
nodesConnectable: false,
|
|
180
198
|
nodeTypes: _utils.nodeTypes,
|
|
@@ -182,7 +200,7 @@ var OkrMap = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
182
200
|
minZoom: 0.25,
|
|
183
201
|
maxZoom: 1.5,
|
|
184
202
|
panOnScroll: true
|
|
185
|
-
}), /*#__PURE__*/_react["default"].createElement(_miniMap["default"], {
|
|
203
|
+
}, /*#__PURE__*/_react["default"].createElement(NodeDebug, null)), /*#__PURE__*/_react["default"].createElement(_miniMap["default"], {
|
|
186
204
|
onMoveStart: function onMoveStart() {
|
|
187
205
|
return isMoving.current = true;
|
|
188
206
|
}
|
|
@@ -78,7 +78,9 @@ 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
|
|
81
|
+
currentOkrRole = _params$currentOkrRol === void 0 ? true : _params$currentOkrRol,
|
|
82
|
+
_params$showCardKr = params.showCardKr,
|
|
83
|
+
showCardKr = _params$showCardKr === void 0 ? 1 : _params$showCardKr;
|
|
82
84
|
return _axios["default"].get("".concat(requestDomain(), "/api/v1/").concat(tenantId, "/").concat(userId, "/okr/map/expand"), {
|
|
83
85
|
params: {
|
|
84
86
|
okrId: okrId,
|
|
@@ -87,7 +89,9 @@ var expandNode = function expandNode(params) {
|
|
|
87
89
|
// true: 展开子节点, false: 展开父节点
|
|
88
90
|
okrIdParent: okrIdParent,
|
|
89
91
|
// 当前选中okr 或 当前选中kr 的okrId(kr的父节点是所属okr)
|
|
90
|
-
currentOkrRole: currentOkrRole
|
|
92
|
+
currentOkrRole: currentOkrRole,
|
|
93
|
+
// 查看权限
|
|
94
|
+
showCardKr: showCardKr // o带上kr
|
|
91
95
|
|
|
92
96
|
}
|
|
93
97
|
}).then(function (res) {
|
|
@@ -103,12 +107,15 @@ var expandNodesByLevel = function expandNodesByLevel(_ref2) {
|
|
|
103
107
|
_ref2$okrIds = _ref2.okrIds,
|
|
104
108
|
okrIds = _ref2$okrIds === void 0 ? [] : _ref2$okrIds,
|
|
105
109
|
_ref2$showKr = _ref2.showKr,
|
|
106
|
-
showKr = _ref2$showKr === void 0 ? 0 : _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;
|
|
107
113
|
return (// const queryStr = qs.stringify({ okrIds, level }, { arrayFormat: 'repeat' });
|
|
108
114
|
_axios["default"].post("".concat(requestDomain(), "/api/v1/").concat(tenantId, "/").concat(userId, "/okr/map/generalview"), {
|
|
109
115
|
okrIds: okrIds,
|
|
110
116
|
level: level,
|
|
111
|
-
showKr: showKr
|
|
117
|
+
showKr: showKr,
|
|
118
|
+
showCardKr: showCardKr
|
|
112
119
|
}).then(function (res) {
|
|
113
120
|
return res.data.Data;
|
|
114
121
|
})
|
|
@@ -15,6 +15,12 @@ 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
|
+
|
|
18
24
|
var nodeTypes = {
|
|
19
25
|
ChildNode: _childNode["default"],
|
|
20
26
|
RootNode: _rootNode["default"]
|
|
@@ -24,42 +30,53 @@ exports.nodeTypes = nodeTypes;
|
|
|
24
30
|
var getLayoutedElements = function getLayoutedElements(elements) {
|
|
25
31
|
var direction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "horizontal";
|
|
26
32
|
var isHorizontal = direction === "horizontal";
|
|
27
|
-
var
|
|
28
|
-
|
|
29
|
-
var dagreGraph = new _dagre["default"].graphlib.Graph();
|
|
30
|
-
dagreGraph.setDefaultEdgeLabel(function () {
|
|
31
|
-
return {};
|
|
33
|
+
var g = new _dagre["default"].graphlib.Graph({
|
|
34
|
+
compound: true
|
|
32
35
|
});
|
|
33
|
-
|
|
36
|
+
g.setGraph({
|
|
34
37
|
rankdir: isHorizontal ? "LR" : "TB",
|
|
35
|
-
|
|
36
|
-
|
|
38
|
+
nodesep: 12,
|
|
39
|
+
ranksep: 80
|
|
37
40
|
});
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
g.setDefaultEdgeLabel(function () {
|
|
42
|
+
return {};
|
|
43
|
+
});
|
|
44
|
+
elements.forEach(function (element) {
|
|
45
|
+
if ((0, _reactFlowRenderer.isNode)(element)) {
|
|
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
|
|
43
58
|
});
|
|
44
59
|
} else {
|
|
45
|
-
|
|
60
|
+
g.setEdge(element.source, element.target);
|
|
46
61
|
}
|
|
47
62
|
});
|
|
48
63
|
|
|
49
|
-
_dagre["default"].layout(
|
|
50
|
-
|
|
51
|
-
return elements.map(function (
|
|
52
|
-
if ((0, _reactFlowRenderer.isNode)(
|
|
53
|
-
var
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
64
|
+
_dagre["default"].layout(g);
|
|
65
|
+
|
|
66
|
+
return elements.map(function (element) {
|
|
67
|
+
if ((0, _reactFlowRenderer.isNode)(element)) {
|
|
68
|
+
var node = g.node(element.id);
|
|
69
|
+
return _objectSpread(_objectSpread({}, element), {}, {
|
|
70
|
+
targetPosition: isHorizontal ? "left" : "top",
|
|
71
|
+
sourcePosition: isHorizontal ? "right" : "bottom",
|
|
72
|
+
position: {
|
|
73
|
+
x: node.x - node.width / 2,
|
|
74
|
+
y: node.y - node.height / 2
|
|
75
|
+
}
|
|
76
|
+
});
|
|
60
77
|
}
|
|
61
78
|
|
|
62
|
-
return
|
|
79
|
+
return element;
|
|
63
80
|
});
|
|
64
81
|
};
|
|
65
82
|
|
|
@@ -130,6 +130,7 @@ 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;
|
|
133
134
|
if (!current) return;
|
|
134
135
|
var id = current.id,
|
|
135
136
|
data = current.data,
|
|
@@ -142,7 +143,12 @@ var flatTree = function flatTree(current, elements, showkr) {
|
|
|
142
143
|
elements.push({
|
|
143
144
|
id: "".concat(id),
|
|
144
145
|
type: "RootNode",
|
|
145
|
-
data: data
|
|
146
|
+
data: data,
|
|
147
|
+
isParent: true,
|
|
148
|
+
position: {
|
|
149
|
+
x: 0,
|
|
150
|
+
y: 0
|
|
151
|
+
}
|
|
146
152
|
});
|
|
147
153
|
} else {
|
|
148
154
|
var isChildExpand = false;
|
|
@@ -164,11 +170,16 @@ var flatTree = function flatTree(current, elements, showkr) {
|
|
|
164
170
|
elements.push({
|
|
165
171
|
id: "".concat(id),
|
|
166
172
|
type: "ChildNode",
|
|
173
|
+
position: {
|
|
174
|
+
x: 0,
|
|
175
|
+
y: 0
|
|
176
|
+
},
|
|
167
177
|
data: {
|
|
168
178
|
id: id,
|
|
169
179
|
data: data,
|
|
170
180
|
isParentExpand: isParentExpand,
|
|
171
181
|
isChildExpand: isChildExpand,
|
|
182
|
+
parentId: parentId,
|
|
172
183
|
modelType: modelType,
|
|
173
184
|
isSearchRes: isSearchRes
|
|
174
185
|
}
|
|
@@ -191,7 +202,7 @@ var flatTree = function flatTree(current, elements, showkr) {
|
|
|
191
202
|
source: "".concat(id),
|
|
192
203
|
target: "".concat(sub.id)
|
|
193
204
|
});
|
|
194
|
-
flatTree(sub, elements, showkr, current.modelType != "root");
|
|
205
|
+
flatTree(sub, elements, showkr, current.modelType != "root", id);
|
|
195
206
|
});
|
|
196
207
|
}
|
|
197
208
|
} else {
|
|
@@ -200,7 +211,7 @@ var flatTree = function flatTree(current, elements, showkr) {
|
|
|
200
211
|
source: "".concat(id),
|
|
201
212
|
target: "".concat(child.id)
|
|
202
213
|
});
|
|
203
|
-
flatTree(child, elements, showkr, current.modelType != "root");
|
|
214
|
+
flatTree(child, elements, showkr, current.modelType != "root", id);
|
|
204
215
|
}
|
|
205
216
|
});
|
|
206
217
|
}
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
.auto-update__item-progress-input {
|
|
19
19
|
padding-right: 20px;
|
|
20
|
-
color: #
|
|
20
|
+
color: #3f4755 !important;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
.auto-update__item-progress-input--error {
|
|
@@ -26,16 +26,17 @@
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
.auto-update__item-progress-input--disabled {
|
|
29
|
-
border-color: #
|
|
30
|
-
background: #f7f8fa !important;
|
|
29
|
+
border-color: #e9ecf0 !important;
|
|
30
|
+
background-color: #f7f8fa !important;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
.auto-update__item-progress-input--disabled:hover {
|
|
34
|
-
border-color: #
|
|
34
|
+
border-color: #e9ecf0;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
.auto-update__item-progress-input--disabled input {
|
|
38
|
-
color: #
|
|
38
|
+
color: #bfc7d5 !important;
|
|
39
|
+
background-color: #f7f8fa !important;
|
|
39
40
|
}
|
|
40
41
|
|
|
41
42
|
.auto-update__item-progress-input__suffix {
|
|
@@ -49,7 +50,7 @@
|
|
|
49
50
|
}
|
|
50
51
|
|
|
51
52
|
.auto-update__item-progress-input__suffix--disabled {
|
|
52
|
-
color: #
|
|
53
|
+
color: #bfc7d5;
|
|
53
54
|
background: #f7f8fa;
|
|
54
55
|
}
|
|
55
56
|
|
|
@@ -58,7 +59,7 @@
|
|
|
58
59
|
height: 22px;
|
|
59
60
|
margin-left: 10px;
|
|
60
61
|
line-height: 22px;
|
|
61
|
-
color: #
|
|
62
|
+
color: #f6bd16;
|
|
62
63
|
font-size: 13px;
|
|
63
64
|
}
|
|
64
65
|
|
|
@@ -75,7 +76,7 @@
|
|
|
75
76
|
.auto-update__recommand-tip {
|
|
76
77
|
font-family: PingFangSC-Regular, PingFang SC;
|
|
77
78
|
font-size: 13px;
|
|
78
|
-
color: #
|
|
79
|
+
color: #a4acb9;
|
|
79
80
|
margin-left: 10px;
|
|
80
81
|
}
|
|
81
82
|
|
|
@@ -96,7 +97,7 @@
|
|
|
96
97
|
width: 4px;
|
|
97
98
|
height: 15px;
|
|
98
99
|
border-radius: 2px;
|
|
99
|
-
background: linear-gradient(90deg, #
|
|
100
|
+
background: linear-gradient(90deg, #4e90ff 0%, #2879ff 100%);
|
|
100
101
|
position: absolute;
|
|
101
102
|
left: 0;
|
|
102
103
|
top: 6px;
|
|
@@ -109,7 +110,7 @@
|
|
|
109
110
|
.auto-update-setting__option {
|
|
110
111
|
line-height: 22px;
|
|
111
112
|
cursor: pointer;
|
|
112
|
-
color: #
|
|
113
|
+
color: #3f4755;
|
|
113
114
|
}
|
|
114
115
|
|
|
115
116
|
.auto-update-setting__option div {
|
|
@@ -125,7 +126,7 @@
|
|
|
125
126
|
width: 14px;
|
|
126
127
|
height: 14px;
|
|
127
128
|
border-radius: 50%;
|
|
128
|
-
border: 1px solid #
|
|
129
|
+
border: 1px solid #e9ecf0;
|
|
129
130
|
margin-right: 4px;
|
|
130
131
|
vertical-align: text-top;
|
|
131
132
|
line-height: 14px;
|
|
@@ -133,11 +134,11 @@
|
|
|
133
134
|
}
|
|
134
135
|
|
|
135
136
|
.auto-update-setting__radio:hover {
|
|
136
|
-
border-color: #
|
|
137
|
+
border-color: #2879ff;
|
|
137
138
|
}
|
|
138
139
|
|
|
139
140
|
.auto-update-setting__radio--selected {
|
|
140
|
-
border-color: #
|
|
141
|
+
border-color: #2879ff;
|
|
141
142
|
}
|
|
142
143
|
|
|
143
144
|
.auto-update-setting__radio--selected:before {
|
|
@@ -146,7 +147,7 @@
|
|
|
146
147
|
width: 10px;
|
|
147
148
|
height: 10px;
|
|
148
149
|
border-radius: 50%;
|
|
149
|
-
background: #
|
|
150
|
+
background: #2879ff;
|
|
150
151
|
}
|
|
151
152
|
|
|
152
153
|
.auto-update-setting__tips {
|
|
@@ -159,7 +160,7 @@
|
|
|
159
160
|
position: absolute;
|
|
160
161
|
right: 0;
|
|
161
162
|
bottom: 0;
|
|
162
|
-
color: #
|
|
163
|
+
color: #2879ff;
|
|
163
164
|
font-family: PingFangSC-Regular, PingFang SC;
|
|
164
165
|
cursor: pointer;
|
|
165
166
|
}
|
|
@@ -13,27 +13,29 @@ var _essayComponent = _interopRequireDefault(require("../../grid-layout/essay-co
|
|
|
13
13
|
|
|
14
14
|
var _helpers = require("../../../utils/helpers");
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _openData = require("../../../utils/open-data");
|
|
17
17
|
|
|
18
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
19
|
|
|
20
|
+
var pencil = require("../image/\u7B14.svg");
|
|
21
|
+
|
|
20
22
|
function CaseLibraryMain(props) {
|
|
21
23
|
var onApplyTpl = props.onApplyTpl,
|
|
22
24
|
cardList = props.cardList,
|
|
23
25
|
isUnlock = props.isUnlock,
|
|
24
|
-
okrCasesNum = props.okrCasesNum,
|
|
25
26
|
handleShowSubmitOkrWindow = props.handleShowSubmitOkrWindow,
|
|
26
27
|
handleShowPayWindow = props.handleShowPayWindow,
|
|
27
28
|
isfix = props.isfix,
|
|
28
29
|
isLoading = props.isLoading,
|
|
29
30
|
activeNavId = props.activeNavId,
|
|
30
|
-
onClose = props.onClose,
|
|
31
31
|
asideHeightRef = props.asideHeightRef,
|
|
32
32
|
fixAsideTopScroll = props.fixAsideTopScroll; // @ts-ignore
|
|
33
33
|
|
|
34
|
-
var DeadLine = BSGlobal.tenantAuthentication.DeadLine; // @ts-ignore
|
|
34
|
+
var DeadLine = window.BSGlobal.tenantAuthentication.DeadLine; // @ts-ignore
|
|
35
35
|
|
|
36
|
-
var
|
|
36
|
+
var _window$BSGlobal$logi = window.BSGlobal.loginUserInfo,
|
|
37
|
+
Name = _window$BSGlobal$logi.Name,
|
|
38
|
+
Id = _window$BSGlobal$logi.Id;
|
|
37
39
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
38
40
|
className: "okr-cases-library__mainContainer"
|
|
39
41
|
}, /*#__PURE__*/_react["default"].createElement(_caseLibraryCardList["default"], {
|
|
@@ -60,18 +62,22 @@ function CaseLibraryMain(props) {
|
|
|
60
62
|
return handleShowSubmitOkrWindow(true);
|
|
61
63
|
}
|
|
62
64
|
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
63
|
-
src:
|
|
65
|
+
src: pencil,
|
|
66
|
+
alt: "pencil"
|
|
64
67
|
}), "\u63D0\u4EA4\u6211\u60F3\u8981\u7684OKR\u7C7B\u578B"), /*#__PURE__*/_react["default"].createElement("div", {
|
|
65
68
|
className: "okr-cases-library__aside__submitWant__libraryNum"
|
|
66
69
|
}, "\u5168\u56FD\u6700\u5927 OKR \u6848\u4F8B\u5E93", /*#__PURE__*/_react["default"].createElement("span", {
|
|
67
70
|
style: {
|
|
68
71
|
color: "#F05E5E"
|
|
69
72
|
}
|
|
70
|
-
}, " "
|
|
73
|
+
}, " 1000+"), " ")), isUnlock ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
71
74
|
className: "okr-cases-library__aside__memberInfo"
|
|
72
75
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
73
76
|
className: "okr-cases-library__aside__memberInfo__name"
|
|
74
|
-
},
|
|
77
|
+
}, /*#__PURE__*/_react["default"].createElement(_openData.OpenUserName, {
|
|
78
|
+
name: Name,
|
|
79
|
+
id: Id
|
|
80
|
+
}), "\u7684", /*#__PURE__*/_react["default"].createElement("b", null, " VIP "), "\u4F1A\u5458"), /*#__PURE__*/_react["default"].createElement("p", {
|
|
75
81
|
className: "okr-cases-library__aside__memberInfo__deadLine"
|
|
76
82
|
}, "\u6709\u6548\u65E5\u671F\u81F3\uFF1A", DeadLine)) : /*#__PURE__*/_react["default"].createElement("div", {
|
|
77
83
|
className: "okr-cases-library__aside__advertise",
|
|
@@ -73,6 +73,8 @@ 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,
|
|
76
78
|
_ref$noBorder = _ref.noBorder,
|
|
77
79
|
noBorder = _ref$noBorder === void 0 ? false : _ref$noBorder;
|
|
78
80
|
|
|
@@ -174,6 +176,7 @@ function PeriodSelector(_ref) {
|
|
|
174
176
|
className: className
|
|
175
177
|
}, children || /*#__PURE__*/_react["default"].createElement(_button["default"], {
|
|
176
178
|
type: "default",
|
|
179
|
+
className: buttonClass,
|
|
177
180
|
style: noBorder ? {
|
|
178
181
|
padding: "0",
|
|
179
182
|
border: "none"
|
|
@@ -1,53 +1,25 @@
|
|
|
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 _fetchAssetsAndAppend = _interopRequireDefault(require("../../fetch-assets-and-append"));
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
13
9
|
|
|
14
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
11
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
19
|
-
|
|
20
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
21
|
-
|
|
22
|
-
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."); }
|
|
23
|
-
|
|
24
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
25
|
-
|
|
26
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
27
|
-
|
|
28
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
29
|
-
|
|
30
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
31
|
-
|
|
32
|
-
var singletonFetchAssetsAndAppend = (0, _fetchAssetsAndAppend["default"])();
|
|
33
|
-
|
|
12
|
+
// const singletonFetchAssetsAndAppend = SingletonFetchAssetsAndAppend();
|
|
34
13
|
var Chart = function Chart(props) {
|
|
35
14
|
var _window, _window$SupersetChart;
|
|
36
15
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
(0, _react.useEffect)(function () {
|
|
43
|
-
var _singletonFetchAssets;
|
|
44
|
-
|
|
45
|
-
(_singletonFetchAssets = singletonFetchAssetsAndAppend()) === null || _singletonFetchAssets === void 0 ? void 0 : _singletonFetchAssets.then(function () {
|
|
46
|
-
setIsInit(true);
|
|
47
|
-
});
|
|
48
|
-
}, []);
|
|
16
|
+
// useEffect(() => {
|
|
17
|
+
// singletonFetchAssetsAndAppend()?.then(() => {
|
|
18
|
+
// setIsInit(true);
|
|
19
|
+
// });
|
|
20
|
+
// }, []);
|
|
49
21
|
var Chart = (_window = window) === null || _window === void 0 ? void 0 : (_window$SupersetChart = _window.SupersetChart) === null || _window$SupersetChart === void 0 ? void 0 : _window$SupersetChart.SupersetChart;
|
|
50
|
-
return /*#__PURE__*/_react["default"].createElement("div", null, Chart &&
|
|
22
|
+
return /*#__PURE__*/_react["default"].createElement("div", null, Chart && /*#__PURE__*/_react["default"].createElement(Chart, props));
|
|
51
23
|
};
|
|
52
24
|
|
|
53
25
|
var _default = Chart;
|
|
@@ -47,6 +47,10 @@ var fetchAssetsVersion = function fetchAssetsVersion() {
|
|
|
47
47
|
},
|
|
48
48
|
objectName: "superset_assets_version"
|
|
49
49
|
}).then(function (res) {
|
|
50
|
+
if (!res.data) {
|
|
51
|
+
return [];
|
|
52
|
+
}
|
|
53
|
+
|
|
50
54
|
return transMetasToTableData(res.data.list);
|
|
51
55
|
});
|
|
52
56
|
};
|
|
@@ -70,6 +74,10 @@ var fetchAssetsUri = function fetchAssetsUri(version) {
|
|
|
70
74
|
},
|
|
71
75
|
objectName: "superset_assets"
|
|
72
76
|
}).then(function (res) {
|
|
77
|
+
if (!res.data) {
|
|
78
|
+
return [];
|
|
79
|
+
}
|
|
80
|
+
|
|
73
81
|
sessionStorage.setItem("".concat(storageKey, "version"), JSON.stringify(transMetasToTableData(res.data.list)));
|
|
74
82
|
return transMetasToTableData(res.data.list);
|
|
75
83
|
});
|