@titaui/pc 1.10.81-beta.2 → 1.10.82-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/button/rect-btn/index.css +11 -25
- package/lib/components/button/rect-btn/index.js +4 -8
- package/lib/components/drawer/index.js +8 -25
- 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/img-viewer/index.css +6 -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 +2 -6
- package/lib/components/okr-detail/components/okr-tree/tree-node/o-child-node/index.css +4 -3
- package/lib/components/okr-detail/detail-header/actions.js +40 -44
- package/lib/components/okr-detail/detail-header/index.css +2 -2
- package/lib/components/okr-detail/detail-header/index.js +205 -194
- package/lib/components/okr-detail/index.js +2 -0
- 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/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/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/wechat-btn/index.css +14 -0
- package/lib/components/wechat-btn/index.js +315 -0
- package/lib/index.js +7 -37
- package/lib/pages/new-okr-list/header/index.css +0 -45
- package/lib/pages/new-okr-list/header/index.js +22 -28
- package/lib/pages/new-okr-list/index.js +25 -16
- package/lib/utils/format-time.js +1 -8
- package/lib/utils/open-data.js +1 -5
- package/package.json +1 -1
- package/lib/pages/new-okr-list/header/common.js +0 -52
- package/lib/pages/new-okr-list/header/operate-record.js +0 -88
package/.husky/pre-commit
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
align-items: center;
|
|
14
14
|
justify-content: center;
|
|
15
15
|
min-width: 64px;
|
|
16
|
-
font-size:
|
|
16
|
+
font-size: 13px;
|
|
17
17
|
padding: 0 12px;
|
|
18
18
|
}
|
|
19
19
|
|
|
@@ -60,35 +60,21 @@
|
|
|
60
60
|
background: #5c8eff;
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
.titaui-rect-btn--secondary {
|
|
64
|
-
font-size: 14px;
|
|
65
|
-
font-weight: normal;
|
|
66
|
-
color: #2879ff;
|
|
67
|
-
line-height: 28px;
|
|
68
|
-
background: rgba(40, 121, 255, 0.2);
|
|
69
|
-
margin-right: 16px;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.titaui-rect-btn--secondary:hover {
|
|
73
|
-
color: #fff;
|
|
74
|
-
background-color: #2879ff;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
63
|
.titaui-rect-btn--cancel {
|
|
78
|
-
color: #
|
|
79
|
-
border: 1px solid #
|
|
80
|
-
background: #
|
|
64
|
+
color: #6F7886;
|
|
65
|
+
border: 1px solid #DFE3EA;
|
|
66
|
+
background: #FFFFFF;
|
|
81
67
|
}
|
|
82
68
|
|
|
83
69
|
.titaui-rect-btn--cancel:hover {
|
|
84
|
-
color: #
|
|
85
|
-
border: 1px solid #
|
|
70
|
+
color: #2879FF;
|
|
71
|
+
border: 1px solid #2879FF;
|
|
86
72
|
}
|
|
87
73
|
|
|
88
74
|
.titaui-rect-btn--delete {
|
|
89
|
-
background: #
|
|
90
|
-
color: #
|
|
91
|
-
border: 1px solid #
|
|
75
|
+
background: #FFFFFF;
|
|
76
|
+
color: #F05E5E;
|
|
77
|
+
border: 1px solid #F05E5E;
|
|
92
78
|
}
|
|
93
79
|
|
|
94
80
|
.titaui-rect-btn--delete:hover {
|
|
@@ -107,10 +93,10 @@
|
|
|
107
93
|
}
|
|
108
94
|
|
|
109
95
|
.titaui-rect-btn--primary.titaui-rect-btn--disabled {
|
|
110
|
-
background: #
|
|
96
|
+
background: #93BCFF;
|
|
111
97
|
opacity: 1;
|
|
112
98
|
}
|
|
113
99
|
|
|
114
100
|
.titaui-rect-btn--primary.titaui-rect-btn--disabled:hover {
|
|
115
|
-
background: #
|
|
101
|
+
background: #93BCFF;
|
|
116
102
|
}
|
|
@@ -34,8 +34,7 @@ function RectBtn(props) {
|
|
|
34
34
|
className = _props$className === void 0 ? "" : _props$className,
|
|
35
35
|
_props$disabled = props.disabled,
|
|
36
36
|
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
37
|
-
style = props.style
|
|
38
|
-
children = props.children;
|
|
37
|
+
style = props.style;
|
|
39
38
|
|
|
40
39
|
var renderIcon = function renderIcon() {
|
|
41
40
|
if (typeof icon === "string") {
|
|
@@ -51,19 +50,16 @@ function RectBtn(props) {
|
|
|
51
50
|
}, icon);
|
|
52
51
|
};
|
|
53
52
|
|
|
54
|
-
var onClickHandler = function onClickHandler(
|
|
53
|
+
var onClickHandler = function onClickHandler() {
|
|
55
54
|
if (disabled) return;
|
|
56
|
-
|
|
57
|
-
if (onClick) {
|
|
58
|
-
onClick(e);
|
|
59
|
-
}
|
|
55
|
+
onClick && onClick();
|
|
60
56
|
};
|
|
61
57
|
|
|
62
58
|
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
63
59
|
className: (0, _classnames["default"])(precls, "".concat(precls, "--").concat(type), "".concat(precls, "--").concat(size), _defineProperty({}, "".concat(precls, "--disabled"), disabled), className),
|
|
64
60
|
style: style,
|
|
65
61
|
onClick: onClickHandler
|
|
66
|
-
}, icon && renderIcon(), children || text);
|
|
62
|
+
}, icon && renderIcon(), props.children || text);
|
|
67
63
|
}
|
|
68
64
|
|
|
69
65
|
var _default = RectBtn;
|
|
@@ -25,9 +25,7 @@ require("./index.css");
|
|
|
25
25
|
|
|
26
26
|
var _context = _interopRequireDefault(require("../drawer-manager/context"));
|
|
27
27
|
|
|
28
|
-
var
|
|
29
|
-
|
|
30
|
-
var _excluded = ["visible", "placement", "children", "mask", "width", "className", "contentWrapperStyle", "onClose", "style", "afterVisibleChange", "destroyOnClose", "bodyStyle", "zIndex", "autoClosable"];
|
|
28
|
+
var _excluded = ["visible", "placement", "children", "mask", "width", "className", "contentWrapperStyle", "onClose", "style", "afterVisibleChange", "destroyOnClose", "bodyStyle", "zIndex"];
|
|
31
29
|
|
|
32
30
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
33
31
|
|
|
@@ -56,7 +54,7 @@ var Drawer = function Drawer(props) {
|
|
|
56
54
|
|
|
57
55
|
var visible = props.visible,
|
|
58
56
|
_props$placement = props.placement,
|
|
59
|
-
placement = _props$placement === void 0 ?
|
|
57
|
+
placement = _props$placement === void 0 ? "right" : _props$placement,
|
|
60
58
|
children = props.children,
|
|
61
59
|
_props$mask = props.mask,
|
|
62
60
|
mask = _props$mask === void 0 ? false : _props$mask,
|
|
@@ -72,8 +70,6 @@ var Drawer = function Drawer(props) {
|
|
|
72
70
|
bodyStyle = props.bodyStyle,
|
|
73
71
|
_props$zIndex = props.zIndex,
|
|
74
72
|
zIndex = _props$zIndex === void 0 ? 1200 : _props$zIndex,
|
|
75
|
-
_props$autoClosable = props.autoClosable,
|
|
76
|
-
autoClosable = _props$autoClosable === void 0 ? false : _props$autoClosable,
|
|
77
73
|
rest = _objectWithoutProperties(props, _excluded);
|
|
78
74
|
|
|
79
75
|
var handleAfterVisibleChange = (0, _react.useCallback)(function (opened) {
|
|
@@ -93,20 +89,6 @@ var Drawer = function Drawer(props) {
|
|
|
93
89
|
return children;
|
|
94
90
|
}
|
|
95
91
|
|
|
96
|
-
var autoClose = function autoClose(e) {
|
|
97
|
-
if ((0, _dom.hasAncestorElement)(e.target, 'document-mouse-event-ignore,rc-tooltip,titaui-popup,rc-dialog-root,common-modal,in-modal,task-hot-add')) return;
|
|
98
|
-
onClose();
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
(0, _react.useEffect)(function () {
|
|
102
|
-
if (autoClosable) {
|
|
103
|
-
document.addEventListener('mousedown', autoClose);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
return function () {
|
|
107
|
-
document.removeEventListener('mousedown', autoClose);
|
|
108
|
-
};
|
|
109
|
-
}, []);
|
|
110
92
|
return /*#__PURE__*/_react["default"].createElement(DrawerContext.Provider, {
|
|
111
93
|
value: {
|
|
112
94
|
close: function close() {
|
|
@@ -114,7 +96,7 @@ var Drawer = function Drawer(props) {
|
|
|
114
96
|
}
|
|
115
97
|
}
|
|
116
98
|
}, /*#__PURE__*/_react["default"].createElement(_rcDrawer["default"], _extends({
|
|
117
|
-
className: (0, _classnames["default"])(
|
|
99
|
+
className: (0, _classnames["default"])("titaui-drawer", "document-mouse-event-ignore", className),
|
|
118
100
|
style: _objectSpread(_objectSpread({}, style), {}, {
|
|
119
101
|
zIndex: zIndex
|
|
120
102
|
})
|
|
@@ -140,7 +122,8 @@ function DrawerHeader(_ref) {
|
|
|
140
122
|
actionMaxCount = _ref$actionMaxCount === void 0 ? 4 : _ref$actionMaxCount,
|
|
141
123
|
content = _ref.content,
|
|
142
124
|
style = _ref.style,
|
|
143
|
-
onClose = _ref.onClose
|
|
125
|
+
onClose = _ref.onClose,
|
|
126
|
+
actionComponent = _ref.actionComponent;
|
|
144
127
|
var drawer = (0, _react.useContext)(DrawerContext);
|
|
145
128
|
var manager = (0, _react.useContext)(_context["default"]);
|
|
146
129
|
var showClose = closable && (!!onClose || !!drawer);
|
|
@@ -163,16 +146,16 @@ function DrawerHeader(_ref) {
|
|
|
163
146
|
onClick: manager && manager.goBack
|
|
164
147
|
}, /*#__PURE__*/_react["default"].createElement("i", {
|
|
165
148
|
className: "tu-icon-fanhui"
|
|
166
|
-
}), (0, _getLocale.getLocale)(
|
|
149
|
+
}), (0, _getLocale.getLocale)("Mod_Back")), showBackBtn && hasContent && /*#__PURE__*/_react["default"].createElement("div", {
|
|
167
150
|
className: "titaui-drawer-header-divider"
|
|
168
151
|
}), hasContent && content, /*#__PURE__*/_react["default"].createElement("div", {
|
|
169
152
|
style: {
|
|
170
153
|
flex: 1
|
|
171
154
|
}
|
|
172
|
-
}), displayActions.map(function (action) {
|
|
155
|
+
}), /*#__PURE__*/_react["default"].createElement("div", null, actionComponent), displayActions.map(function (action) {
|
|
173
156
|
return /*#__PURE__*/_react["default"].createElement(_headerAction["default"], action);
|
|
174
157
|
}), !!collapsedActions.length && /*#__PURE__*/_react["default"].createElement(_headerAction["default"], {
|
|
175
|
-
title: (0, _getLocale.getLocale)(
|
|
158
|
+
title: (0, _getLocale.getLocale)("Mod_MoreOperate"),
|
|
176
159
|
icon: "tu-icon-10",
|
|
177
160
|
children: collapsedActions
|
|
178
161
|
}), showClose && /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -25,45 +25,42 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
25
25
|
|
|
26
26
|
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; }
|
|
27
27
|
|
|
28
|
-
function _objectDestructuringEmpty(obj) { if (obj == null) throw new TypeError("Cannot destructure undefined"); }
|
|
29
|
-
|
|
30
28
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
31
29
|
|
|
32
30
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
33
31
|
|
|
34
32
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
35
33
|
|
|
36
|
-
var typeMap = {};
|
|
37
|
-
|
|
38
34
|
var DrawerManager = /*#__PURE__*/function () {
|
|
39
35
|
function DrawerManager() {
|
|
40
36
|
var _this = this;
|
|
41
37
|
|
|
42
|
-
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
43
|
-
|
|
44
|
-
_objectDestructuringEmpty(_ref);
|
|
45
|
-
|
|
46
38
|
_classCallCheck(this, DrawerManager);
|
|
47
39
|
|
|
48
40
|
this.history = [];
|
|
49
41
|
this.uid = 0;
|
|
42
|
+
this.typeMap = {};
|
|
50
43
|
|
|
51
44
|
this.open = function (type) {
|
|
52
45
|
var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
53
46
|
var drawerProps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
54
|
-
if (!type) throw "need provide drawer type";
|
|
55
|
-
var Component = typeMap[type];
|
|
56
|
-
if (!Component) throw "the type is not regisited";
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
47
|
+
if (!type) throw new Error("need provide drawer type");
|
|
48
|
+
var Component = typeof type === "string" ? _this.typeMap[type] : type;
|
|
49
|
+
if (!Component) throw new Error("the type is not regisited");
|
|
50
|
+
|
|
51
|
+
if (window.titaTracker) {
|
|
52
|
+
window.titaTracker("action").record({
|
|
53
|
+
actionName: type,
|
|
54
|
+
actionGroup: "打开推屏",
|
|
55
|
+
productName: "OKR"
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
|
|
62
59
|
return new Promise(function (resolve) {
|
|
63
60
|
clearTimeout(_this.timer);
|
|
64
61
|
_this.timer = setTimeout(function () {
|
|
65
62
|
var uid = _this.uid;
|
|
66
|
-
_this.uid
|
|
63
|
+
_this.uid += 1;
|
|
67
64
|
var extendedDrawerProps = drawerProps;
|
|
68
65
|
|
|
69
66
|
if (_this.history.length > 0) {
|
|
@@ -82,7 +79,7 @@ var DrawerManager = /*#__PURE__*/function () {
|
|
|
82
79
|
key: uid
|
|
83
80
|
}, props)), extendedDrawerProps);
|
|
84
81
|
|
|
85
|
-
if (_this.history.length
|
|
82
|
+
if (_this.history.length === 1) {
|
|
86
83
|
document.addEventListener("mousedown", _this.autoClose);
|
|
87
84
|
}
|
|
88
85
|
}, 200);
|
|
@@ -109,14 +106,16 @@ var DrawerManager = /*#__PURE__*/function () {
|
|
|
109
106
|
};
|
|
110
107
|
|
|
111
108
|
this.close = function () {
|
|
112
|
-
_this.history.reverse().forEach(function (
|
|
113
|
-
var resolve =
|
|
109
|
+
_this.history.reverse().forEach(function (_ref) {
|
|
110
|
+
var resolve = _ref.resolve;
|
|
114
111
|
return resolve();
|
|
115
112
|
});
|
|
116
113
|
|
|
117
114
|
_this.history = [];
|
|
118
115
|
|
|
119
116
|
_this.drawer.close();
|
|
117
|
+
|
|
118
|
+
document.removeEventListener("mousedown", _this.autoClose);
|
|
120
119
|
};
|
|
121
120
|
|
|
122
121
|
this.autoClose = function (e) {
|
|
@@ -125,20 +124,19 @@ var DrawerManager = /*#__PURE__*/function () {
|
|
|
125
124
|
return;
|
|
126
125
|
}
|
|
127
126
|
|
|
128
|
-
if ((0, _dom.hasAncestorElement)(e.target, "document-mouse-event-ignore,rc-tooltip,titaui-popup,rc-dialog-root,common-modal,in-modal,task-hot-add"))
|
|
127
|
+
if ((0, _dom.hasAncestorElement)(e.target, "document-mouse-event-ignore,rc-tooltip,titaui-popup,rc-dialog-root,common-modal,in-modal,task-hot-add")) {
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
129
130
|
|
|
130
131
|
_this.close();
|
|
132
|
+
};
|
|
131
133
|
|
|
132
|
-
|
|
134
|
+
this.regist = function (type, component) {
|
|
135
|
+
_this.typeMap[type] = component;
|
|
133
136
|
};
|
|
134
137
|
}
|
|
135
138
|
|
|
136
139
|
_createClass(DrawerManager, [{
|
|
137
|
-
key: "regist",
|
|
138
|
-
value: function regist(type, component) {
|
|
139
|
-
typeMap[type] = component;
|
|
140
|
-
}
|
|
141
|
-
}, {
|
|
142
140
|
key: "drawer",
|
|
143
141
|
get: function get() {
|
|
144
142
|
var _this2 = this;
|
|
@@ -13,15 +13,24 @@ var _utils = require("../dynamic-chart/utils");
|
|
|
13
13
|
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
15
|
|
|
16
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
17
|
+
|
|
16
18
|
var prefixCls = "titaui-dynamic-item";
|
|
17
19
|
|
|
18
20
|
var DynamicAIDialy = function DynamicAIDialy(_ref) {
|
|
19
21
|
var data = _ref.data;
|
|
20
|
-
|
|
22
|
+
|
|
23
|
+
var chartQuery = _react["default"].useMemo(function () {
|
|
24
|
+
return (0, _utils.getChartProps)(data.biId);
|
|
25
|
+
}, [data.biId]);
|
|
26
|
+
|
|
21
27
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
22
28
|
className: prefixCls
|
|
23
|
-
}, /*#__PURE__*/_react["default"].createElement(_supersetCharts["default"],
|
|
29
|
+
}, /*#__PURE__*/_react["default"].createElement(_supersetCharts["default"], _extends({
|
|
30
|
+
feedData: data
|
|
31
|
+
}, chartQuery)));
|
|
24
32
|
};
|
|
25
33
|
|
|
26
|
-
var _default = DynamicAIDialy;
|
|
34
|
+
var _default = /*#__PURE__*/_react["default"].memo(DynamicAIDialy);
|
|
35
|
+
|
|
27
36
|
exports["default"] = _default;
|
|
@@ -19,16 +19,16 @@ exports.onlineBroadcastData = exports["default"] = void 0;
|
|
|
19
19
|
// }
|
|
20
20
|
var onlineBroadcastData = [{
|
|
21
21
|
hasOnline: true,
|
|
22
|
-
preContent: "
|
|
23
|
-
preHref: "https://wiki.tita.com/x/
|
|
22
|
+
preContent: "「考核」OKR 维度支持按 KR 评分啦",
|
|
23
|
+
preHref: "https://wiki.tita.com/x/JYOeAQ",
|
|
24
24
|
isNew: true,
|
|
25
|
-
date: "
|
|
25
|
+
date: "4/11"
|
|
26
26
|
}, {
|
|
27
27
|
hasOnline: true,
|
|
28
|
-
preContent: "
|
|
29
|
-
preHref: "https://wiki.tita.com/x/
|
|
30
|
-
isNew:
|
|
31
|
-
date: "3/
|
|
28
|
+
preContent: "「OKR 工作法」体验优化 ",
|
|
29
|
+
preHref: "https://wiki.tita.com/x/jIOeAQ",
|
|
30
|
+
isNew: false,
|
|
31
|
+
date: "3/29"
|
|
32
32
|
}, {
|
|
33
33
|
hasOnline: true,
|
|
34
34
|
preContent: "「考核」支持建立企业指标库",
|
|
@@ -85,7 +85,18 @@ var ImgViewer = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
85
85
|
isLoading = _useState12[0],
|
|
86
86
|
setIsLoading = _useState12[1];
|
|
87
87
|
|
|
88
|
+
var _useState13 = (0, _react.useState)(0),
|
|
89
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
90
|
+
moveX = _useState14[0],
|
|
91
|
+
setMoveX = _useState14[1];
|
|
92
|
+
|
|
93
|
+
var _useState15 = (0, _react.useState)(0),
|
|
94
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
95
|
+
moveY = _useState16[0],
|
|
96
|
+
setMoveY = _useState16[1];
|
|
97
|
+
|
|
88
98
|
var imgRef = (0, _react.useRef)(document.createElement("img"));
|
|
99
|
+
var DragRef = (0, _react.useRef)(document.createElement("div"));
|
|
89
100
|
|
|
90
101
|
var showPreview = function showPreview() {
|
|
91
102
|
var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
@@ -120,6 +131,31 @@ var ImgViewer = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
120
131
|
setCurrentRotateDeg(currentRotateDeg - 90);
|
|
121
132
|
};
|
|
122
133
|
|
|
134
|
+
var handleMouseDownImg = function handleMouseDownImg(e) {
|
|
135
|
+
e.preventDefault();
|
|
136
|
+
var downX = e.clientX;
|
|
137
|
+
var downY = e.clientY; // 因为这个moveX不闭包的话在拖动的时候他就 一直累加
|
|
138
|
+
|
|
139
|
+
var beforeX = moveX;
|
|
140
|
+
var beforeY = moveY;
|
|
141
|
+
|
|
142
|
+
DragRef.current.onmousemove = function (e1) {
|
|
143
|
+
//获取x和y
|
|
144
|
+
var nx = e1.clientX;
|
|
145
|
+
var ny = e1.clientY; // //计算移动后的左偏移量和顶部的偏移量
|
|
146
|
+
|
|
147
|
+
var nl = nx - downX + beforeX;
|
|
148
|
+
var nt = ny - downY + beforeY;
|
|
149
|
+
setMoveX(nl);
|
|
150
|
+
setMoveY(nt);
|
|
151
|
+
};
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
var handleMouseUpImg = function handleMouseUpImg(e) {
|
|
155
|
+
e.preventDefault();
|
|
156
|
+
DragRef.current.onmousemove = null;
|
|
157
|
+
};
|
|
158
|
+
|
|
123
159
|
var handleRightRotate = function handleRightRotate() {
|
|
124
160
|
setCurrentRotateDeg(currentRotateDeg + 90);
|
|
125
161
|
};
|
|
@@ -170,7 +206,10 @@ var ImgViewer = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
170
206
|
className: (0, _classnames["default"])("tu-icon-close", "".concat(prefix, "__header-close")),
|
|
171
207
|
onClick: hidePreview
|
|
172
208
|
}))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
173
|
-
className: "".concat(prefix, "__body")
|
|
209
|
+
className: "".concat(prefix, "__body"),
|
|
210
|
+
ref: DragRef,
|
|
211
|
+
onMouseDown: handleMouseDownImg,
|
|
212
|
+
onMouseUp: handleMouseUpImg
|
|
174
213
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
175
214
|
className: (0, _classnames["default"])("".concat(prefix, "__body-operate-btn"), "".concat(prefix, "__body-operate-btn--left"), _defineProperty({}, "".concat(prefix, "__body-operate-btn--disable"), currentIndex === 0)),
|
|
176
215
|
onClick: handlePreImgClick
|
|
@@ -184,17 +223,17 @@ var ImgViewer = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
184
223
|
})), isLoading && /*#__PURE__*/_react["default"].createElement("div", {
|
|
185
224
|
className: "".concat(prefix, "__body--loading")
|
|
186
225
|
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
187
|
-
src: _loading["default"]
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
transform: "rotate(".concat(currentRotateDeg, "deg)")
|
|
191
|
-
}
|
|
192
|
-
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
226
|
+
src: _loading["default"],
|
|
227
|
+
alt: ""
|
|
228
|
+
})), /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("img", {
|
|
193
229
|
className: "".concat(prefix, "__body-img"),
|
|
194
230
|
ref: imgRef,
|
|
231
|
+
alt: "",
|
|
195
232
|
src: (currentImgData === null || currentImgData === void 0 ? void 0 : currentImgData.previewUrl) || (currentImgData === null || currentImgData === void 0 ? void 0 : currentImgData.bigImageUrl),
|
|
196
233
|
style: {
|
|
197
|
-
transform: "scale(".concat(currentScale, ")")
|
|
234
|
+
transform: "scale(".concat(currentScale, ") rotate(").concat(currentRotateDeg, "deg) "),
|
|
235
|
+
left: "".concat(moveX, "px"),
|
|
236
|
+
top: "".concat(moveY, "px")
|
|
198
237
|
}
|
|
199
238
|
}))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
200
239
|
className: "".concat(prefix, "__footer")
|
|
@@ -109,29 +109,7 @@ var DemoMenuData = /*#__PURE__*/function () {
|
|
|
109
109
|
key: PAGE_DUEDATE_ORDER,
|
|
110
110
|
href: "#/demofree/recharge/order",
|
|
111
111
|
isShow: this.isManager === EManagerType.ReCharge || this.isManager === EManagerType.Manager
|
|
112
|
-
}
|
|
113
|
-
// icon: "",
|
|
114
|
-
// label: "续费状态",
|
|
115
|
-
// key: PAGE_RECHARGE_STATUS,
|
|
116
|
-
// href: "#/demofree/recharge/status",
|
|
117
|
-
// isShow: this.isManager === EManagerType.ReCharge || this.isManager === EManagerType.Manager,
|
|
118
|
-
// },
|
|
119
|
-
// {
|
|
120
|
-
// icon: "",
|
|
121
|
-
// label: "数据统计",
|
|
122
|
-
// key: PAGE_RECHARGE_STATISTICS,
|
|
123
|
-
// href: "#/demofree/recharge/statistics",
|
|
124
|
-
// isShow: this.isManager === EManagerType.ReCharge || this.isManager === EManagerType.Manager,
|
|
125
|
-
// },
|
|
126
|
-
]
|
|
127
|
-
}, {
|
|
128
|
-
icon: "KH-help",
|
|
129
|
-
label: "预约演示报表",
|
|
130
|
-
key: "charts",
|
|
131
|
-
href: "#/demofree/charts",
|
|
132
|
-
isShow: this.isManager === EManagerType.Manager,
|
|
133
|
-
children: [],
|
|
134
|
-
type: _index.MENU_ITEM_NOE
|
|
112
|
+
}]
|
|
135
113
|
}];
|
|
136
114
|
}
|
|
137
115
|
|
|
@@ -31,6 +31,8 @@ var _default = /*#__PURE__*/function () {
|
|
|
31
31
|
cb(_menus.PAGE_MY_PART_OKR);
|
|
32
32
|
} else if (this.isMyTargetOkr()) {
|
|
33
33
|
cb(_menus.PAGE_MY_TARGET_OKR);
|
|
34
|
+
} else if (this.isTargetUser()) {
|
|
35
|
+
return null;
|
|
34
36
|
} else {
|
|
35
37
|
cb(_menus.PAGE_MY_OWNER_OKR);
|
|
36
38
|
}
|
|
@@ -43,6 +45,8 @@ var _default = /*#__PURE__*/function () {
|
|
|
43
45
|
} else if (this.isOkrCases()) {
|
|
44
46
|
cb(_menus.PAGE_OKR_CASES);
|
|
45
47
|
}
|
|
48
|
+
|
|
49
|
+
return null;
|
|
46
50
|
}
|
|
47
51
|
}, {
|
|
48
52
|
key: "isMyOkr",
|
|
@@ -62,6 +66,12 @@ var _default = /*#__PURE__*/function () {
|
|
|
62
66
|
var search = this.history.location.search;
|
|
63
67
|
return !!search.match(/relation[\s]*?=[\s]*?3/);
|
|
64
68
|
}
|
|
69
|
+
}, {
|
|
70
|
+
key: "isTargetUser",
|
|
71
|
+
value: function isTargetUser() {
|
|
72
|
+
var search = this.history.location.search;
|
|
73
|
+
return !!search.match(/toUserId[\s]*?=[\d]+/);
|
|
74
|
+
}
|
|
65
75
|
}, {
|
|
66
76
|
key: "isOkr",
|
|
67
77
|
value: function isOkr() {
|
|
@@ -15,8 +15,6 @@ var _bsGlobal = require("../../utils/bs-global");
|
|
|
15
15
|
|
|
16
16
|
var _userOwnMenu = _interopRequireDefault(require("./components/user-own-menu"));
|
|
17
17
|
|
|
18
|
-
var _useGlobalValue = _interopRequireDefault(require("./useGlobalValue"));
|
|
19
|
-
|
|
20
18
|
var _menu = _interopRequireDefault(require("./components/menu"));
|
|
21
19
|
|
|
22
20
|
var _userMessage = _interopRequireDefault(require("./components/user-message"));
|
|
@@ -172,7 +170,5 @@ var NavTop = function NavTop() {
|
|
|
172
170
|
}, /*#__PURE__*/_react["default"].createElement(_userOwnMenu["default"], null)));
|
|
173
171
|
};
|
|
174
172
|
|
|
175
|
-
var _default = NavTop;
|
|
176
|
-
|
|
177
|
-
exports["default"] = _default;
|
|
178
|
-
NavTop.useGlobalValue = _useGlobalValue["default"];
|
|
173
|
+
var _default = NavTop;
|
|
174
|
+
exports["default"] = _default;
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
.tita-okrdt-tree__o-child-node-prefix::before {
|
|
57
|
-
content:
|
|
57
|
+
content: '';
|
|
58
58
|
width: 9px;
|
|
59
59
|
height: 12px;
|
|
60
60
|
background: url(../../images/O.svg) transparent no-repeat 50% 50%;
|
|
@@ -73,11 +73,12 @@
|
|
|
73
73
|
|
|
74
74
|
.child-okrs-weight__content {
|
|
75
75
|
padding: 10px 32px 8px;
|
|
76
|
+
max-height: 300px;
|
|
76
77
|
min-height: 90px;
|
|
78
|
+
overflow: auto;
|
|
77
79
|
box-sizing: border-box;
|
|
78
80
|
display: flex;
|
|
79
81
|
flex-direction: column;
|
|
80
|
-
justify-content: center;
|
|
81
82
|
}
|
|
82
83
|
|
|
83
84
|
.child-okrs-weight__item {
|
|
@@ -105,7 +106,7 @@
|
|
|
105
106
|
}
|
|
106
107
|
|
|
107
108
|
.child-okrs-weight__item-precls:before {
|
|
108
|
-
content:
|
|
109
|
+
content: '';
|
|
109
110
|
width: 10px;
|
|
110
111
|
height: 8px;
|
|
111
112
|
border-radius: 50%;
|