@titaui/pc 1.15.40-beta.10 → 1.15.40-beta.13
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/okr-excel/hooks.js +1 -1
- package/lib/components/okr-excel/index.js +9 -2
- package/lib/components/okr-filter-drawer/filter-form.js +6 -2
- package/lib/components/okr-flow/child-node/fields/creator.js +4 -5
- package/lib/pages/new-okr-list/header/index.js +3 -1
- package/lib/pages/new-okr-list/index.js +4 -1
- package/lib/pages/new-okr-list/list/index.js +4 -1
- package/lib/utils/open-data.js +16 -65
- package/package.json +1 -1
|
@@ -85,7 +85,7 @@ function createDefaultOptions(cacheOptionDic, columns) {
|
|
|
85
85
|
columns.forEach(function (item, idx) {
|
|
86
86
|
optionDic[item.field] = {
|
|
87
87
|
key: item.field,
|
|
88
|
-
hide: false,
|
|
88
|
+
hide: item.hide || false,
|
|
89
89
|
width: item.width,
|
|
90
90
|
idx: idx
|
|
91
91
|
}; // 如果存在缓存,则复用现有的显示状态,避免在重置缓存后让用户以为是BUG
|
|
@@ -71,21 +71,25 @@ var App = function App(_ref2) {
|
|
|
71
71
|
}), _objectSpread(_objectSpread(_objectSpread({}, defaultColumnOption), defaultSpanOption), {}, {
|
|
72
72
|
field: dicData['类型'],
|
|
73
73
|
valueGetter: 'data.okrType',
|
|
74
|
+
hide: true,
|
|
74
75
|
width: 100,
|
|
75
76
|
cellRenderer: _renders.okrTypeRenderer
|
|
76
77
|
}), _objectSpread(_objectSpread(_objectSpread({}, defaultColumnOption), defaultSpanOption), {}, {
|
|
77
78
|
field: dicData['负责人'],
|
|
78
79
|
valueGetter: 'data.principalUser.name',
|
|
80
|
+
hide: true,
|
|
79
81
|
width: 100,
|
|
80
82
|
cellRenderer: _renders.userRenderer
|
|
81
83
|
}), _objectSpread(_objectSpread(_objectSpread({}, defaultColumnOption), defaultSpanOption), {}, {
|
|
82
84
|
field: dicData['对齐目标'],
|
|
83
85
|
valueGetter: 'data.parentPrincipal.principalName',
|
|
84
|
-
width: 100
|
|
86
|
+
width: 100,
|
|
87
|
+
hide: true
|
|
85
88
|
}), _objectSpread(_objectSpread(_objectSpread({}, defaultColumnOption), defaultSpanOption), {}, {
|
|
86
89
|
field: dicData['可见范围'],
|
|
87
90
|
valueGetter: 'data.visibility',
|
|
88
91
|
width: 100,
|
|
92
|
+
hide: true,
|
|
89
93
|
cellRenderer: _renders.visibilityRenderer
|
|
90
94
|
}), _objectSpread(_objectSpread(_objectSpread({}, defaultColumnOption), defaultSpanOption), {}, {
|
|
91
95
|
field: dicData['目标完成度'],
|
|
@@ -96,7 +100,8 @@ var App = function App(_ref2) {
|
|
|
96
100
|
field: dicData['目标最新进展'],
|
|
97
101
|
valueGetter: 'data.progressDescription',
|
|
98
102
|
cellRenderer: _renders.tooltipRenderer,
|
|
99
|
-
width: 200
|
|
103
|
+
width: 200,
|
|
104
|
+
hide: true
|
|
100
105
|
}), _objectSpread(_objectSpread({}, defaultColumnOption), {}, {
|
|
101
106
|
field: dicData['关键成果(KR)'],
|
|
102
107
|
valueGetter: 'data.Kr.mileStoneName',
|
|
@@ -106,11 +111,13 @@ var App = function App(_ref2) {
|
|
|
106
111
|
field: dicData['KR 负责人'],
|
|
107
112
|
valueGetter: 'data.Kr.user.name',
|
|
108
113
|
width: 100,
|
|
114
|
+
hide: true,
|
|
109
115
|
cellRenderer: _renders.krUserRenderer
|
|
110
116
|
}), _objectSpread(_objectSpread({}, defaultColumnOption), {}, {
|
|
111
117
|
field: dicData['权重'],
|
|
112
118
|
valueGetter: 'data.Kr.krWeight',
|
|
113
119
|
width: 80,
|
|
120
|
+
hide: true,
|
|
114
121
|
cellRenderer: _renders.krWeightRenderer
|
|
115
122
|
}), _objectSpread(_objectSpread({}, defaultColumnOption), {}, {
|
|
116
123
|
field: dicData['信心指数'],
|
|
@@ -85,6 +85,10 @@ var getOkrClassifyList = function getOkrClassifyList() {
|
|
|
85
85
|
|
|
86
86
|
var getOrderTypeList = function getOrderTypeList() {
|
|
87
87
|
return [{
|
|
88
|
+
label: '自定义排序',
|
|
89
|
+
value: 0,
|
|
90
|
+
toolTip: '自定义排序'
|
|
91
|
+
}, {
|
|
88
92
|
label: (0, _getLocale.getLocale)("OKR_MyO_Text_Firstcreated"),
|
|
89
93
|
value: 2,
|
|
90
94
|
toolTip: (0, _getLocale.getLocale)("OKR_MyO_Text_First")
|
|
@@ -115,7 +119,7 @@ var Filter = function Filter(_ref) {
|
|
|
115
119
|
var values = useLocalStorage.getItem("okr-filter-values") || {
|
|
116
120
|
okrType: "",
|
|
117
121
|
okrClassify: "",
|
|
118
|
-
orderType:
|
|
122
|
+
orderType: 0
|
|
119
123
|
};
|
|
120
124
|
return values;
|
|
121
125
|
}),
|
|
@@ -163,7 +167,7 @@ var Filter = function Filter(_ref) {
|
|
|
163
167
|
useLocalStorage.setItem("okr-filter-values", {
|
|
164
168
|
okrType: "",
|
|
165
169
|
okrClassify: "",
|
|
166
|
-
orderType:
|
|
170
|
+
orderType: 0
|
|
167
171
|
});
|
|
168
172
|
}
|
|
169
173
|
|
|
@@ -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 36px/36px 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;
|
|
@@ -125,7 +125,7 @@ function Creator(_ref) {
|
|
|
125
125
|
width = _ctx$measureText.width;
|
|
126
126
|
|
|
127
127
|
var actualWidth = Math.min(width, 184);
|
|
128
|
-
(0, _openDataPainter.setSize)(canvas, ctx, actualWidth,
|
|
128
|
+
(0, _openDataPainter.setSize)(canvas, ctx, actualWidth, 72); // 设置画布尺寸
|
|
129
129
|
|
|
130
130
|
setImgwidth(actualWidth);
|
|
131
131
|
ctx.textBaseline = "middle";
|
|
@@ -167,10 +167,9 @@ function Creator(_ref) {
|
|
|
167
167
|
src: darkTheme ? whiteImg : normalImg,
|
|
168
168
|
style: {
|
|
169
169
|
maxWidth: 92,
|
|
170
|
-
marginLeft: 4
|
|
171
|
-
transform: 'translateY(-20%)'
|
|
170
|
+
marginLeft: 4
|
|
172
171
|
},
|
|
173
|
-
width: Number(imgWidth) /
|
|
172
|
+
width: Number(imgWidth) / 3
|
|
174
173
|
}));
|
|
175
174
|
}
|
|
176
175
|
|
|
@@ -86,7 +86,9 @@ var viewConfig = function viewConfig() {
|
|
|
86
86
|
};
|
|
87
87
|
|
|
88
88
|
var isSelfTenant = function isSelfTenant() {
|
|
89
|
-
return ['352728', '564003', '511477'
|
|
89
|
+
return ['352728', '564003', '511477', // 正式环境
|
|
90
|
+
'500019', '500017', '500011' // 测试环境
|
|
91
|
+
].includes(String((0, _bsGlobal.getBSGlobal)('tenantInfo').Id));
|
|
90
92
|
};
|
|
91
93
|
|
|
92
94
|
function Header(props, ref) {
|
|
@@ -111,7 +111,10 @@ var NewOkrList = function NewOkrList(props) {
|
|
|
111
111
|
var formFieldValues = useLocalStorage.getItem("okr-filter-values") || {
|
|
112
112
|
targetType: "",
|
|
113
113
|
targetCategory: "",
|
|
114
|
-
targetSort: ""
|
|
114
|
+
targetSort: "",
|
|
115
|
+
okrType: "",
|
|
116
|
+
okrClassify: "",
|
|
117
|
+
orderType: 0
|
|
115
118
|
};
|
|
116
119
|
|
|
117
120
|
var filterCycle = function () {
|
|
@@ -41,10 +41,13 @@ function List(props) {
|
|
|
41
41
|
var _useContext = (0, _react.useContext)(_context.Context),
|
|
42
42
|
annualNum = _useContext.annualNum,
|
|
43
43
|
cycleType = _useContext.cycleType,
|
|
44
|
-
yqmNum = _useContext.yqmNum
|
|
44
|
+
yqmNum = _useContext.yqmNum,
|
|
45
|
+
orderType = _useContext.orderType;
|
|
45
46
|
|
|
46
47
|
return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(OkrListCmp, {
|
|
48
|
+
orderType: orderType,
|
|
47
49
|
okrData: okrs,
|
|
50
|
+
setData: setOkrs,
|
|
48
51
|
cycle: {
|
|
49
52
|
annualNum: annualNum,
|
|
50
53
|
cycleType: cycleType,
|
package/lib/utils/open-data.js
CHANGED
|
@@ -9,12 +9,12 @@ exports.parseTag = exports.parseStringV2 = exports.parseString = exports.parseOp
|
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
12
|
+
var Sentry = _interopRequireWildcard(require("@sentry/browser"));
|
|
13
|
+
|
|
12
14
|
var _bsGlobal = require("./bs-global");
|
|
13
15
|
|
|
14
16
|
var _openDataPainter = require("../components/open-data-painter");
|
|
15
17
|
|
|
16
|
-
var _helpers = require("./helpers");
|
|
17
|
-
|
|
18
18
|
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); }
|
|
19
19
|
|
|
20
20
|
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; }
|
|
@@ -77,60 +77,13 @@ function openData() {
|
|
|
77
77
|
var _getBSGlobal;
|
|
78
78
|
|
|
79
79
|
// 企业微信租户 && 非自建应用
|
|
80
|
-
if ((getSource() === WX_SOURCE || getUA().includes(WX_UA_STR)) && (
|
|
81
|
-
) {
|
|
82
|
-
// 企业微信初始化失败
|
|
83
|
-
// if (!window.WWOpenData && !window.top.WWOpenData) {
|
|
84
|
-
// return (p) => {
|
|
85
|
-
// if (p.name == undefined || p.id == undefined) {
|
|
86
|
-
// try {
|
|
87
|
-
// errorLog(1, JSON.stringify({
|
|
88
|
-
// errorType: 'WWOpenData is undefined',
|
|
89
|
-
// pName: p.name == undefined ? 'undefined' : p.name,
|
|
90
|
-
// pId: p.id == undefined ? 'undefined' : p.id,
|
|
91
|
-
// pType: p.type,
|
|
92
|
-
// }))
|
|
93
|
-
// } catch (e) {
|
|
94
|
-
// console.log(e)
|
|
95
|
-
// }
|
|
96
|
-
// }
|
|
97
|
-
// return p.name || p.id || null
|
|
98
|
-
// }
|
|
99
|
-
// }
|
|
80
|
+
if ((getSource() === WX_SOURCE || getUA().includes(WX_UA_STR)) && (_getBSGlobal = (0, _bsGlobal.getBSGlobal)('tenantInfo')) !== null && _getBSGlobal !== void 0 && _getBSGlobal.isTranslate) {
|
|
100
81
|
return function (p) {
|
|
101
82
|
var pId = p.id,
|
|
102
83
|
pName = p.name,
|
|
103
84
|
pCorpId = p.corpId,
|
|
104
85
|
pType = p.type;
|
|
105
86
|
var ref = (0, _react.useRef)(null);
|
|
106
|
-
(0, _react.useEffect)(function () {
|
|
107
|
-
var openId = pCorpId || getOpenId(pId, pType);
|
|
108
|
-
|
|
109
|
-
if (!openId) {
|
|
110
|
-
if (pId !== undefined && !ignorePIds.includes(pId)) {
|
|
111
|
-
try {
|
|
112
|
-
// BSGlobal
|
|
113
|
-
var openIds;
|
|
114
|
-
|
|
115
|
-
if (pType === 'userName') {
|
|
116
|
-
openIds = (0, _bsGlobal.getBSGlobal)('openIds');
|
|
117
|
-
} else if (pType === 'departmentName') {
|
|
118
|
-
openIds = (0, _bsGlobal.getBSGlobal)('openDepartmentIds');
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
(0, _helpers.errorLog)(1, JSON.stringify({
|
|
122
|
-
errorType: 'openId 不存在',
|
|
123
|
-
pName: pName === undefined ? 'undefined' : pName,
|
|
124
|
-
pId: pId === undefined ? 'undefined' : pId,
|
|
125
|
-
pType: pType,
|
|
126
|
-
openIds: openIds
|
|
127
|
-
}));
|
|
128
|
-
} catch (e) {
|
|
129
|
-
console.log(e);
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
}, [pId, pName]);
|
|
134
87
|
(0, _react.useLayoutEffect)(function () {
|
|
135
88
|
var _ref;
|
|
136
89
|
|
|
@@ -146,21 +99,19 @@ function openData() {
|
|
|
146
99
|
var openId = pCorpId || getOpenId(pId, pType);
|
|
147
100
|
|
|
148
101
|
if (!openId) {
|
|
149
|
-
if (pId !== undefined && !ignorePIds.includes(pId)) {
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
// )
|
|
163
|
-
// })
|
|
102
|
+
if (pId !== undefined && !ignorePIds.includes(pId)) {
|
|
103
|
+
Sentry.withScope(function (scope) {
|
|
104
|
+
scope.setTag('error-level', 'P1');
|
|
105
|
+
scope.setTag('error-type', 'openId不存在');
|
|
106
|
+
scope.setExtra('fail_type', pType);
|
|
107
|
+
scope.setExtra('p_id', pId);
|
|
108
|
+
scope.setExtra('p_name', pName);
|
|
109
|
+
scope.setExtra('corp_id', pCorpId);
|
|
110
|
+
scope.setExtra('open_id', getOpenId(pId, pType));
|
|
111
|
+
p.callFunc && scope.setExtra('fail_callFunc', p.callFunc);
|
|
112
|
+
p.extra && scope.setExtra('fail_extra', p.extra);
|
|
113
|
+
Sentry.captureException(new Error('企业微信openData调用失败'), scope);
|
|
114
|
+
});
|
|
164
115
|
}
|
|
165
116
|
|
|
166
117
|
return pName || pId || null;
|