@titaui/pc 1.9.92 → 1.9.96
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.
|
@@ -21,10 +21,8 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try
|
|
|
21
21
|
|
|
22
22
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
var
|
|
26
|
-
|
|
27
|
-
var userId = BSGlobal && BSGlobal.loginUserInfo.Id || 0;
|
|
24
|
+
var tenantId = window.BSGlobal && window.BSGlobal.tenantInfo.Id || 0;
|
|
25
|
+
var userId = window.BSGlobal && window.BSGlobal.loginUserInfo.Id || 0;
|
|
28
26
|
|
|
29
27
|
var requestDomain = function requestDomain() {
|
|
30
28
|
if (!window.location.hostname.match(/dev/)) return "";
|
|
@@ -86,7 +84,9 @@ var getKrAnalysisInfos = /*#__PURE__*/function () {
|
|
|
86
84
|
switch (_context2.prev = _context2.next) {
|
|
87
85
|
case 0:
|
|
88
86
|
url = "".concat(requestDomain(), "/api/v1/").concat(tenantId, "/").concat(userId, "/okr/create/analys");
|
|
89
|
-
return _context2.abrupt("return", _axios["default"].post(url, params))
|
|
87
|
+
return _context2.abrupt("return", _axios["default"].post(url, params).then(function (res) {
|
|
88
|
+
return res.data.Data;
|
|
89
|
+
}));
|
|
90
90
|
|
|
91
91
|
case 2:
|
|
92
92
|
case "end":
|
|
@@ -170,6 +170,8 @@ var getOAnalysisInfos = /*#__PURE__*/function () {
|
|
|
170
170
|
if (resp.status === 200 && resp.data.Code === 1) {
|
|
171
171
|
return resp.data.Data;
|
|
172
172
|
}
|
|
173
|
+
|
|
174
|
+
return {};
|
|
173
175
|
}));
|
|
174
176
|
|
|
175
177
|
case 2:
|
package/package.json
CHANGED
|
@@ -6,10 +6,8 @@ import {
|
|
|
6
6
|
UpdateOkrVisibilityParams,
|
|
7
7
|
} from "./interface";
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
const
|
|
11
|
-
// @ts-ignore
|
|
12
|
-
const userId = (BSGlobal && BSGlobal.loginUserInfo.Id) || 0;
|
|
9
|
+
const tenantId = (window.BSGlobal && window.BSGlobal.tenantInfo.Id) || 0;
|
|
10
|
+
const userId = (window.BSGlobal && window.BSGlobal.loginUserInfo.Id) || 0;
|
|
13
11
|
|
|
14
12
|
const requestDomain = () => {
|
|
15
13
|
if (!window.location.hostname.match(/dev/)) return "";
|
|
@@ -23,7 +21,7 @@ export const getImageBase64ByUrl = (toUserId) => axios
|
|
|
23
21
|
)
|
|
24
22
|
.then((getBase64Str) => getBase64Str.data);
|
|
25
23
|
|
|
26
|
-
export const createWidthKr = async
|
|
24
|
+
export const createWidthKr = async (data: any) => {
|
|
27
25
|
const url = `${requestDomain()}/api/v2/${tenantId}/${userId}/work/createWithKr`;
|
|
28
26
|
const res = await axios.post(
|
|
29
27
|
url,
|
|
@@ -39,19 +37,19 @@ export const createWidthKr = async function (data: any) {
|
|
|
39
37
|
return res.data.Data;
|
|
40
38
|
};
|
|
41
39
|
|
|
42
|
-
export const getKrAnalysisInfos = async
|
|
40
|
+
export const getKrAnalysisInfos = async (params) => {
|
|
43
41
|
const url = `${requestDomain()}/api/v1/${tenantId}/${userId}/okr/create/analys`;
|
|
44
|
-
return axios.post(url, params);
|
|
42
|
+
return axios.post(url, params).then((res) => res.data.Data);
|
|
45
43
|
};
|
|
46
44
|
|
|
47
|
-
export const updateOkrVisibility = async
|
|
45
|
+
export const updateOkrVisibility = async (
|
|
48
46
|
params: UpdateOkrVisibilityParams,
|
|
49
|
-
) {
|
|
47
|
+
) => {
|
|
50
48
|
const url = `${requestDomain()}/api/v2/${tenantId}/${userId}/work/visiblity`;
|
|
51
49
|
return axios.post(url, params);
|
|
52
50
|
};
|
|
53
51
|
|
|
54
|
-
export const updateOCommitType = async
|
|
52
|
+
export const updateOCommitType = async (params: UpdateOkrTypeParams) => {
|
|
55
53
|
const url = `${requestDomain()}/api/v1/${tenantId}/${userId}/okr/update/okrType?okrId=${
|
|
56
54
|
params.okrId
|
|
57
55
|
}`;
|
|
@@ -61,16 +59,17 @@ export const updateOCommitType = async function (params: UpdateOkrTypeParams) {
|
|
|
61
59
|
});
|
|
62
60
|
};
|
|
63
61
|
|
|
64
|
-
export const getOAnalysisInfos = async
|
|
62
|
+
export const getOAnalysisInfos = async (params) => {
|
|
65
63
|
const url = `${requestDomain()}/api/v1/${tenantId}/${userId}/okr/create/analys`;
|
|
66
64
|
return axios.post(url, params).then((resp) => {
|
|
67
65
|
if (resp.status === 200 && resp.data.Code === 1) {
|
|
68
66
|
return resp.data.Data;
|
|
69
67
|
}
|
|
68
|
+
return {};
|
|
70
69
|
});
|
|
71
70
|
};
|
|
72
71
|
|
|
73
|
-
export const getCycleSetting = async
|
|
72
|
+
export const getCycleSetting = async (): Promise<GetCycleSettingParams> => {
|
|
74
73
|
const url = `${requestDomain()}/api/v1/${tenantId}/${userId}/okr/cycleSetting`;
|
|
75
74
|
const res = await axios.get(url);
|
|
76
75
|
return res.data.Data;
|