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