Merge branch 'dev_vite' of http://18.167.251.121:10003/aidlab/aida_front into dev_vite
This commit is contained in:
1
src/assets/icons/CSearch.svg
Normal file
1
src/assets/icons/CSearch.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg t="1761795702180" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5928" width="200" height="200"><path d="M433.505 126.568c174.435 0 316.207 141.805 316.207 316.486 0 75.209-26.384 144.234-69.824 198.526l209.166 209.1c12.849 13.148 12.849 34.459 0 47.582-13.177 13.148-34.692 13.148-47.904 0l-209.166-209.1c-54.203 43.843-123.131 70.111-198.373 70.111-174.987 0-316.682-141.627-316.682-316.434 0-174.724 141.826-316.486 316.682-316.486zM433.505 710.778c147.649 0 267.808-120.113 267.808-267.647 0-147.741-120.204-267.712-267.808-267.712-147.649 0-267.808 120.099-267.808 267.712 0 147.649 120.204 267.647 267.808 267.647z" fill="currentColor" p-id="5929"></path></svg>
|
||||||
|
After Width: | Height: | Size: 717 B |
@@ -248,15 +248,13 @@ export default defineComponent({
|
|||||||
const setRevocation = ()=>{//设置撤销
|
const setRevocation = ()=>{//设置撤销
|
||||||
let itemDetail = JSON.parse(JSON.stringify(detailData.designDetail))
|
let itemDetail = JSON.parse(JSON.stringify(detailData.designDetail))
|
||||||
let revocation:any = JSON.parse((sessionStorage.getItem("revocation") as any))
|
let revocation:any = JSON.parse((sessionStorage.getItem("revocation") as any))
|
||||||
|
if(!revocation)revocation = []
|
||||||
// let oppositeRevocation = JSON.parse((sessionStorage.getItem("oppositeRevocation") as any))
|
// let oppositeRevocation = JSON.parse((sessionStorage.getItem("oppositeRevocation") as any))
|
||||||
if(revocation?.[0]?.designItemId != itemDetail.designItemId || revocation?.[0]?.designItemId == undefined){
|
// if(revocation?.[0]?.designItemId != itemDetail.designItemId || revocation?.[0]?.designItemId == undefined){
|
||||||
// sessionStorage.setItem('revocation', JSON.stringify([]));
|
// revocation = []
|
||||||
// sessionStorage.setItem('oppositeRevocation',JSON.stringify([]));
|
// }
|
||||||
revocation = []
|
|
||||||
}
|
|
||||||
revocation.push({designData:itemDetail,position:null})
|
revocation.push({designData:itemDetail,position:null})
|
||||||
detailData.revocationShow = revocation?.length
|
detailData.revocationShow = revocation?.length
|
||||||
detailData.oppositeRevocationShow = 0
|
|
||||||
sessionStorage.setItem('revocation', JSON.stringify(revocation));
|
sessionStorage.setItem('revocation', JSON.stringify(revocation));
|
||||||
sessionStorage.setItem('oppositeRevocation',JSON.stringify([]));
|
sessionStorage.setItem('oppositeRevocation',JSON.stringify([]));
|
||||||
}
|
}
|
||||||
@@ -265,13 +263,16 @@ export default defineComponent({
|
|||||||
const revocation = ()=>{//撤回
|
const revocation = ()=>{//撤回
|
||||||
let oppositeRevocation = JSON.parse((sessionStorage.getItem("oppositeRevocation") as any))
|
let oppositeRevocation = JSON.parse((sessionStorage.getItem("oppositeRevocation") as any))
|
||||||
let revocation = JSON.parse((sessionStorage.getItem("revocation") as any))
|
let revocation = JSON.parse((sessionStorage.getItem("revocation") as any))
|
||||||
if(detailData.revocationShow <= 1)return
|
if(revocation.length <= 1)return
|
||||||
oppositeRevocation.push(revocation[revocation.length-1])
|
oppositeRevocation.push(revocation[revocation.length-1])
|
||||||
detailData.oppositeRevocationShow = oppositeRevocation.length
|
|
||||||
revocation.splice(revocation.length-1,1)
|
revocation.splice(revocation.length-1,1)
|
||||||
detailData.revocationShow = revocation.length
|
detailData.revocationShow = revocation.length
|
||||||
// store.commit("DesignDetail/setDesignDetail", revocation[revocation.length-1]);
|
// store.commit("DesignDetail/setDesignDetail", revocation[revocation.length-1]);
|
||||||
store.commit('DesignDetail/setDesignDetail',revocation[revocation.length-1])
|
if(revocation[revocation.length-1].designData){
|
||||||
|
store.commit('DesignDetail/setDesignDetail',revocation[revocation.length-1].designData)
|
||||||
|
}else{
|
||||||
|
store.commit('DesignDetail/setFrontBack',revocation[revocation.length-1].position)
|
||||||
|
}
|
||||||
store.commit('DesignDetail/setDesignColthes',detailData.selectDetail.id)
|
store.commit('DesignDetail/setDesignColthes',detailData.selectDetail.id)
|
||||||
sessionStorage.setItem('oppositeRevocation', JSON.stringify(oppositeRevocation));
|
sessionStorage.setItem('oppositeRevocation', JSON.stringify(oppositeRevocation));
|
||||||
sessionStorage.setItem('revocation', JSON.stringify(revocation));
|
sessionStorage.setItem('revocation', JSON.stringify(revocation));
|
||||||
@@ -281,8 +282,13 @@ export default defineComponent({
|
|||||||
const oppositeRevocation = ()=>{//反撤回
|
const oppositeRevocation = ()=>{//反撤回
|
||||||
let oppositeRevocation = JSON.parse((sessionStorage.getItem("oppositeRevocation") as any))
|
let oppositeRevocation = JSON.parse((sessionStorage.getItem("oppositeRevocation") as any))
|
||||||
let revocation = JSON.parse((sessionStorage.getItem("revocation") as any))
|
let revocation = JSON.parse((sessionStorage.getItem("revocation") as any))
|
||||||
if(!oppositeRevocation[oppositeRevocation.length-1])return
|
// if(!oppositeRevocation[oppositeRevocation.length-1].designData)return
|
||||||
store.commit("DesignDetail/setDesignDetail", oppositeRevocation[oppositeRevocation.length-1]);
|
if(oppositeRevocation.length < 1)return
|
||||||
|
if(oppositeRevocation[oppositeRevocation.length-1]?.designData){
|
||||||
|
store.commit('DesignDetail/setDesignDetail',oppositeRevocation[oppositeRevocation.length-1].designData)
|
||||||
|
}else if(oppositeRevocation[oppositeRevocation.length-1]?.position){
|
||||||
|
store.commit('DesignDetail/setFrontBack',oppositeRevocation[oppositeRevocation.length-1].position)
|
||||||
|
}
|
||||||
store.commit('DesignDetail/setDesignColthes',detailData.selectDetail.id)
|
store.commit('DesignDetail/setDesignColthes',detailData.selectDetail.id)
|
||||||
revocation.push(oppositeRevocation[oppositeRevocation.length-1])
|
revocation.push(oppositeRevocation[oppositeRevocation.length-1])
|
||||||
detailData.revocationShow = revocation.length
|
detailData.revocationShow = revocation.length
|
||||||
@@ -363,7 +369,6 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
const getSubmitData = async (str:string)=>{
|
const getSubmitData = async (str:string)=>{
|
||||||
// return
|
// return
|
||||||
console.log(detailData.selectDetail)
|
|
||||||
let workspace = store.state.Workspace.probjects
|
let workspace = store.state.Workspace.probjects
|
||||||
if(!detailData?.selectDetail?.path && !detailData?.selectDetail?.newDetail?.sketch?.minIOPath)return
|
if(!detailData?.selectDetail?.path && !detailData?.selectDetail?.newDetail?.sketch?.minIOPath)return
|
||||||
let clothes:any
|
let clothes:any
|
||||||
|
|||||||
@@ -198,16 +198,21 @@ export default defineComponent({
|
|||||||
document.removeEventListener('mouseup',sizeMouseup)
|
document.removeEventListener('mouseup',sizeMouseup)
|
||||||
document.removeEventListener('touchend',sizeMouseup)
|
document.removeEventListener('touchend',sizeMouseup)
|
||||||
//鼠标抬起
|
//鼠标抬起
|
||||||
console.log(11)
|
setRevocation()
|
||||||
}
|
}
|
||||||
|
let isMove = false//表示是否移动,是否需要在鼠标抬起的时候保存数据
|
||||||
const setRevocation = ()=>{
|
const setRevocation = ()=>{
|
||||||
|
if(!isMove)return
|
||||||
|
isMove = false
|
||||||
let frontBack = JSON.parse(JSON.stringify(detailData.frontBack))
|
let frontBack = JSON.parse(JSON.stringify(detailData.frontBack))
|
||||||
|
console.log(frontBack)
|
||||||
let revocation:any = JSON.parse((sessionStorage.getItem("revocation") as any))
|
let revocation:any = JSON.parse((sessionStorage.getItem("revocation") as any))
|
||||||
revocation.push({designData:null,position:frontBack})
|
revocation.push({designData:null,position:frontBack})
|
||||||
sessionStorage.setItem('revocation', JSON.stringify(revocation));
|
sessionStorage.setItem('revocation', JSON.stringify(revocation));
|
||||||
|
|
||||||
}
|
}
|
||||||
const sizeMouseMoveOperation = (e:any)=> {
|
const sizeMouseMoveOperation = (e:any)=> {
|
||||||
|
isMove = true
|
||||||
let imgDomWH = selectItem.imgDom.getBoundingClientRect()
|
let imgDomWH = selectItem.imgDom.getBoundingClientRect()
|
||||||
let parentNode =selectItem.imgDom.parentNode
|
let parentNode =selectItem.imgDom.parentNode
|
||||||
let width = imgDomWH.width
|
let width = imgDomWH.width
|
||||||
@@ -262,9 +267,10 @@ export default defineComponent({
|
|||||||
document.removeEventListener('mouseup',mouseup)
|
document.removeEventListener('mouseup',mouseup)
|
||||||
document.removeEventListener('touchend',mouseup)
|
document.removeEventListener('touchend',mouseup)
|
||||||
///鼠标抬起
|
///鼠标抬起
|
||||||
console.log(11)
|
setRevocation()
|
||||||
}
|
}
|
||||||
const mouseMoveOperation = (e:any)=>{
|
const mouseMoveOperation = (e:any)=>{
|
||||||
|
isMove = true
|
||||||
let imgDomWH = selectItem.imgDom.getBoundingClientRect()
|
let imgDomWH = selectItem.imgDom.getBoundingClientRect()
|
||||||
let parentNode = document.getElementsByClassName('molepositon')[0].getElementsByClassName("designOpenrtion_imgMask")[0].getBoundingClientRect()
|
let parentNode = document.getElementsByClassName('molepositon')[0].getElementsByClassName("designOpenrtion_imgMask")[0].getBoundingClientRect()
|
||||||
let x = (e.clientX - detailData.frontBack.front[selectItem.imgDomIndex].centers.left)+'px'
|
let x = (e.clientX - detailData.frontBack.front[selectItem.imgDomIndex].centers.left)+'px'
|
||||||
|
|||||||
@@ -19,7 +19,8 @@
|
|||||||
@keydown.enter="handleSearch"
|
@keydown.enter="handleSearch"
|
||||||
:placeholder="placeholder"
|
:placeholder="placeholder"
|
||||||
/>
|
/>
|
||||||
<SearchOutlined class="search_input_icon" @click="handleSearch" />
|
<!-- <SearchOutlined class="search_input_icon" @click="handleSearch" /> -->
|
||||||
|
<SvgIcon name="CSearch" size="20" class="search_input_icon" @click="handleSearch" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -109,17 +110,21 @@ const handleSearch = () => {
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
padding-left: 3rem;
|
padding-left: 3rem;
|
||||||
border-radius: 4rem;
|
border-radius: 4rem;
|
||||||
|
// line-height: 4rem;
|
||||||
width: calc(100% - 2rem);
|
width: calc(100% - 2rem);
|
||||||
// placeholder的fontsize设置为1.4rem
|
// placeholder的fontsize设置为1.4rem
|
||||||
&::placeholder {
|
&::placeholder {
|
||||||
font-size: 1.4rem;
|
font-size: 1.6rem;
|
||||||
}
|
}
|
||||||
&::-webkit-input-placeholder{
|
&::-webkit-input-placeholder{
|
||||||
font-size: 1.4rem;
|
font-size: 1.6rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.search_input_icon {
|
.search_input_icon {
|
||||||
font-size: 2rem;
|
font-size: 2rem;
|
||||||
|
color: #000;
|
||||||
|
width: initial;
|
||||||
|
height: initial;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -423,6 +423,7 @@ setup(props:any,{emit}) {
|
|||||||
rv.forEach((item:any)=>{
|
rv.forEach((item:any)=>{
|
||||||
arr.push(item.taskId)
|
arr.push(item.taskId)
|
||||||
})
|
})
|
||||||
|
console.log(productimg.selectGenerate)
|
||||||
productimg.generateCourse = {
|
productimg.generateCourse = {
|
||||||
...rv[0],
|
...rv[0],
|
||||||
prompt:productimg.productimgSearchName,
|
prompt:productimg.productimgSearchName,
|
||||||
@@ -430,7 +431,6 @@ setup(props:any,{emit}) {
|
|||||||
// modelName:speed.speedData.value,
|
// modelName:speed.speedData.value,
|
||||||
modelName:data.modelName,
|
modelName:data.modelName,
|
||||||
poseId:productimg.selectPose,
|
poseId:productimg.selectPose,
|
||||||
userLikeSortId:productimg.selectGenerate.userLikeSortId || productimg.selectGenerate?.parentId,
|
|
||||||
sourceUrl:productimg.selectGenerate?.sourceUrl || productimg.selectGenerate?.productImage,
|
sourceUrl:productimg.selectGenerate?.sourceUrl || productimg.selectGenerate?.productImage,
|
||||||
status:null,
|
status:null,
|
||||||
oldId:productimg.openType == 'add'?null:productimg.selectGenerate.id,
|
oldId:productimg.openType == 'add'?null:productimg.selectGenerate.id,
|
||||||
@@ -590,6 +590,7 @@ setup(props:any,{emit}) {
|
|||||||
productimg.productimgRelightDirection = ''
|
productimg.productimgRelightDirection = ''
|
||||||
}
|
}
|
||||||
let init = async (list:any,index:any,dialogueIndex:any,status:any,listType:string)=>{
|
let init = async (list:any,index:any,dialogueIndex:any,status:any,listType:string)=>{
|
||||||
|
console.log(list[index])
|
||||||
productimg.scaleImageList = list
|
productimg.scaleImageList = list
|
||||||
productimg.scaleImageIndex = index
|
productimg.scaleImageIndex = index
|
||||||
scaleImage.value = true
|
scaleImage.value = true
|
||||||
|
|||||||
@@ -629,6 +629,7 @@ export default defineComponent({
|
|||||||
collItemSize.collValue = Math.floor(parentWidth / collItemSize.widthValue.value)
|
collItemSize.collValue = Math.floor(parentWidth / collItemSize.widthValue.value)
|
||||||
collItemSize.padding = Math.floor(parentWidth - (collItemSize.collValue * collItemSize.widthValue.value))
|
collItemSize.padding = Math.floor(parentWidth - (collItemSize.collValue * collItemSize.widthValue.value))
|
||||||
let value = collItemSize.collValue
|
let value = collItemSize.collValue
|
||||||
|
console.log(parentWidth,collItemSize,value)
|
||||||
|
|
||||||
collItemSize.itemStyle.width = (parentWidth - collItemSize.padding - (value * 10)) / value
|
collItemSize.itemStyle.width = (parentWidth - collItemSize.padding - (value * 10)) / value
|
||||||
collItemSize.itemStyle.height = collItemSize.itemStyle.width * 1.54
|
collItemSize.itemStyle.height = collItemSize.itemStyle.width * 1.54
|
||||||
@@ -1076,7 +1077,6 @@ export default defineComponent({
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
const upDataSort = (generateCourseItem:any,likeIndex:number)=>{
|
const upDataSort = (generateCourseItem:any,likeIndex:number)=>{
|
||||||
console.log(generateCourseItem.sort)
|
|
||||||
let list = likeDesignCollectionList.value
|
let list = likeDesignCollectionList.value
|
||||||
if(list[likeIndex].childList.length == 0)return
|
if(list[likeIndex].childList.length == 0)return
|
||||||
list[likeIndex].childList.forEach((likeItem:any,index:any)=>{
|
list[likeIndex].childList.forEach((likeItem:any,index:any)=>{
|
||||||
@@ -1085,7 +1085,6 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
// if(generateCourseItem.sort >= likeItem.sort && str == 'batch'){
|
// if(generateCourseItem.sort >= likeItem.sort && str == 'batch'){
|
||||||
// likeItem.sort += 1
|
// likeItem.sort += 1
|
||||||
// console.log(likeItem.sort)
|
|
||||||
// }
|
// }
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -1155,7 +1154,6 @@ export default defineComponent({
|
|||||||
|
|
||||||
await nextTick().then(()=>{
|
await nextTick().then(()=>{
|
||||||
designData.isUnfold = true
|
designData.isUnfold = true
|
||||||
console.log('111s')
|
|
||||||
uploadLikeDom()
|
uploadLikeDom()
|
||||||
})
|
})
|
||||||
setPrductimgAll()
|
setPrductimgAll()
|
||||||
@@ -1469,56 +1467,12 @@ export default defineComponent({
|
|||||||
// window.removeEventListener('resize', this.setItemPosition)
|
// window.removeEventListener('resize', this.setItemPosition)
|
||||||
if(this.observerData?.observer)this.observerData.observer.unobserve(this.$refs.rightContentBlockBox);
|
if(this.observerData?.observer)this.observerData.observer.unobserve(this.$refs.rightContentBlockBox);
|
||||||
},
|
},
|
||||||
|
|
||||||
async mounted() {
|
async mounted() {
|
||||||
// if(window.innerWidth < 1200){
|
// window.addEventListener('beforeunload', (event)=>{
|
||||||
// this.widthList = [
|
// this.store.commit("clearAllCollection");
|
||||||
// {
|
// });
|
||||||
// label:'Medium',
|
this.init()
|
||||||
// value:70,
|
|
||||||
// },{
|
|
||||||
// label:'Large',
|
|
||||||
// value:150,
|
|
||||||
// },{
|
|
||||||
// label:'Extra-large',
|
|
||||||
// value:200,
|
|
||||||
// }
|
|
||||||
// ]
|
|
||||||
// this.widthValue = {
|
|
||||||
// label:'Medium',
|
|
||||||
// value:70,
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
window.addEventListener('beforeunload', (event)=>{
|
|
||||||
this.store.commit("clearAllCollection");
|
|
||||||
});
|
|
||||||
// window.addEventListener('resize', this.setItemPosition)
|
|
||||||
|
|
||||||
this.$refs.rightContentBlockBox
|
|
||||||
this.observerData.observer = new ResizeObserver(entries => {
|
|
||||||
for (let entry of entries) {
|
|
||||||
clearTimeout(this.observerData.time)
|
|
||||||
if(entries[0].contentRect.width > 800){
|
|
||||||
this.likeDesignTools = true
|
|
||||||
}else{
|
|
||||||
this.likeDesignTools = false
|
|
||||||
}
|
|
||||||
this.observerData.time = setTimeout(()=>{
|
|
||||||
|
|
||||||
this.setSystemDesigner(0)
|
|
||||||
this.setDesignItemStyle()
|
|
||||||
},100)
|
|
||||||
// const { width } = entry.contentRect;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
this.observerData.observer.observe(this.$refs.rightContentBlockBox);
|
|
||||||
if(this.designCollectionList?.length > 0){
|
|
||||||
nextTick(()=>{
|
|
||||||
this.setDesignItemStyle()
|
|
||||||
this.setShowHide('recycleDomHidden')
|
|
||||||
})
|
|
||||||
}
|
|
||||||
this.isUnfold = true
|
|
||||||
this.setUnfold()
|
|
||||||
},
|
},
|
||||||
directives:{
|
directives:{
|
||||||
mousewheel:{
|
mousewheel:{
|
||||||
@@ -1554,7 +1508,9 @@ export default defineComponent({
|
|||||||
// this.likeDesignCollectionList.push(team)
|
// this.likeDesignCollectionList.push(team)
|
||||||
// },
|
// },
|
||||||
openSetData(){
|
openSetData(){
|
||||||
this.setItemPosition()
|
nextTick(()=>{
|
||||||
|
this.setItemPosition()
|
||||||
|
})
|
||||||
},
|
},
|
||||||
setItemPosition(){
|
setItemPosition(){
|
||||||
this.setSystemDesigner(0)
|
this.setSystemDesigner(0)
|
||||||
@@ -1566,7 +1522,36 @@ export default defineComponent({
|
|||||||
affiche.init(text)
|
affiche.init(text)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
init(){
|
||||||
|
|
||||||
|
this.$refs.rightContentBlockBox
|
||||||
|
this.observerData.observer = new ResizeObserver(entries => {
|
||||||
|
for (let entry of entries) {
|
||||||
|
if(entries[0].contentRect.width == 0)return
|
||||||
|
clearTimeout(this.observerData.time)
|
||||||
|
if(entries[0].contentRect.width > 800){
|
||||||
|
this.likeDesignTools = true
|
||||||
|
}else{
|
||||||
|
this.likeDesignTools = false
|
||||||
|
}
|
||||||
|
this.observerData.time = setTimeout(()=>{
|
||||||
|
|
||||||
|
this.setSystemDesigner(0)
|
||||||
|
this.setDesignItemStyle()
|
||||||
|
},100)
|
||||||
|
// const { width } = entry.contentRect;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.observerData.observer.observe(this.$refs.rightContentBlockBox);
|
||||||
|
if(this.designCollectionList?.length > 0){
|
||||||
|
nextTick(()=>{
|
||||||
|
this.setDesignItemStyle()
|
||||||
|
this.setShowHide('recycleDomHidden')
|
||||||
|
})
|
||||||
|
}
|
||||||
|
this.isUnfold = true
|
||||||
|
this.setUnfold()
|
||||||
|
},
|
||||||
//判断模特和当前start的sketch是否匹配
|
//判断模特和当前start的sketch是否匹配
|
||||||
isMannequin(){
|
isMannequin(){
|
||||||
this.isMannequinShow = false
|
this.isMannequinShow = false
|
||||||
|
|||||||
@@ -78,6 +78,7 @@ export default defineComponent({
|
|||||||
data.routeQuery = query
|
data.routeQuery = query
|
||||||
if(query.history)data.componentKey = query.history
|
if(query.history)data.componentKey = query.history
|
||||||
const key = Object.keys(query)?.[0]
|
const key = Object.keys(query)?.[0]
|
||||||
|
console.log(key)
|
||||||
if(key){
|
if(key){
|
||||||
data.openType = Object.keys(query)[0]
|
data.openType = Object.keys(query)[0]
|
||||||
}else{
|
}else{
|
||||||
@@ -98,6 +99,11 @@ export default defineComponent({
|
|||||||
// 如果是同一个项目且openType为history,跳过重新初始化
|
// 如果是同一个项目且openType为history,跳过重新初始化
|
||||||
if(isSameProject){
|
if(isSameProject){
|
||||||
data.dataLoad = false
|
data.dataLoad = false
|
||||||
|
console.log(dataDom.design)
|
||||||
|
// dataDom.design?.init()
|
||||||
|
if(query.history){
|
||||||
|
dataDom.design.openSetData()
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -153,6 +153,9 @@ const DesignDetail : Module<DesignDetail,RootState> = {
|
|||||||
state.currentDetailType = data
|
state.currentDetailType = data
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
setFrontBack(state,data){
|
||||||
|
state.frontBack = data
|
||||||
|
},
|
||||||
setDesignColthes(state,data){
|
setDesignColthes(state,data){
|
||||||
if(!state.currentDetailType)state.currentDetailType = 'sketch'
|
if(!state.currentDetailType)state.currentDetailType = 'sketch'
|
||||||
//切换选择
|
//切换选择
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
></path>
|
></path>
|
||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
<div class="newObj" @click="newProject">
|
<div class="newObj" :class="{ active: isNewProject }" @click="newProject">
|
||||||
<!-- <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 25 24"><path stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12.5 5v14m-7-7h14"></path></svg> -->
|
<!-- <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 25 24"><path stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12.5 5v14m-7-7h14"></path></svg> -->
|
||||||
|
|
||||||
<svg
|
<svg
|
||||||
@@ -55,14 +55,20 @@
|
|||||||
</svg>
|
</svg>
|
||||||
<p>{{ $t('Header.NewProject') }}</p>
|
<p>{{ $t('Header.NewProject') }}</p>
|
||||||
</div>
|
</div>
|
||||||
|
<div
|
||||||
|
class="current-projct"
|
||||||
|
@click="handleNavigateToCurrentProject"
|
||||||
|
:class="{
|
||||||
|
disabled: disabledCurrentProject,
|
||||||
|
filled: !disabledCurrentProject,
|
||||||
|
active: currentProjectActive
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
<FolderOpenOutlined class="current-project-icon" />
|
||||||
|
<span>{{ $t('Habit.currentProject') }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="divider" />
|
||||||
<div class="navList">
|
<div class="navList">
|
||||||
<div
|
|
||||||
class="current-projct"
|
|
||||||
@click="handleNavigateToCurrentProject"
|
|
||||||
:class="{ disabled: disabledCurrentProject }"
|
|
||||||
>
|
|
||||||
{{ $t('Habit.currentProject') }}
|
|
||||||
</div>
|
|
||||||
<div
|
<div
|
||||||
class="tools list"
|
class="tools list"
|
||||||
v-for="item in navTypeList"
|
v-for="item in navTypeList"
|
||||||
@@ -450,7 +456,7 @@ import TaskPage from '@/component/HomePage/TaskPage.vue'
|
|||||||
import UpgradePlan from '@/component/HomePage/UpgradePlan.vue'
|
import UpgradePlan from '@/component/HomePage/UpgradePlan.vue'
|
||||||
import { Https } from '@/tool/https'
|
import { Https } from '@/tool/https'
|
||||||
import { Modal, message } from 'ant-design-vue'
|
import { Modal, message } from 'ant-design-vue'
|
||||||
import { ExclamationCircleOutlined } from '@ant-design/icons-vue'
|
import { ExclamationCircleOutlined, FolderOpenOutlined } from '@ant-design/icons-vue'
|
||||||
import RobotAssist from '@/component/HomePage/RobotAssist.vue'
|
import RobotAssist from '@/component/HomePage/RobotAssist.vue'
|
||||||
import scaleVideo from '@/component/HomePage/scaleVideo.vue'
|
import scaleVideo from '@/component/HomePage/scaleVideo.vue'
|
||||||
import newPosted from '@/component/HomePage/newPosted.vue'
|
import newPosted from '@/component/HomePage/newPosted.vue'
|
||||||
@@ -482,7 +488,8 @@ export default defineComponent({
|
|||||||
TaskPage,
|
TaskPage,
|
||||||
home,
|
home,
|
||||||
projectSetting,
|
projectSetting,
|
||||||
bindEmail
|
bindEmail,
|
||||||
|
FolderOpenOutlined
|
||||||
},
|
},
|
||||||
setup() {
|
setup() {
|
||||||
const store = useStore()
|
const store = useStore()
|
||||||
@@ -514,7 +521,8 @@ export default defineComponent({
|
|||||||
isEarlier: false
|
isEarlier: false
|
||||||
},
|
},
|
||||||
bathGenerationList: ['poseTransfer', 'SERIES_DESIGN', 'toProduct', 'relight'],
|
bathGenerationList: ['poseTransfer', 'SERIES_DESIGN', 'toProduct', 'relight'],
|
||||||
showHistory: false
|
showHistory: false,
|
||||||
|
isNewProject: false
|
||||||
})
|
})
|
||||||
let userDetail = computed(() => {
|
let userDetail = computed(() => {
|
||||||
return store.state.UserHabit.userDetail
|
return store.state.UserHabit.userDetail
|
||||||
@@ -603,13 +611,19 @@ export default defineComponent({
|
|||||||
|
|
||||||
// 监听路由,当路由地址为/home/history时homeMainData.showHistory为true,改变左侧菜单颜色
|
// 监听路由,当路由地址为/home/history时homeMainData.showHistory为true,改变左侧菜单颜色
|
||||||
watch(
|
watch(
|
||||||
() => route.path,
|
[() => route.path, () => route.fullPath],
|
||||||
() => {
|
([path, fullPath]) => {
|
||||||
if (route.path == '/home/history') {
|
if (route.path == '/home/history') {
|
||||||
homeMainData.showHistory = true
|
homeMainData.showHistory = true
|
||||||
} else {
|
} else {
|
||||||
homeMainData.showHistory = false
|
homeMainData.showHistory = false
|
||||||
}
|
}
|
||||||
|
// 当fullPath为/home时表示在新建项目
|
||||||
|
if (route.fullPath === '/home') {
|
||||||
|
homeMainData.isNewProject = true
|
||||||
|
} else {
|
||||||
|
homeMainData.isNewProject = false
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{ immediate: true }
|
{ immediate: true }
|
||||||
)
|
)
|
||||||
@@ -1001,14 +1015,18 @@ export default defineComponent({
|
|||||||
return store.state.Workspace.projectPath
|
return store.state.Workspace.projectPath
|
||||||
})
|
})
|
||||||
|
|
||||||
const disabledCurrentProject = computed(() => {
|
const disabledCurrentProject = computed(() => {
|
||||||
if(!currentProjectPath.value) return true
|
if (!currentProjectPath.value) return true
|
||||||
if(route.fullPath === currentProjectPath.value) return true
|
|
||||||
return false
|
return false
|
||||||
})
|
})
|
||||||
|
|
||||||
const handleNavigateToCurrentProject = () => {
|
const currentProjectActive = computed(() => {
|
||||||
console.log('store地址',currentProjectPath.value,'当前路径',route.fullPath)
|
return currentProjectPath.value === route.fullPath
|
||||||
|
})
|
||||||
|
|
||||||
|
const handleNavigateToCurrentProject = () => {
|
||||||
|
if (currentProjectActive.value) return
|
||||||
if (currentProjectPath.value) {
|
if (currentProjectPath.value) {
|
||||||
router.push(currentProjectPath.value)
|
router.push(currentProjectPath.value)
|
||||||
}
|
}
|
||||||
@@ -1047,8 +1065,9 @@ export default defineComponent({
|
|||||||
newProject,
|
newProject,
|
||||||
bathGeneration,
|
bathGeneration,
|
||||||
toUserManual,
|
toUserManual,
|
||||||
currentProjectPath,
|
currentProjectPath,
|
||||||
disabledCurrentProject,
|
disabledCurrentProject,
|
||||||
|
currentProjectActive,
|
||||||
handleNavigateToCurrentProject
|
handleNavigateToCurrentProject
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -1705,7 +1724,8 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
.newObj {
|
.newObj {
|
||||||
border-radius: 2rem;
|
border-radius: 2rem;
|
||||||
border: 2px solid #000;
|
border: 2px solid rgba(0, 0, 0, 0.1);
|
||||||
|
background: #fff;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
@@ -1714,6 +1734,12 @@ export default defineComponent({
|
|||||||
width: 25.1rem;
|
width: 25.1rem;
|
||||||
// height: 6.8rem;
|
// height: 6.8rem;
|
||||||
padding: calc(2rem - 2px) 0;
|
padding: calc(2rem - 2px) 0;
|
||||||
|
&.active {
|
||||||
|
border-color: rgba(0, 0, 0, 0.5);
|
||||||
|
}
|
||||||
|
&:hover {
|
||||||
|
border-color: rgba(0, 0, 0, 0.5);
|
||||||
|
}
|
||||||
> svg {
|
> svg {
|
||||||
margin-right: 1.3rem;
|
margin-right: 1.3rem;
|
||||||
width: 1.6rem;
|
width: 1.6rem;
|
||||||
@@ -2190,23 +2216,43 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
.current-projct {
|
.current-projct {
|
||||||
// text-align: center;
|
font-size: 2rem;
|
||||||
padding: 1.2rem;
|
|
||||||
font-size: 1.8rem;
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-weight: 500;
|
border: 2px solid rgba(0, 0, 0, 0.1);
|
||||||
border-radius: 2rem;
|
border-radius: 2rem;
|
||||||
border: 2px solid #000;
|
display: flex;
|
||||||
text-align: center;
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 25.1rem;
|
||||||
|
padding: calc(2rem - 2px) 0;
|
||||||
|
margin-top: 2rem;
|
||||||
|
&.filled {
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.current-project-icon {
|
||||||
|
margin-right: 1.3rem;
|
||||||
|
}
|
||||||
|
|
||||||
&.disabled {
|
&.disabled {
|
||||||
color: #a5b0c2;
|
color: #9a9a9a;
|
||||||
border-color: #a5b0c2;
|
border-color: rgba(0, 0, 0, 0.1);
|
||||||
|
background: #f5f5f5;
|
||||||
cursor: not-allowed;
|
cursor: not-allowed;
|
||||||
}
|
}
|
||||||
|
&.active {
|
||||||
|
cursor: not-allowed;
|
||||||
|
border-color: rgba(0, 0, 0, 0.5);
|
||||||
|
}
|
||||||
|
|
||||||
&:hover {
|
&.filled:hover {
|
||||||
background: #fff;
|
border-color: rgba(0, 0, 0, 0.5);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.divider {
|
||||||
|
width: 100%;
|
||||||
|
height: 1px;
|
||||||
|
margin-top: 3rem;
|
||||||
|
background-color: rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user