detail 可以把系统sketch添加到个人libarry
This commit is contained in:
@@ -50,7 +50,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="item detailLeft" :class="{isEditPattern:isEditPattern.value}">
|
||||
<detailLeft v-if="currentDetailType"></detailLeft>
|
||||
<detailLeft v-if="currentDetailType" ref="detailLeft"></detailLeft>
|
||||
<!-- <detailLeft v-if="selectDetail && selectDetail.id && currentDetailType"></detailLeft> -->
|
||||
<div class="btn" style="margin: 0;" v-show="currentDetailType == 'color'">
|
||||
<div class="gallery_btn" @click="previwe">{{$t('DesignPrintOperation.Preview')}}</div>
|
||||
@@ -67,6 +67,7 @@
|
||||
@revocation="revocation"
|
||||
@oppositeRevocation="oppositeRevocation"
|
||||
@modelOnLoad="modelOnLoad"
|
||||
@sketchSysToLibrary="sketchSysToLibrary"
|
||||
></model>
|
||||
<div class="btn">
|
||||
<div class="gallery_btn" style="margin-right: 0;" @click="submit">{{$t('DesignPrintOperation.Submit')}}</div>
|
||||
@@ -136,6 +137,7 @@ export default defineComponent({
|
||||
model:null,
|
||||
canvasBox,
|
||||
detailRight,
|
||||
detailLeft:null as any,
|
||||
})
|
||||
const userDetail = computed(()=>{
|
||||
return store.state.UserHabit.userDetail
|
||||
@@ -491,6 +493,9 @@ export default defineComponent({
|
||||
store.commit('DesignDetail/setDesignDetail',detailData.designDetail)
|
||||
},1000)
|
||||
}
|
||||
const sketchSysToLibrary = ()=>{//系统sketch添加到library更新library
|
||||
detailDom.detailLeft.sketchSysToLibrary()
|
||||
}
|
||||
onMounted(()=>{
|
||||
window.addEventListener('resize', handleResize);
|
||||
})
|
||||
@@ -515,6 +520,7 @@ export default defineComponent({
|
||||
detailEdit,
|
||||
canvasReload,
|
||||
modelOnLoad,
|
||||
sketchSysToLibrary,
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="detailLeft">
|
||||
<sketch v-show="currentDetailType == 'sketch'" @addDetail="addDetail"></sketch>
|
||||
<sketch v-show="currentDetailType == 'sketch'" ref="sketch" @addDetail="addDetail"></sketch>
|
||||
<print v-show="currentDetailType == 'print'"></print>
|
||||
<color v-if="currentDetailType == 'color'"></color>
|
||||
<element v-show="currentDetailType == 'element'"></element>
|
||||
@@ -42,6 +42,7 @@ export default defineComponent({
|
||||
})
|
||||
const getDetailListDom = reactive({
|
||||
addDetails:null as any,
|
||||
sketch:null as any,
|
||||
})
|
||||
const addDetail = () =>{
|
||||
let addDetails:any = getDetailListDom.addDetails
|
||||
@@ -53,6 +54,9 @@ export default defineComponent({
|
||||
detailData.selectDetail.newDetail.sketch = null
|
||||
}
|
||||
}
|
||||
const sketchSysToLibrary = ()=>{//系统sketch添加到library更新library
|
||||
getDetailListDom.sketch.sketchSysToLibrary()
|
||||
}
|
||||
|
||||
return{
|
||||
...toRefs(detailData),
|
||||
@@ -60,6 +64,7 @@ export default defineComponent({
|
||||
...toRefs(getDetailListDom),
|
||||
addDetail,
|
||||
setSloganData,
|
||||
sketchSysToLibrary,
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<i class="fi fi-rr-picture centent"></i>
|
||||
</div>
|
||||
</div>
|
||||
<selectList @selectImgItem="selectImgItem" source="detail" level1Type="Sketchboard" type="sketch" :catecoryList="sketchCatecoryList"></selectList>
|
||||
<selectList @selectImgItem="selectImgItem" source="detail" ref="selectList" level1Type="Sketchboard" type="sketch" :catecoryList="sketchCatecoryList"></selectList>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
@@ -47,7 +47,7 @@ export default defineComponent({
|
||||
currentPage:1,
|
||||
})
|
||||
const getDetailListDom = reactive({
|
||||
libraryList:null as any,
|
||||
selectList:null as any,
|
||||
})
|
||||
const openCurrent = ()=>{
|
||||
detailData.selectTitle = 'current'
|
||||
@@ -55,9 +55,8 @@ export default defineComponent({
|
||||
const openUpload = ()=>{
|
||||
detailData.selectTitle = 'upload'
|
||||
}
|
||||
const openLibrary = ()=>{
|
||||
detailData.selectTitle = 'library'
|
||||
getDetailListDom.libraryList.init()
|
||||
const sketchSysToLibrary = ()=>{
|
||||
getDetailListDom.selectList.openLibrary()
|
||||
}
|
||||
const hasDuplicateId = (id:any)=>{
|
||||
let arr = detailData.designDetail.clothes
|
||||
@@ -96,7 +95,7 @@ export default defineComponent({
|
||||
|
||||
openCurrent,
|
||||
openUpload,
|
||||
openLibrary,
|
||||
sketchSysToLibrary,
|
||||
selectImgItem,
|
||||
openAddDetail,
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<div class="back" v-show="isEditPattern.value">
|
||||
<i class="fi fi-br-angle-left" @click="setBack"></i>
|
||||
</div>
|
||||
<modelNav @canvasReload="()=>$emit('canvasReload')" @addSketch="()=>$emit('addSketch')" @deleteItem="deleteItem"></modelNav>
|
||||
<modelNav @canvasReload="()=>$emit('canvasReload')" @addSketch="()=>$emit('addSketch')" @sketchSysToLibrary="()=>$emit('sketchSysToLibrary')" @deleteItem="deleteItem"></modelNav>
|
||||
</div>
|
||||
<div class="modelindex_right">
|
||||
<div class="detail_btn">
|
||||
@@ -26,7 +26,7 @@
|
||||
<i v-show="!body && deleteShow" class="fi fi-br-check" @click="deleteNav(1)"></i> -->
|
||||
|
||||
<!-- 层 -->
|
||||
<i :title="$t('DesignDetail.compareTitle')" @mousedown="mousedownDesignImg" @mouseup="mousedownDesignImg" @touchstart="mousedownDesignImg" @touchend="mousedownDesignImg">
|
||||
<i :title="$t('DesignDetail.compareTitle')" @mousedown="mousedownDesignImg" @mouseup="mousedownDesignImg" @touchstart.passive="mousedownDesignImg" @touchend.passive="mousedownDesignImg">
|
||||
<SvgIcon name="DetailCompare" size="30" />
|
||||
</i>
|
||||
|
||||
@@ -50,7 +50,7 @@ export default defineComponent({
|
||||
components:{
|
||||
position,modelNav
|
||||
},
|
||||
emits:['detailEdit','canvasReload','addSketch','revocation','oppositeRevocation','modelOnLoad'],
|
||||
emits:['detailEdit','canvasReload','addSketch','revocation','oppositeRevocation','modelOnLoad','sketchSysToLibrary'],
|
||||
setup(props,{emit}) {
|
||||
const {t} = useI18n()
|
||||
const store = useStore();
|
||||
|
||||
@@ -7,7 +7,10 @@
|
||||
@mousedown.stop="designMousedown(getMousePosition($event,false),item.uniqueId,'disLike')"
|
||||
@touchstart.passive="designMousedown(getMousePosition($event,true),item.uniqueId,'disLike')"
|
||||
@click="selectDetailItem(item,index)">
|
||||
<i class="fi fi-rr-trash" @click.stop="deleteDetailItem(item?.id)"></i>
|
||||
<div class="iconList">
|
||||
<i class="fi fi-rr-add" :class="{ active:item.scope == 'sys'}" @click.stop="sketchSystemToLibrary(item)"></i>
|
||||
<i class="fi fi-rr-trash" @click.stop="deleteDetailItem(item?.id)"></i>
|
||||
</div>
|
||||
<img :src="item.path" alt="">
|
||||
</div>
|
||||
</div>
|
||||
@@ -30,7 +33,7 @@ export default defineComponent({
|
||||
components:{
|
||||
position,
|
||||
},
|
||||
emits:['canvasReload','addSketch','deleteItem'],
|
||||
emits:['canvasReload','addSketch','deleteItem','sketchSysToLibrary'],
|
||||
props:{
|
||||
},
|
||||
setup(props,{emit}) {
|
||||
@@ -249,6 +252,17 @@ export default defineComponent({
|
||||
collItemSize.prentHeight = (collItemSize.padding + remValue) * elArr.length + 'px'
|
||||
moveItem()
|
||||
}
|
||||
const sketchSystemToLibrary = (item)=>{
|
||||
let value = {
|
||||
clothId:item.id,
|
||||
path:item.minIOPath
|
||||
}
|
||||
Https.axiosGet(Https.httpUrls.addSysSketchToLibrary,{params:value})
|
||||
.then((rv:any)=>{
|
||||
item.scope = 'user'
|
||||
emit('sketchSysToLibrary')
|
||||
})
|
||||
}
|
||||
let observers = null as any
|
||||
onMounted(()=>{
|
||||
observers = new ResizeObserver(entries => {
|
||||
@@ -269,6 +283,7 @@ export default defineComponent({
|
||||
designMousedown,
|
||||
addSketch,
|
||||
getMousePosition,
|
||||
sketchSystemToLibrary,
|
||||
}
|
||||
},
|
||||
|
||||
@@ -295,17 +310,35 @@ export default defineComponent({
|
||||
position: absolute;
|
||||
background: #fff;
|
||||
transition: top .3s;
|
||||
> i:not(.fi-bs-plus){
|
||||
display: none;
|
||||
> .iconList{
|
||||
position: absolute;
|
||||
right: 1rem;
|
||||
top: 1rem;
|
||||
cursor: pointer;
|
||||
font-size: 2rem;
|
||||
}
|
||||
&:hover{
|
||||
right: 1rem;
|
||||
display: none;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
> i{
|
||||
display: block;
|
||||
margin-bottom: .2rem;
|
||||
font-size: 1.8rem;
|
||||
}
|
||||
> .fi-rr-add{
|
||||
pointer-events: none;
|
||||
color: #acacac;
|
||||
&.active{
|
||||
pointer-events: auto;
|
||||
color: #000;
|
||||
}
|
||||
}
|
||||
>i:not(.fi-rr-add){
|
||||
font-size: 2rem;
|
||||
}
|
||||
}
|
||||
i:not(.fi-bs-plus){
|
||||
}
|
||||
|
||||
&:hover{
|
||||
> .iconList{
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
&:last-child{
|
||||
|
||||
@@ -686,7 +686,7 @@ export default defineComponent({
|
||||
if(this.colorList[colorList.length - 1]?.gradient && this.colorList[colorList.length - 1]?.gradient?.selectIndex>-1 && this.colorList[colorList.length - 1]?.gradient?.gradientShow){
|
||||
this.selectColor = {rgba:this.colorList[colorList.length - 1].gradient.gradientList[colorList.length - 1].rgba,hex:hex} //顔色选择器默认颜色
|
||||
}else{
|
||||
this.selectColor = {rgba:this.colorList[colorList.length - 1].rgba,hex:hex} //顔色选择器默认颜色
|
||||
this.selectColor = {rgba:this.colorList[colorList.length - 1]?.rgba,hex:hex} //顔色选择器默认颜色
|
||||
}
|
||||
this.store.commit('setColorboardList',colorList)
|
||||
},
|
||||
|
||||
@@ -217,6 +217,7 @@ export const Https = {
|
||||
projectSaveOrUpdate:`/api/project/saveOrUpdate`, //History修改用户分组名
|
||||
historyChoose:`/api/history/choose`, //History choose
|
||||
getDesignDetail:`/api/design/detail/getDetail`,//查询design详情
|
||||
addSysSketchToLibrary:`/api/library/addSysSketchToLibrary`,//把系统衣服添加的library
|
||||
designSingleWithGradient:`/api/design/detail/designSingleWithGradient`,//查询需要更新mask列表
|
||||
getNextSysElement:'/api/design/detail/getNextSysElement',//切换系统的element
|
||||
detailPrintDot:'/api/design/detail/printDot',//print打点预览
|
||||
|
||||
Reference in New Issue
Block a user