@titaui/pc 1.15.30 → 1.15.33
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/lib/components/dynamic/dynamic-item/components/summary-header/index.js +19 -19
- package/lib/components/img-viewer/index.css +1 -0
- package/lib/components/okr-flow/child-node/fields/creator.js +7 -6
- package/lib/components/okr-flow/child-node/index.css +3 -2
- package/lib/components/okr-flow/child-node/work-node.js +1 -1
- package/lib/components/task-relation-modal/relation-single-okr/index.css +6 -1
- package/package.json +1 -1
|
@@ -49,14 +49,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
49
49
|
|
|
50
50
|
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; }
|
|
51
51
|
|
|
52
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
53
|
-
|
|
54
|
-
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."); }
|
|
55
|
-
|
|
56
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
57
|
-
|
|
58
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
59
|
-
|
|
60
52
|
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; }
|
|
61
53
|
|
|
62
54
|
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; }
|
|
@@ -120,7 +112,6 @@ var DynamicItemHeader = function DynamicItemHeader(_ref) {
|
|
|
120
112
|
summaryVisible = data.summaryVisible,
|
|
121
113
|
visibilityScope = data.visibilityScope,
|
|
122
114
|
publishUser = data.publishUser;
|
|
123
|
-
console.log('data', data);
|
|
124
115
|
|
|
125
116
|
var _useState = (0, _react.useState)(isCollect),
|
|
126
117
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -169,11 +160,28 @@ var DynamicItemHeader = function DynamicItemHeader(_ref) {
|
|
|
169
160
|
departmentName = _ref3.departmentName,
|
|
170
161
|
departmentId = _ref3.departmentId;
|
|
171
162
|
|
|
163
|
+
console.log('users', users);
|
|
164
|
+
var departmentsRender = (0, _react.useMemo)(function () {
|
|
165
|
+
return (departments === null || departments === void 0 ? void 0 : departments.length) !== 0 && departments.map(function (item, index) {
|
|
166
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_openData.OpenDepartmentName, {
|
|
167
|
+
name: item.name,
|
|
168
|
+
id: item.id
|
|
169
|
+
}), /*#__PURE__*/_react["default"].createElement("span", null, ","));
|
|
170
|
+
});
|
|
171
|
+
}, [departments]);
|
|
172
|
+
var usersRender = (0, _react.useMemo)(function () {
|
|
173
|
+
return (users === null || users === void 0 ? void 0 : users.length) !== 0 && users.map(function (item, index) {
|
|
174
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_openData.OpenUserName, {
|
|
175
|
+
name: item.name,
|
|
176
|
+
id: item.userId
|
|
177
|
+
}), /*#__PURE__*/_react["default"].createElement("span", null, ","));
|
|
178
|
+
});
|
|
179
|
+
}, [users]);
|
|
172
180
|
var typeTootips = {
|
|
173
181
|
2: (0, _getLocale.getLocale)('Rep_NewS_RefeSummary'),
|
|
174
182
|
3: /*#__PURE__*/_react["default"].createElement("span", null, (0, _getLocale.getLocale)('Per_Ass_New_Appr_detail_Affiliat'), (0, _getLocale.getLocale)('OKR_MyO_Text_Visible')),
|
|
175
183
|
1: /*#__PURE__*/_react["default"].createElement("span", null, (0, _getLocale.getLocale)('OKR_MyO_Pop_Company'), (0, _getLocale.getLocale)('Rep_Tab_Subor_EveryoneSee')),
|
|
176
|
-
5: str
|
|
184
|
+
5: /*#__PURE__*/_react["default"].createElement("span", null, departmentsRender, usersRender, str)
|
|
177
185
|
};
|
|
178
186
|
var url = '';
|
|
179
187
|
var loginUserId = (0, _bsGlobal.getUserInfo)().Id;
|
|
@@ -346,18 +354,10 @@ var DynamicItemHeader = function DynamicItemHeader(_ref) {
|
|
|
346
354
|
});
|
|
347
355
|
}, []);
|
|
348
356
|
(0, _react.useEffect)(function () {
|
|
349
|
-
var _ref6;
|
|
350
|
-
|
|
351
|
-
var departmentsStr = (departments === null || departments === void 0 ? void 0 : departments.length) !== 0 ? departments === null || departments === void 0 ? void 0 : departments.map(function (item) {
|
|
352
|
-
return item.name;
|
|
353
|
-
}) : [];
|
|
354
357
|
var groupsStr = (groups === null || groups === void 0 ? void 0 : groups.length) !== 0 ? groups === null || groups === void 0 ? void 0 : groups.map(function (item) {
|
|
355
358
|
return item.name;
|
|
356
359
|
}) : [];
|
|
357
|
-
|
|
358
|
-
return item.name;
|
|
359
|
-
}) : [];
|
|
360
|
-
setStr((_ref6 = [].concat(_toConsumableArray(departmentsStr), _toConsumableArray(groupsStr), _toConsumableArray(usersStr))) === null || _ref6 === void 0 ? void 0 : _ref6.join(','));
|
|
360
|
+
setStr(groupsStr === null || groupsStr === void 0 ? void 0 : groupsStr.join(','));
|
|
361
361
|
}, [visibilityScope]);
|
|
362
362
|
(0, _react.useEffect)(function () {
|
|
363
363
|
if (dailyContent) {
|
|
@@ -116,7 +116,7 @@ function Creator(_ref) {
|
|
|
116
116
|
var generalCanvas = function generalCanvas() {
|
|
117
117
|
var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "text";
|
|
118
118
|
var userName = arguments.length > 1 ? arguments[1] : undefined;
|
|
119
|
-
var font = "normal
|
|
119
|
+
var font = "normal 24px/30px Arial,Verdana,Helvetica Neue,Helvetica,sans-serif,PingFang SC,Microsoft YaHei";
|
|
120
120
|
var canvas = document.createElement("canvas");
|
|
121
121
|
var ctx = canvas.getContext("2d");
|
|
122
122
|
ctx.font = font;
|
|
@@ -124,14 +124,14 @@ function Creator(_ref) {
|
|
|
124
124
|
var _ctx$measureText = ctx.measureText(userName),
|
|
125
125
|
width = _ctx$measureText.width;
|
|
126
126
|
|
|
127
|
-
var actualWidth = Math.min(width,
|
|
128
|
-
(0, _openDataPainter.setSize)(canvas, ctx, actualWidth,
|
|
127
|
+
var actualWidth = Math.min(width, 184);
|
|
128
|
+
(0, _openDataPainter.setSize)(canvas, ctx, actualWidth, 48); // 设置画布尺寸
|
|
129
129
|
|
|
130
130
|
setImgwidth(actualWidth);
|
|
131
131
|
ctx.textBaseline = "middle";
|
|
132
132
|
ctx.font = font;
|
|
133
133
|
ctx.fillStyle = type == "text" ? "#6f7886" : "#FFFFFF";
|
|
134
|
-
ctx.fillText(userName, 0,
|
|
134
|
+
ctx.fillText(userName, 0, 36);
|
|
135
135
|
type == "text" ? setNormalImg(canvas.toDataURL()) : setWhiteImg(canvas.toDataURL());
|
|
136
136
|
};
|
|
137
137
|
|
|
@@ -167,9 +167,10 @@ function Creator(_ref) {
|
|
|
167
167
|
src: darkTheme ? whiteImg : normalImg,
|
|
168
168
|
style: {
|
|
169
169
|
maxWidth: 92,
|
|
170
|
-
marginLeft: 4
|
|
170
|
+
marginLeft: 4,
|
|
171
|
+
transform: 'translateY(-20%)'
|
|
171
172
|
},
|
|
172
|
-
width: imgWidth
|
|
173
|
+
width: Number(imgWidth) / 2
|
|
173
174
|
}));
|
|
174
175
|
}
|
|
175
176
|
|
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
.titaui-okr-flow--node-right {
|
|
145
145
|
position: absolute;
|
|
146
146
|
right: 0;
|
|
147
|
-
top:
|
|
147
|
+
top: 2px;
|
|
148
148
|
}
|
|
149
149
|
|
|
150
150
|
.titaui-okr-flow--node-type {
|
|
@@ -152,6 +152,7 @@
|
|
|
152
152
|
}
|
|
153
153
|
|
|
154
154
|
.titaui-okr-flow--node-cycle, .titaui-okr-flow--node-type {
|
|
155
|
+
height: 22px;
|
|
155
156
|
display: inline-block !important;
|
|
156
157
|
background: #f7f9fb;
|
|
157
158
|
border-radius: 12px;
|
|
@@ -163,7 +164,7 @@
|
|
|
163
164
|
overflow: hidden;
|
|
164
165
|
text-overflow: ellipsis;
|
|
165
166
|
white-space: nowrap;
|
|
166
|
-
line-height:
|
|
167
|
+
line-height: 22px;
|
|
167
168
|
max-width: 96px;
|
|
168
169
|
}
|
|
169
170
|
|
|
@@ -165,7 +165,7 @@ function WorkNode(_ref) {
|
|
|
165
165
|
var name = arguments.length > 1 ? arguments[1] : undefined;
|
|
166
166
|
var canvas = document.createElement('canvas');
|
|
167
167
|
var ctx = canvas.getContext('2d');
|
|
168
|
-
var font = '
|
|
168
|
+
var font = '400 12px/12px OPPOSans, Arial, Verdana, "Helvetica Neue", Helvetica, sans-serif, "PingFang SC", "Microsoft YaHei"';
|
|
169
169
|
ctx.font = font; // const fitStr = fittingString(ctx, name, 92);
|
|
170
170
|
|
|
171
171
|
var _ctx$measureText = ctx.measureText(name),
|
|
@@ -5,11 +5,16 @@
|
|
|
5
5
|
box-shadow: 0px 4px 16px 0px rgba(127, 145, 180, 0.2);
|
|
6
6
|
border: 1px solid #F0F2F5;
|
|
7
7
|
border-radius: 24px;
|
|
8
|
-
padding: 20px
|
|
8
|
+
padding: 20px 10px 16px 16px;
|
|
9
9
|
box-sizing: border-box;
|
|
10
10
|
overflow: auto;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
+
.relation-single-okr__pop::-webkit-scrollbar {
|
|
14
|
+
width: 10px !important;
|
|
15
|
+
height: 10px !important;
|
|
16
|
+
}
|
|
17
|
+
|
|
13
18
|
.relation-single-okr__pop-O {
|
|
14
19
|
display: flex;
|
|
15
20
|
align-items: flex-start;
|