feat(image): add page
This commit is contained in:
@@ -14,6 +14,7 @@ export namespace Project {
|
||||
rate_speed?: number // 额定倍速
|
||||
create_user: string // 创建人
|
||||
owner: string // 项目负责人
|
||||
members: number[] // 项目成员
|
||||
label_process?: string[] // 工序
|
||||
admin_user: number[] // 标注管理员id
|
||||
data_source?: string // 数据源
|
||||
|
||||
@@ -1070,8 +1070,8 @@ const TopTools = (
|
||||
} else {
|
||||
// 无id返回时跳转回任务列表页
|
||||
const url = backUrl || "/"
|
||||
// router.push(url)
|
||||
window.location.href = url
|
||||
router.push(url)
|
||||
// window.location.href = url
|
||||
// 重置图片比例及选中标注对象
|
||||
usePaperStore.getState().resetRasterScale()
|
||||
useObjectStore.getState().resetPathAndOperationStatus()
|
||||
@@ -1660,8 +1660,8 @@ const TopTools = (
|
||||
onClick={() => {
|
||||
if (isView) {
|
||||
const url = backUrl || "/"
|
||||
// router.push(url)
|
||||
window.location.href = url
|
||||
router.push(url)
|
||||
// window.location.href = url
|
||||
// handleBackup("auto_backup");
|
||||
// 重置图片比例及选中标注对象
|
||||
usePaperStore.getState().resetRasterScale()
|
||||
@@ -2248,8 +2248,8 @@ const TopTools = (
|
||||
}
|
||||
setConfirmOpen(false)
|
||||
const url = backUrl || "/"
|
||||
// router.push(url)
|
||||
window.location.href = url
|
||||
router.push(url)
|
||||
// window.location.href = url
|
||||
// 重置图片比例及选中标注对象
|
||||
usePaperStore.getState().resetRasterScale()
|
||||
useObjectStore.getState().resetPathAndOperationStatus()
|
||||
@@ -2259,8 +2259,8 @@ const TopTools = (
|
||||
setConfirmOpen(false)
|
||||
handleBackup("auto_backup")
|
||||
const url = backUrl || "/"
|
||||
// router.push(url)
|
||||
window.location.href = url
|
||||
router.push(url)
|
||||
// window.location.href = url
|
||||
// 重置图片比例及选中标注对象
|
||||
usePaperStore.getState().resetRasterScale()
|
||||
useObjectStore.getState().resetPathAndOperationStatus()
|
||||
|
||||
@@ -12,6 +12,7 @@ type PermissionMap = {
|
||||
}
|
||||
|
||||
const mappingList: { [x: string]: [string, string] } = {
|
||||
"/setting/project/all": ["project", "config"],
|
||||
"/management/team/employee": ["user", "view"],
|
||||
"/management/team/organization": ["user", "group_view"],
|
||||
"/management/team/dailypaper": ["daily_work", "team_view"],
|
||||
|
||||
@@ -144,6 +144,7 @@ export default function AppLayout({
|
||||
process.env.NEXT_PUBLIC_OUTPUT_TYPE === "standalone" &&
|
||||
(await deleteCookie())
|
||||
router.push("/login")
|
||||
window.location.reload()
|
||||
}
|
||||
const matches = useMediaQuery("(min-width: 48em)")
|
||||
|
||||
|
||||
@@ -15,15 +15,10 @@ const currentComponentList: MenuItem[] = [
|
||||
icon: "SystemIcon",
|
||||
items: [
|
||||
{
|
||||
title: "个人项目",
|
||||
title: "我的项目",
|
||||
url: "own",
|
||||
icon: "PersonalMenuIcon",
|
||||
},
|
||||
{
|
||||
title: "项目设置",
|
||||
url: "setting",
|
||||
icon: "PersonalMenuIcon",
|
||||
},
|
||||
],
|
||||
},
|
||||
]
|
||||
|
||||
@@ -187,12 +187,12 @@ export default function LoginPage({ useUserStore }: { useUserStore: any }) {
|
||||
setError(null)
|
||||
|
||||
try {
|
||||
let isAdmin = values.username === "admin"
|
||||
let phone = values.username.startsWith("+86")
|
||||
? values.username
|
||||
: `+86${values.username}`
|
||||
// let isAdmin = values.username === "admin"
|
||||
// let phone = values.username.startsWith("+86")
|
||||
// ? values.username
|
||||
// : `+86${values.username}`
|
||||
const params = {
|
||||
account: isAdmin ? values.username : phone,
|
||||
account: values.username,
|
||||
password: values.password,
|
||||
tenant: TENANT,
|
||||
platform: PLATFORM,
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { ResultData } from "@/api/typing"
|
||||
import { Login } from "@/components/login/api/types"
|
||||
import redis from "@/components/login/libs/redis"
|
||||
import { encrypt, generateKeyFromEnv } from "@/components/login/libs/session"
|
||||
@@ -55,7 +54,7 @@ export const handleLoginData = async (props: {
|
||||
}
|
||||
|
||||
export const handleRefreshToken = async (props: {
|
||||
data: ResultData<Login.ResRefreshKey>
|
||||
data: Login.ResLabelLogin
|
||||
userData: any
|
||||
}) => {
|
||||
const { userData, data } = props
|
||||
@@ -64,21 +63,18 @@ export const handleRefreshToken = async (props: {
|
||||
JSON.parse(redisKey),
|
||||
JSON.stringify({
|
||||
...rest,
|
||||
access_token: data?.message?.access,
|
||||
refresh_token: data?.message?.refresh,
|
||||
user_name: data?.name,
|
||||
access_token: data.token,
|
||||
refresh_token: data.refresh_token,
|
||||
}),
|
||||
"EX",
|
||||
172800
|
||||
)
|
||||
return {
|
||||
...data,
|
||||
message: {
|
||||
...data.message,
|
||||
// access_token: "",
|
||||
// refresh_token: "",
|
||||
access: "",
|
||||
refresh: "",
|
||||
},
|
||||
token: "",
|
||||
access_token: "",
|
||||
refresh_token: "",
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
245
components/project/components/ProjectIcon.tsx
Normal file
245
components/project/components/ProjectIcon.tsx
Normal file
File diff suppressed because one or more lines are too long
1144
components/project/index.tsx
Normal file
1144
components/project/index.tsx
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user