Merge branch 'dev_vite' of http://18.167.251.121:10003/aidlab/aida_front into dev_vite
This commit is contained in:
@@ -248,15 +248,13 @@ export default defineComponent({
|
||||
const setRevocation = ()=>{//设置撤销
|
||||
let itemDetail = JSON.parse(JSON.stringify(detailData.designDetail))
|
||||
let revocation:any = JSON.parse((sessionStorage.getItem("revocation") as any))
|
||||
if(!revocation)revocation = []
|
||||
// let oppositeRevocation = JSON.parse((sessionStorage.getItem("oppositeRevocation") as any))
|
||||
if(revocation?.[0]?.designItemId != itemDetail.designItemId || revocation?.[0]?.designItemId == undefined){
|
||||
// sessionStorage.setItem('revocation', JSON.stringify([]));
|
||||
// sessionStorage.setItem('oppositeRevocation',JSON.stringify([]));
|
||||
revocation = []
|
||||
}
|
||||
// if(revocation?.[0]?.designItemId != itemDetail.designItemId || revocation?.[0]?.designItemId == undefined){
|
||||
// revocation = []
|
||||
// }
|
||||
revocation.push({designData:itemDetail,position:null})
|
||||
detailData.revocationShow = revocation?.length
|
||||
detailData.oppositeRevocationShow = 0
|
||||
sessionStorage.setItem('revocation', JSON.stringify(revocation));
|
||||
sessionStorage.setItem('oppositeRevocation',JSON.stringify([]));
|
||||
}
|
||||
@@ -265,13 +263,16 @@ export default defineComponent({
|
||||
const revocation = ()=>{//撤回
|
||||
let oppositeRevocation = JSON.parse((sessionStorage.getItem("oppositeRevocation") 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])
|
||||
detailData.oppositeRevocationShow = oppositeRevocation.length
|
||||
revocation.splice(revocation.length-1,1)
|
||||
detailData.revocationShow = revocation.length
|
||||
// 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)
|
||||
sessionStorage.setItem('oppositeRevocation', JSON.stringify(oppositeRevocation));
|
||||
sessionStorage.setItem('revocation', JSON.stringify(revocation));
|
||||
@@ -281,8 +282,13 @@ export default defineComponent({
|
||||
const oppositeRevocation = ()=>{//反撤回
|
||||
let oppositeRevocation = JSON.parse((sessionStorage.getItem("oppositeRevocation") as any))
|
||||
let revocation = JSON.parse((sessionStorage.getItem("revocation") as any))
|
||||
if(!oppositeRevocation[oppositeRevocation.length-1])return
|
||||
store.commit("DesignDetail/setDesignDetail", oppositeRevocation[oppositeRevocation.length-1]);
|
||||
// if(!oppositeRevocation[oppositeRevocation.length-1].designData)return
|
||||
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)
|
||||
revocation.push(oppositeRevocation[oppositeRevocation.length-1])
|
||||
detailData.revocationShow = revocation.length
|
||||
@@ -363,7 +369,6 @@ export default defineComponent({
|
||||
}
|
||||
const getSubmitData = async (str:string)=>{
|
||||
// return
|
||||
console.log(detailData.selectDetail)
|
||||
let workspace = store.state.Workspace.probjects
|
||||
if(!detailData?.selectDetail?.path && !detailData?.selectDetail?.newDetail?.sketch?.minIOPath)return
|
||||
let clothes:any
|
||||
|
||||
@@ -198,16 +198,21 @@ export default defineComponent({
|
||||
document.removeEventListener('mouseup',sizeMouseup)
|
||||
document.removeEventListener('touchend',sizeMouseup)
|
||||
//鼠标抬起
|
||||
console.log(11)
|
||||
setRevocation()
|
||||
}
|
||||
let isMove = false//表示是否移动,是否需要在鼠标抬起的时候保存数据
|
||||
const setRevocation = ()=>{
|
||||
if(!isMove)return
|
||||
isMove = false
|
||||
let frontBack = JSON.parse(JSON.stringify(detailData.frontBack))
|
||||
console.log(frontBack)
|
||||
let revocation:any = JSON.parse((sessionStorage.getItem("revocation") as any))
|
||||
revocation.push({designData:null,position:frontBack})
|
||||
sessionStorage.setItem('revocation', JSON.stringify(revocation));
|
||||
|
||||
}
|
||||
const sizeMouseMoveOperation = (e:any)=> {
|
||||
isMove = true
|
||||
let imgDomWH = selectItem.imgDom.getBoundingClientRect()
|
||||
let parentNode =selectItem.imgDom.parentNode
|
||||
let width = imgDomWH.width
|
||||
@@ -262,9 +267,10 @@ export default defineComponent({
|
||||
document.removeEventListener('mouseup',mouseup)
|
||||
document.removeEventListener('touchend',mouseup)
|
||||
///鼠标抬起
|
||||
console.log(11)
|
||||
setRevocation()
|
||||
}
|
||||
const mouseMoveOperation = (e:any)=>{
|
||||
isMove = true
|
||||
let imgDomWH = selectItem.imgDom.getBoundingClientRect()
|
||||
let parentNode = document.getElementsByClassName('molepositon')[0].getElementsByClassName("designOpenrtion_imgMask")[0].getBoundingClientRect()
|
||||
let x = (e.clientX - detailData.frontBack.front[selectItem.imgDomIndex].centers.left)+'px'
|
||||
|
||||
@@ -19,7 +19,8 @@
|
||||
@keydown.enter="handleSearch"
|
||||
: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>
|
||||
</template>
|
||||
@@ -109,17 +110,21 @@ const handleSearch = () => {
|
||||
height: 100%;
|
||||
padding-left: 3rem;
|
||||
border-radius: 4rem;
|
||||
// line-height: 4rem;
|
||||
width: calc(100% - 2rem);
|
||||
// placeholder的fontsize设置为1.4rem
|
||||
&::placeholder {
|
||||
font-size: 1.4rem;
|
||||
font-size: 1.6rem;
|
||||
}
|
||||
&::-webkit-input-placeholder{
|
||||
font-size: 1.4rem;
|
||||
font-size: 1.6rem;
|
||||
}
|
||||
}
|
||||
.search_input_icon {
|
||||
font-size: 2rem;
|
||||
color: #000;
|
||||
width: initial;
|
||||
height: initial;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -423,6 +423,7 @@ setup(props:any,{emit}) {
|
||||
rv.forEach((item:any)=>{
|
||||
arr.push(item.taskId)
|
||||
})
|
||||
console.log(productimg.selectGenerate)
|
||||
productimg.generateCourse = {
|
||||
...rv[0],
|
||||
prompt:productimg.productimgSearchName,
|
||||
@@ -430,7 +431,6 @@ setup(props:any,{emit}) {
|
||||
// modelName:speed.speedData.value,
|
||||
modelName:data.modelName,
|
||||
poseId:productimg.selectPose,
|
||||
userLikeSortId:productimg.selectGenerate.userLikeSortId || productimg.selectGenerate?.parentId,
|
||||
sourceUrl:productimg.selectGenerate?.sourceUrl || productimg.selectGenerate?.productImage,
|
||||
status:null,
|
||||
oldId:productimg.openType == 'add'?null:productimg.selectGenerate.id,
|
||||
@@ -590,6 +590,7 @@ setup(props:any,{emit}) {
|
||||
productimg.productimgRelightDirection = ''
|
||||
}
|
||||
let init = async (list:any,index:any,dialogueIndex:any,status:any,listType:string)=>{
|
||||
console.log(list[index])
|
||||
productimg.scaleImageList = list
|
||||
productimg.scaleImageIndex = index
|
||||
scaleImage.value = true
|
||||
|
||||
@@ -629,6 +629,7 @@ export default defineComponent({
|
||||
collItemSize.collValue = Math.floor(parentWidth / collItemSize.widthValue.value)
|
||||
collItemSize.padding = Math.floor(parentWidth - (collItemSize.collValue * collItemSize.widthValue.value))
|
||||
let value = collItemSize.collValue
|
||||
console.log(parentWidth,collItemSize,value)
|
||||
|
||||
collItemSize.itemStyle.width = (parentWidth - collItemSize.padding - (value * 10)) / value
|
||||
collItemSize.itemStyle.height = collItemSize.itemStyle.width * 1.54
|
||||
@@ -1076,7 +1077,6 @@ export default defineComponent({
|
||||
})
|
||||
}
|
||||
const upDataSort = (generateCourseItem:any,likeIndex:number)=>{
|
||||
console.log(generateCourseItem.sort)
|
||||
let list = likeDesignCollectionList.value
|
||||
if(list[likeIndex].childList.length == 0)return
|
||||
list[likeIndex].childList.forEach((likeItem:any,index:any)=>{
|
||||
@@ -1085,7 +1085,6 @@ export default defineComponent({
|
||||
}
|
||||
// if(generateCourseItem.sort >= likeItem.sort && str == 'batch'){
|
||||
// likeItem.sort += 1
|
||||
// console.log(likeItem.sort)
|
||||
// }
|
||||
})
|
||||
}
|
||||
@@ -1155,7 +1154,6 @@ export default defineComponent({
|
||||
|
||||
await nextTick().then(()=>{
|
||||
designData.isUnfold = true
|
||||
console.log('111s')
|
||||
uploadLikeDom()
|
||||
})
|
||||
setPrductimgAll()
|
||||
@@ -1469,56 +1467,12 @@ export default defineComponent({
|
||||
// window.removeEventListener('resize', this.setItemPosition)
|
||||
if(this.observerData?.observer)this.observerData.observer.unobserve(this.$refs.rightContentBlockBox);
|
||||
},
|
||||
|
||||
async mounted() {
|
||||
// if(window.innerWidth < 1200){
|
||||
// this.widthList = [
|
||||
// {
|
||||
// label:'Medium',
|
||||
// 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()
|
||||
// window.addEventListener('beforeunload', (event)=>{
|
||||
// this.store.commit("clearAllCollection");
|
||||
// });
|
||||
this.init()
|
||||
},
|
||||
directives:{
|
||||
mousewheel:{
|
||||
@@ -1554,7 +1508,9 @@ export default defineComponent({
|
||||
// this.likeDesignCollectionList.push(team)
|
||||
// },
|
||||
openSetData(){
|
||||
this.setItemPosition()
|
||||
nextTick(()=>{
|
||||
this.setItemPosition()
|
||||
})
|
||||
},
|
||||
setItemPosition(){
|
||||
this.setSystemDesigner(0)
|
||||
@@ -1566,7 +1522,36 @@ export default defineComponent({
|
||||
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是否匹配
|
||||
isMannequin(){
|
||||
this.isMannequinShow = false
|
||||
|
||||
@@ -78,6 +78,7 @@ export default defineComponent({
|
||||
data.routeQuery = query
|
||||
if(query.history)data.componentKey = query.history
|
||||
const key = Object.keys(query)?.[0]
|
||||
console.log(key)
|
||||
if(key){
|
||||
data.openType = Object.keys(query)[0]
|
||||
}else{
|
||||
@@ -98,6 +99,11 @@ export default defineComponent({
|
||||
// 如果是同一个项目且openType为history,跳过重新初始化
|
||||
if(isSameProject){
|
||||
data.dataLoad = false
|
||||
console.log(dataDom.design)
|
||||
// dataDom.design?.init()
|
||||
if(query.history){
|
||||
dataDom.design.openSetData()
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user