@titaui/pc 1.9.86 → 1.9.90
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/.eslintrc.js +1 -1
- package/lib/components/change-okr-modal/Item.js +120 -90
- package/lib/components/menus/export-modules/demo-menus/index.js +125 -0
- package/lib/components/menus/export-modules/demo-menus/menu-highlight.js +74 -0
- package/lib/components/menus/export-modules/demo-menus/menus.js +147 -0
- package/lib/components/menus/index.js +15 -6
- package/lib/components/nav-top/constant.js +26 -2
- package/lib/components/nav-top/index.js +32 -30
- package/lib/components/nav-top/request.apis.js +5 -5
- package/lib/components/nav-top/utils.js +20 -3
- package/lib/components/okr-period-selector/select-cycle.js +7 -0
- package/lib/index.js +14 -6
- package/lib/pages/demo-free/index.js +27 -0
- package/lib/pages/new-okr-list/init-cycle-setting.js +4 -2
- package/lib/pages/new-okr-list/request-api.js +32 -57
- package/package.json +1 -1
- package/src/components/change-okr-modal/Item.tsx +84 -45
- package/src/components/menus/export-modules/demo-menus/index.tsx +80 -0
- package/src/components/menus/export-modules/demo-menus/menu-highlight.ts +53 -0
- package/src/components/menus/export-modules/demo-menus/menus.tsx +136 -0
- package/src/components/menus/index.tsx +9 -5
- package/src/components/nav-top/constant.ts +24 -0
- package/src/components/nav-top/index.tsx +10 -9
- package/src/components/nav-top/request.apis.ts +5 -5
- package/src/components/nav-top/utils.ts +15 -2
- package/src/components/okr-period-selector/select-cycle.tsx +5 -0
- package/src/index.d.ts +1 -0
- package/src/index.js +2 -1
- package/src/pages/demo-free/index.tsx +15 -0
- package/src/pages/new-okr-list/init-cycle-setting.tsx +10 -7
- package/src/pages/new-okr-list/request-api.ts +11 -11
package/src/index.d.ts
CHANGED
package/src/index.js
CHANGED
|
@@ -20,6 +20,7 @@ export { default as ChangeOkrModal } from "./components/change-okr-modal";
|
|
|
20
20
|
export { default as CreateOkrModal } from "./components/create-okr-modal";
|
|
21
21
|
export { default as RangePickerPop } from "./components/range-picker-pop";
|
|
22
22
|
export { default as DatePicker } from "./components/date-picker";
|
|
23
|
+
export { default as DemoFree } from "./pages/demo-free";
|
|
23
24
|
export { default as OkrMapPage } from "./pages/okr-map";
|
|
24
25
|
export { default as OkrFlow } from "./components/okr-flow";
|
|
25
26
|
export { default as DropSelector } from "./components/drop-selector";
|
|
@@ -87,4 +88,4 @@ export { default as requestApi } from "./utils/request";
|
|
|
87
88
|
export { default as PointDemo } from "./components/point-demo";
|
|
88
89
|
export { default as Scrollbar } from "./components/scrollbar";
|
|
89
90
|
export { default as WeeklyReport } from "./components/weekly-report";
|
|
90
|
-
export { default as
|
|
91
|
+
export { default as tasUploadPhotoModal } from "./components/upload-photo-modal";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React, { FC } from "react";
|
|
2
|
+
import ErrorBoundary from "../../components/error-boundary";
|
|
3
|
+
import ERROR_LEVEL from "../../utils/error-level";
|
|
4
|
+
|
|
5
|
+
const prefix = "dynamic-page";
|
|
6
|
+
|
|
7
|
+
const DemoFree: FC = () => (
|
|
8
|
+
<ErrorBoundary errorLevel={ERROR_LEVEL.P0}>
|
|
9
|
+
<div className={prefix}>
|
|
10
|
+
<div />
|
|
11
|
+
</div>
|
|
12
|
+
</ErrorBoundary>
|
|
13
|
+
);
|
|
14
|
+
|
|
15
|
+
export default DemoFree;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React, { useEffect, useState } from
|
|
2
|
-
import { getUserInfo } from
|
|
3
|
-
import { getCycleSetting } from
|
|
1
|
+
import React, { useEffect, useState } from 'react'
|
|
2
|
+
import { getUserInfo } from '../../utils/bs-global'
|
|
3
|
+
import { getCycleSetting } from './request-api'
|
|
4
4
|
|
|
5
5
|
function InitCycleSetting(props) {
|
|
6
6
|
const { SetCycleModal } = props;
|
|
@@ -8,10 +8,13 @@ function InitCycleSetting(props) {
|
|
|
8
8
|
|
|
9
9
|
useEffect(() => {
|
|
10
10
|
if (
|
|
11
|
-
localStorage.getItem(`cycle_setting_stop_show${getUserInfo().Id}`)
|
|
12
|
-
|
|
13
|
-
)
|
|
11
|
+
localStorage.getItem(`cycle_setting_stop_show${getUserInfo().Id}`) ==
|
|
12
|
+
'true'
|
|
13
|
+
)
|
|
14
|
+
return
|
|
15
|
+
localStorage.removeItem("OKR_CYCLE_SETTING");
|
|
14
16
|
getCycleSetting().then((res) => {
|
|
17
|
+
localStorage.setItem("OKR_CYCLE_SETTING", JSON.stringify(res?.Data || {}));
|
|
15
18
|
const { hasSetting } = res.Data;
|
|
16
19
|
if (!hasSetting) setVisible(true);
|
|
17
20
|
});
|
|
@@ -21,7 +24,7 @@ function InitCycleSetting(props) {
|
|
|
21
24
|
<SetCycleModal
|
|
22
25
|
visible={visible}
|
|
23
26
|
onCancel={() => setVisible(false)}
|
|
24
|
-
onRefresh={() => location.reload()}
|
|
27
|
+
onRefresh={() => window.location.reload()}
|
|
25
28
|
/>
|
|
26
29
|
);
|
|
27
30
|
}
|
|
@@ -42,9 +42,6 @@ export const okrCrowd = async (param: ListParam) => {
|
|
|
42
42
|
export const getOkrInfoWithListData = async function (okrId) {
|
|
43
43
|
return rget("v1")(`okr/list/specificOkr?okrId=${okrId}`);
|
|
44
44
|
};
|
|
45
|
-
export const getOkrSetting = async function () {
|
|
46
|
-
return rget("v1")("okr/cycleSetting").then((res) => res.Data);
|
|
47
|
-
};
|
|
48
45
|
|
|
49
46
|
export const okrList = async (param: ListParam) => {
|
|
50
47
|
const res = await rpost("v1")(`okr/list?toUserId=${param.toUserId}`, {
|
|
@@ -65,12 +62,15 @@ export const visitOkrCyclePag = async function (toUserId) {
|
|
|
65
62
|
};
|
|
66
63
|
|
|
67
64
|
export const getCycleSetting = async (): Promise<{
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
65
|
+
Code: number;
|
|
66
|
+
Data: {
|
|
67
|
+
hasSetting: boolean;
|
|
68
|
+
isOpenCustom: boolean;
|
|
69
|
+
isOpenMonth: boolean;
|
|
70
|
+
isOpenQuarter: boolean;
|
|
71
|
+
isOpenYear: boolean;
|
|
72
|
+
isOpenBimonthly: boolean;
|
|
73
|
+
isOpenHalfYear: boolean;
|
|
74
|
+
yearStartMonth: number;
|
|
75
|
+
}
|
|
76
76
|
}> => rget("v1")("okr/cycleSetting");
|