From fe20ed1ad3e2552a511a19b364d0460d025a7f2b Mon Sep 17 00:00:00 2001 From: zhangyh Date: Thu, 23 Oct 2025 13:51:29 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=AF=BC=E8=88=AA=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=BF=94=E5=9B=9E=E5=BD=93=E5=89=8D=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E7=9A=84=E9=A1=B9=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/component/home/index.vue | 11 +- src/lang/cn.ts | 1 + src/lang/en.ts | 1 + src/store/workspace/workspace.ts | 211 +- src/views/HomeMain.vue | 4015 ++++++++++++++++-------------- src/views/HomeView/history.vue | 1 - 6 files changed, 2234 insertions(+), 2006 deletions(-) diff --git a/src/component/home/index.vue b/src/component/home/index.vue index 7fd9ee08..e4d90a0d 100644 --- a/src/component/home/index.vue +++ b/src/component/home/index.vue @@ -4,13 +4,16 @@
+
+ +
-
+
@@ -82,11 +85,11 @@ export default defineComponent({ data.dataLoad = false return } - // if((query.history || query.id) != (oldQuery.history || oldQuery.id)){ - // } - if(query.history && query.history != query.history){ + if(data.openType == 'history'){ + store.commit('setProjectPath',route.fullPath) } + nextTick(()=>{ if(query.history || query.id){ //切换新项目需要清除首次design提示 diff --git a/src/lang/cn.ts b/src/lang/cn.ts index ef2f547b..7258c13a 100644 --- a/src/lang/cn.ts +++ b/src/lang/cn.ts @@ -200,6 +200,7 @@ export default { jsContent1: "是否删除指定工作空间", jsContent2: "请输入当前工作空间的名字", jsContent3: "看到您换了风格。您是否愿意将目前使用的模特替换为系统推荐的模特?", + currentProject: "当前项目" }, RobotAssist: { inputContent1: "问我什么都行~", diff --git a/src/lang/en.ts b/src/lang/en.ts index 014d6fa2..245c0747 100644 --- a/src/lang/en.ts +++ b/src/lang/en.ts @@ -200,6 +200,7 @@ export default { jsContent1: "Whether to delete the workspace?", jsContent2: "Please enter a workbench name", jsContent3: "It looks like you've changed the style. Would you like to replace the currently used mannequin with the system-recommended model for this style?", + currentProject: "Current Project" }, RobotAssist: { inputContent1: "write a message~", diff --git a/src/store/workspace/workspace.ts b/src/store/workspace/workspace.ts index e0212554..83d9cf36 100644 --- a/src/store/workspace/workspace.ts +++ b/src/store/workspace/workspace.ts @@ -1,111 +1,114 @@ -import {Module} from 'vuex' -import {RootState} from '../index' +import { Module } from 'vuex' +import { RootState } from '../index' -interface DesignDetail{ - workspace:any, - workspaceSex:any, - workspacePosition:any, - workspaceAllPosition:any,//所有位置 - probjects:any,//项目参数 - projectList:any,//项目列表参数 +interface DesignDetail { + workspace: any + workspaceSex: any + workspacePosition: any + workspaceAllPosition: any //所有位置 + probjects: any //项目参数 + projectList: any //项目列表参数 + projectPath: string //项目路径 } -const Workspace : Module = { - state:{ - workspace:{}, - workspaceSex:{}, - workspacePosition:{}, - workspaceAllPosition:{}, - openChat:false, - probjects:{ - name:'',//项目名称 - id:'',//项目id - type:'',//项目类型 - httpType:'',//项目类型 - styleName:'',//项目风格 - style:'', - styleId:null,//项目风格 - sex:'Female',//项目性别 - ageGroup:'Adult',//年龄组 - positionList:[],//衣服位置 - position:{},//衣服位置 - brandPercentage:30,//品牌分成 - userBrandDna:'',//用户品牌 - userBrandDnaImg:'',//用户品牌图片 - userBrandDnaName:'',//用户品牌名字 - workspaceId:-1,//worspaceId - publishData:{ - id:'', - portfolioDes:'', - portfolioName:'', - tagsDTO:[], - },//发布的作品数据 - systemDesignerPercentage:30,//设计师分成 - model:[],//模特 - }, - projectList:[],//项目列表参数 +const Workspace: Module = { + state: { + workspace: {}, + workspaceSex: {}, + workspacePosition: {}, + workspaceAllPosition: {}, + openChat: false, + probjects: { + name: '', //项目名称 + id: '', //项目id + type: '', //项目类型 + httpType: '', //项目类型 + styleName: '', //项目风格 + style: '', + styleId: null, //项目风格 + sex: 'Female', //项目性别 + ageGroup: 'Adult', //年龄组 + positionList: [], //衣服位置 + position: {}, //衣服位置 + brandPercentage: 30, //品牌分成 + userBrandDna: '', //用户品牌 + userBrandDnaImg: '', //用户品牌图片 + userBrandDnaName: '', //用户品牌名字 + workspaceId: -1, //worspaceId + publishData: { + id: '', + portfolioDes: '', + portfolioName: '', + tagsDTO: [] + }, //发布的作品数据 + systemDesignerPercentage: 30, //设计师分成 + model: [] //模特 }, - mutations:{ - setWorkspace(state,files){ - state.workspace = files - //写一个下载视频的代码 - // const a = document.createElement('a') - // a.href = files - // a.download = 'video.mp4' - // a.click() - }, - setOpenChatStatus(state,boolean){ - state.openChat = boolean - }, - setWorkspaceSex(state,files){ - state.workspaceSex = files - }, - setWorkspacePosition(state,files){ - state.workspacePosition = files - }, - setWorkspaceAllPosition(state,files){ - state.workspaceAllPosition = files - }, - setProjectList(state,list){ - state.projectList = list - }, - setProbject(state,data){ - for (const key in data) { - if(data[key] == undefined)continue - state.probjects[key] = data[key] - } - }, - createProbject(state){ - state.probjects = { - name:'', - id:'', - type:'', - httpType:'', - styleName:'',//项目风格 - styleId:null,//项目风格 - style:'', - sex:'Female', - ageGroup:'Adult',//年龄组 - positionList:[], - position:{},//衣服位置 - userBrandDna:'',//用户品牌 - userBrandDnaImg:'',//用户品牌图片 - userBrandDnaName:'',//用户品牌名字 - workspaceId:-1,//worspaceId - publishData:{ - id:'', - portfolioDes:'', - portfolioName:'', - tagsDTO:[], - },//发布的作品数据 - systemDesignerPercentage:30, - model:[],//模特 - } + projectList: [], //项目列表参数 + projectPath:'' + }, + mutations: { + setWorkspace(state, files) { + state.workspace = files + //写一个下载视频的代码 + // const a = document.createElement('a') + // a.href = files + // a.download = 'video.mp4' + // a.click() + }, + setOpenChatStatus(state, boolean) { + state.openChat = boolean + }, + setWorkspaceSex(state, files) { + state.workspaceSex = files + }, + setWorkspacePosition(state, files) { + state.workspacePosition = files + }, + setWorkspaceAllPosition(state, files) { + state.workspaceAllPosition = files + }, + setProjectList(state, list) { + state.projectList = list + }, + setProbject(state, data) { + for (const key in data) { + if (data[key] == undefined) continue + state.probjects[key] = data[key] + } + }, + createProbject(state) { + state.probjects = { + name: '', + id: '', + type: '', + httpType: '', + styleName: '', //项目风格 + styleId: null, //项目风格 + style: '', + sex: 'Female', + ageGroup: 'Adult', //年龄组 + positionList: [], + position: {}, //衣服位置 + userBrandDna: '', //用户品牌 + userBrandDnaImg: '', //用户品牌图片 + userBrandDnaName: '', //用户品牌名字 + workspaceId: -1, //worspaceId + publishData: { + id: '', + portfolioDes: '', + portfolioName: '', + tagsDTO: [] + }, //发布的作品数据 + systemDesignerPercentage: 30, + model: [] //模特 + } + }, + setProjectPath(state, path) { + state.projectPath = path } - }, - actions:{ - - } + }, + actions: {} } -export default Workspace \ No newline at end of file +export default Workspace diff --git a/src/views/HomeMain.vue b/src/views/HomeMain.vue index ccf9bda1..7758eea1 100644 --- a/src/views/HomeMain.vue +++ b/src/views/HomeMain.vue @@ -1,50 +1,106 @@ - diff --git a/src/views/HomeView/history.vue b/src/views/HomeView/history.vue index a6973ace..44030ddc 100644 --- a/src/views/HomeView/history.vue +++ b/src/views/HomeView/history.vue @@ -286,7 +286,6 @@ export default defineComponent({ this.currentPage = 1 this.getHistoryList() } - console.log('==========size:' + size + ' rem:' + rem + ' height:' + height) }, getClass() { let data = {