feat: 导航列表添加返回当前编辑的项目

This commit is contained in:
zhangyh
2025-10-23 13:51:29 +08:00
parent 569ffd2bf3
commit fe20ed1ad3
6 changed files with 2234 additions and 2006 deletions

View File

@@ -4,13 +4,16 @@
<a-spin size="large" />
</div>
<div class="show">
<div v-show="openType === 'history'" class="function">
<design :key="componentKey" ref="design"></design>
</div>
<router-view v-if="
(openType && openType != 'history' && !routeQuery.id) ||
$route.path != '/home'"
@setTask="setTask"
>
</router-view>
<div v-else-if="routeQuery.id || openType == 'history'" class="function">
<div v-else-if="routeQuery.id" class="function">
<design :key="componentKey" ref="design"></design>
</div>
<div v-else class="function">
@@ -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提示

View File

@@ -200,6 +200,7 @@ export default {
jsContent1: "是否删除指定工作空间",
jsContent2: "请输入当前工作空间的名字",
jsContent3: "看到您换了风格。您是否愿意将目前使用的模特替换为系统推荐的模特?",
currentProject: "当前项目"
},
RobotAssist: {
inputContent1: "问我什么都行~",

View File

@@ -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~",

View File

@@ -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<DesignDetail,RootState> = {
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<DesignDetail, RootState> = {
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
export default Workspace

File diff suppressed because it is too large Load Diff

View File

@@ -286,7 +286,6 @@ export default defineComponent({
this.currentPage = 1
this.getHistoryList()
}
console.log('==========size:' + size + ' rem:' + rem + ' height:' + height)
},
getClass() {
let data = {