diff --git a/app/project/detail/OwnTaskTableContainer.tsx b/app/project/detail/OwnTaskTableContainer.tsx index 39d4269..e552b97 100644 --- a/app/project/detail/OwnTaskTableContainer.tsx +++ b/app/project/detail/OwnTaskTableContainer.tsx @@ -188,7 +188,7 @@ export default function OwnTaskTableContainer(props: { const backUrl = type ? `/project/detail?id=${projectId}&type=${type}` : `/project/detail?id=${projectId}` - setBackProps(backUrl, "own") + setBackProps(backUrl, "own", "/image") if (info && [4, 5, 6, 7].includes(info.label_type)) { router.push( diff --git a/app/project/detail/TaskTableContainer.tsx b/app/project/detail/TaskTableContainer.tsx index c70a1cf..bed3b6a 100644 --- a/app/project/detail/TaskTableContainer.tsx +++ b/app/project/detail/TaskTableContainer.tsx @@ -456,7 +456,7 @@ export default function TaskTableContainer(props: { const backUrl = type ? `/project/detail?id=${projectId}&type=${type}` : `/project/detail?id=${projectId}` - setBackProps(backUrl, "all") + setBackProps(backUrl, "all", "/image") if (info && [4, 5, 6, 7].includes(info.label_type)) { router.push( diff --git a/app/project/detail/page.tsx b/app/project/detail/page.tsx index c58b729..712bbf6 100644 --- a/app/project/detail/page.tsx +++ b/app/project/detail/page.tsx @@ -167,7 +167,7 @@ export default function CollectionDetailPage() { const backUrl = type ? `/project/detail?id=${projectId}&type=${type}` : `/project/detail?id=${projectId}` - setBackProps(backUrl, next) + setBackProps(backUrl, next, "/image") }} style={{ paddingLeft: 14, diff --git a/build.sh b/build.sh index 9621c45..06b9d0a 100755 --- a/build.sh +++ b/build.sh @@ -51,11 +51,11 @@ FLAG_PROD="${ENV}_latest" cd $SHELL_FOLDER -# 检查git状态 -echo -e "${GREEN}Checking git status...${NC}" -git fetch -git merge -if [[ $? != 0 ]]; then echo -e "${RED}git pull error${NC}"; exit 100; fi +# # 检查git状态 +# echo -e "${GREEN}Checking git status...${NC}" +# git fetch +# git merge +# if [[ $? != 0 ]]; then echo -e "${RED}git pull error${NC}"; exit 100; fi BRANCH_NAME=`git branch | grep "*"` echo -e "${GREEN}Current branch: ${BRANCH_NAME/* /}${NC}" diff --git a/components/label/components/TopTools.tsx b/components/label/components/TopTools.tsx index c3fd693..0526d72 100644 --- a/components/label/components/TopTools.tsx +++ b/components/label/components/TopTools.tsx @@ -156,7 +156,7 @@ const TopTools = ( isLabelTask, renderPolygons, } = props - const { backUrl } = useBackUrlStore() + const { backUrl, basePath } = useBackUrlStore() const { mode, loadingData } = usePaperStore() const router = useRouter() const user_id = usePermissionStore.getState().user_id @@ -1091,9 +1091,9 @@ const TopTools = ( useObjectStore.getState().resetPathAndOperationStatus() } else { // 无id返回时跳转回任务列表页 - const url = backUrl || "/" - router.push(url) - // window.location.href = url + const url = backUrl ? basePath + backUrl : "/" + // router.push(url) + window.location.href = url // 重置图片比例及选中标注对象 usePaperStore.getState().resetRasterScale() useObjectStore.getState().resetPathAndOperationStatus() @@ -1757,9 +1757,9 @@ const TopTools = ( c="dark" onClick={() => { if (isView) { - const url = backUrl || "/" - router.push(url) - // window.location.href = url + const url = backUrl ? basePath + backUrl : "/" + // router.push(url) + window.location.href = url // handleBackup("auto_backup"); // 重置图片比例及选中标注对象 usePaperStore.getState().resetRasterScale() @@ -2450,9 +2450,9 @@ const TopTools = ( return } setConfirmOpen(false) - const url = backUrl || "/" - router.push(url) - // window.location.href = url + const url = backUrl ? basePath + backUrl : "/" + // router.push(url) + window.location.href = url // 重置图片比例及选中标注对象 usePaperStore.getState().resetRasterScale() useObjectStore.getState().resetPathAndOperationStatus() @@ -2461,9 +2461,9 @@ const TopTools = ( try { setConfirmOpen(false) handleBackup("auto_backup") - const url = backUrl || "/" - router.push(url) - // window.location.href = url + const url = backUrl ? basePath + backUrl : "/" + // router.push(url) + window.location.href = url // 重置图片比例及选中标注对象 usePaperStore.getState().resetRasterScale() useObjectStore.getState().resetPathAndOperationStatus() diff --git a/components/label/store/auth.ts b/components/label/store/auth.ts index 55e668d..5ef8fc5 100644 --- a/components/label/store/auth.ts +++ b/components/label/store/auth.ts @@ -1,8 +1,8 @@ -import { ALL_CODE } from "../utils/constants" +import dayjs from "dayjs" import { create } from "zustand" import { persist } from "zustand/middleware" import { storage } from "../store" -import dayjs from "dayjs" +import { ALL_CODE } from "../utils/constants" const initUserInfo = { user_id: null, @@ -263,8 +263,13 @@ export const useBackUrlStore = create( (set) => ({ backUrl: null, backTitle: null, - setBackProps: (url: string, title?: string) => - set({ backUrl: url, backTitle: title || null }), + basePath: "", + setBackProps: (url: string, title?: string, basePath?: string) => + set({ + backUrl: url, + backTitle: title || null, + basePath: basePath || "", + }), }), { name: "back_url", diff --git a/components/layout/common.ts b/components/layout/common.ts index cad1a1e..d6f3276 100644 --- a/components/layout/common.ts +++ b/components/layout/common.ts @@ -35,11 +35,11 @@ export const componentList: MenuItem[] = [ url: "video", icon: "SystemIcon", }, - { - title: "点云标注", - url: "lidar", - icon: "SystemIcon", - }, + // { + // title: "点云标注", + // url: "lidar", + // icon: "SystemIcon", + // }, { title: "管理中心", url: "mgt",