This commit is contained in:
X1627315083
2024-06-20 10:36:45 +08:00
parent 814dd1205c
commit dc93403506
28 changed files with 1506 additions and 394 deletions

View File

@@ -97,7 +97,7 @@
<div class="centent_div centent_print" v-if="exhibitionList.print && exhibitionList.print.length > 1" @click="openCurrent(2)">
<img v-for="item in exhibitionList.print" :key="item.id" :src="item.path" alt="">
</div>
<div v-else-if="exhibitionList.print && exhibitionList.print.length == 1" class="centent_div">
<div v-else-if="exhibitionList.print && exhibitionList.print.length == 1" class="centent_div" @click="openCurrent(2)">
<img :src="exhibitionList.print[0]?.path" alt="">
</div>
<i v-else class="fi fi-rr-picture centent" @click="openCurrent(2)"></i>
@@ -133,7 +133,7 @@
<div class="centent_div centent_print" v-if="exhibitionList.elements && exhibitionList.elements.length > 1" @click="openCurrent(4)">
<img v-for="item in exhibitionList.elements" :key="item.id" :src="item.path" alt="">
</div>
<div v-else-if="exhibitionList.elements && exhibitionList.elements.length == 1" class="centent_div">
<div v-else-if="exhibitionList.elements && exhibitionList.elements.length == 1" class="centent_div" @click="openCurrent(4)">
<img :src="exhibitionList.elements[0]?.path" alt="">
</div>
<i v-else class="fi fi-rr-picture centent" @click="openCurrent(4)"></i>
@@ -359,6 +359,8 @@ export default defineComponent({
handler(newVal,oldVal){
if(newVal && newVal.length > 0){
this.exhibitionList.print = this.setExhibitionList(newVal)
}else{
this.exhibitionList.print = []
}
}
},
@@ -366,6 +368,8 @@ export default defineComponent({
handler(newVal,oldVal){
if(newVal && newVal.length > 0){
this.exhibitionList.elements = this.setExhibitionList(newVal)
}else{
this.exhibitionList.print = []
}
}
},

View File

@@ -24,9 +24,9 @@
<!-- <div class="modal_img_item" v-for="item,index in current.printObject.prints" :key="item" > -->
<img v-lazy="item.path" alt="">
<sketchCategory :disignTypeList="designTypeList" :generateList="exhibitionList.print" :item="item" :isSpread="true" :isSetSketchCategory="true"></sketchCategory>
<div
class="delete_file_block"
v-if="current.printObject.ifSingle"
@click="deleteSelectptints(item,index)"
>
<span class="icon iconfont icon-shanchu"></span>
@@ -92,10 +92,9 @@
</div>
</div>
<div v-show="type_ == 1 || type_ == 3" @click.stop="setPreview" class="subitOkPreviewBtn" :class="[ !sketchImg?.id?!current?.id?'active':'':'' ]">{{ $t('DesignDetailEnd.preview') }}</div>
<div v-if="type_ == 2 && (current?.printObject?.prints?.length != 0 || printsList.length != 0)" @click.stop="setPrint" class="subitOkPreviewBtn Guide_1_23">{{ $t('DesignDetailEnd.Layout') }}</div>
<div v-if="type_ == 2 && (current?.printObject?.prints?.length != 0 || printsList.length != 0 || exhibitionList.print.length != 0)" @click.stop="setPrint" class="subitOkPreviewBtn Guide_1_23">{{ $t('DesignDetailEnd.Layout') }}</div>
<!-- <div v-else-if="type_ == 2 && designItemDetail?.clothes?.[currentIndex]?.printObject?.prints?.[0]?.path != null && current?.printObject?.prints?.[0]?.path == null" @click.stop="setPreview" class="subitOkPreviewBtn">{{ $t('DesignDetailEnd.preview') }}</div> -->
<div v-if="type_ == 4" @click.stop="setElemets" class="subitOkPreviewBtn">{{ $t('DesignDetailEnd.Layout') }}</div>
<div v-if="type_ == 4 && (elementsList.length != 0 || exhibitionList.elements.length != 0)" @click.stop="setElemets" class="subitOkPreviewBtn">{{ $t('DesignDetailEnd.Layout') }}</div>
<DesignPrintOperation v-if="!moible" ref="DesignPrintOperation"></DesignPrintOperation>
<DesignPrintOperationMobile v-else ref="DesignPrintOperationMobile"></DesignPrintOperationMobile>
<DesignElementsOperation v-if="!moible" ref="DesignElementsOperation"></DesignElementsOperation>

View File

@@ -40,10 +40,10 @@
<div class="print_right show_print_right Guide_1_25" :class="[driver__.driver?'showEvents':'']">
<div class="designOpenrtion_nav">
<div class="designOpenrtion_single" v-for="item,index in designOpenrtionList" :key="item" v-show="(stateOverallSingle == 'overall' && item.level2Type == 'Pattern') || stateOverallSingle == 'single'">
<img :src="item.path" @click="setpitch(item,index)">
<img :class="[(item.checked == true && overallSingle == false)?'active':'']" :src="item.path" @click="setpitch(item,index)">
</div>
<div class="designOpenrtion_single" v-for="item,index in designList" :key="item" v-show="(stateOverallSingle == 'overall' && item.level2Type == 'Pattern') || stateOverallSingle == 'single'">
<img :src="item.path" @click="setpitch(item,index)">
<img :class="[(item.checked == true && overallSingle == false)?'active':'']" :src="item.path" @click="setpitch(item,index)">
</div>
<!-- <div class="designOpenrtion_overall" v-show="!overallSingle">
<img :src="designOpenrtionList[0].path">
@@ -87,6 +87,7 @@
</div>
</div>
<!-- <img v-if="overallSingle" :src="current?.layersObject?.[1]?.maskUrl" alt="" class="designOpenrtion_sketch"> -->
<!-- {{printStyleList[stateOverallSingle][0]}} -->
<img :src="current?.path" alt="" class="designOpenrtion_sketch">
<img v-show="overallSingle" :src="current?.layersObject?.[1]?.maskUrl" alt="" class="designOpenrtion_sketch_mask">
<div class="designOpenrtion_btn">
@@ -104,9 +105,9 @@
<ul v-if="!overallSingle && printStyleList[stateOverallSingle][0]" :class="{active:printStyleList[stateOverallSingle][0]?.designOpenrtionBtn}" class="designOpenrtion_Mouoverall" :style="'left:'+printStyleList[stateOverallSingle][0]?.style?.left+';top:'+printStyleList[stateOverallSingle][0]?.style?.top+';'" @mousedown.stop="itemMoveMousedown(0,$event)">
<i class="fi fi-rr-arrows animtion1"></i>
<i class="fi fi-rr-arrows animtion2"></i>
<li class="designOpenrtion_delete" @click="deletePrint">
<!-- <li class="designOpenrtion_delete" @click="deletePrint">
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAACxAAAAsQHGLUmNAAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAdBJREFUSImt1r1uU0EQBeDPFh1pgBQEEwFVAg9BROhCAh1FAg1gkMA8DA0oKOEB3IEIRQgF4SEQBIUC6ENSGgPFXaPx+udeSxxppPXOzJnZ8e7MrRmPWdzANZxPv+EbvmILL/G9hGcADayjgz8l0kUb56qSX8dhBeJcDrFSRv44ZRQdt3EPczieZB5NvB1ymta4zCP5J1yucOIFfM6CDJykob8s73GiAnkPJ7Eb/H9iJhpsZJlPQh6D7AWe9Z5iFr+CIpalhjWspnXZ/pXA01FURkv/HxpxK+g2UE+yGfZXM5+doHt4DEtB2R5dAXdD9nfG2LVxNa2XKGreiziXGefZ5rKZbCLmg/4jHIWNqSEZ1fC0IrnE0bM5qqdFGWoV92RBf/P/S3RRVqI3YaOZGd8eQpgHXMt8HgTd67qi5fZwMzOO5XuREmim9ShEji04q78tLwSDSR/aYuD599DgeVDsY3pMhqOQt4pnUXlGf7PbTQ5VcQofgv8BTudGK/rb9Z6it5RhEV+CX1cxYoeiZXDg7OC+4vpNJbmkuC3vMtsuHpVltKzo55OOzINxmeeYxhPVhn5H0ftnhhGNeu49NBSjdBkX9H+27Cvu+Sv8GEXwF9+O3b1zwZqdAAAAAElFTkSuQmCC" alt="">
</li>
</li> -->
</ul>
</div>
</div>
@@ -287,6 +288,9 @@ export default defineComponent({
this.ifListOver()
if(this.current.printObject.prints)this.exhibitionOpenrtionList[this.stateOverallSingle] = JSON.parse(JSON.stringify(this.current.printObject.prints))
if(this.$parent.exhibitionList.print)this.designOpenrtionList = JSON.parse(JSON.stringify(this.$parent.exhibitionList.print))
if(this.overallSingle == false && this.designOpenrtionList.length > 0){
this.designOpenrtionList[0].checked = true
}
if(this.$parent.elementsList)this.designList = JSON.parse(JSON.stringify(this.$parent.printsList))
// this.overallSingle = this.current.ifSingle?false:this.current.ifSingle
let skecth = new Image
@@ -341,14 +345,27 @@ export default defineComponent({
}
// this.random()
},
async setpitch(item,index){
async setpitch(item,index,str){
await this.setPrintWH(item.path)
this.printStyleList[this.stateOverallSingle].forEach((v)=>{
v.designOpenrtionBtn = false
})
if(!this.overallSingle){
if(item.checked){
this.deletePrint()
item.checked = false
return
}else{
this.designOpenrtionList.forEach((itemElem)=>{
itemElem.checked = false
})
this.designList.forEach((itemElem)=>{
itemElem.checked = false
})
item.checked = true
}
this.printStyleList[this.stateOverallSingle][0] = JSON.parse(JSON.stringify(this.currentPrintStyleList))
this.refetchTemplate(0)
this.refetchTemplate(0,true)
this.exhibitionOpenrtionList[this.stateOverallSingle][0] = {
angle:0,
designType:item.designType,
@@ -359,7 +376,7 @@ export default defineComponent({
scale:.3,
location:[0,0]
}
this.systemDesignerPercentage = 30
this.systemDesignerPercentage = item.scale?item.scale*100:30
}else{
this.printStyleList[this.stateOverallSingle].push(JSON.parse(JSON.stringify(this.currentPrintStyleList)))
let currentIndex = this.printStyleList[this.stateOverallSingle].length-1
@@ -373,7 +390,7 @@ export default defineComponent({
scale:1,
location:[0,0]
})
this.refetchTemplate(currentIndex)
this.refetchTemplate(currentIndex,false)
}
},
//设置移动
@@ -518,11 +535,11 @@ export default defineComponent({
},
random(){
this.exhibitionOpenrtionList[this.stateOverallSingle].forEach((v,index)=>{
this.refetchTemplate(index)
this.refetchTemplate(index,false)
})
},
//随机重置图片顺序
refetchTemplate(index) {
refetchTemplate(index,boor) {
// let scale = (Math.trunc(Math.random()*15)+1)*.1
let rotateZ1 = Math.trunc(Math.random()*360)+1
let rotateZ2 = Math.trunc(Math.random()*360)+1
@@ -549,8 +566,8 @@ export default defineComponent({
top:0,
},
style:{
left:Math.trunc(Math.random()*x)+1+"px",
top:Math.trunc(Math.random()*y)+1+"px",
left:(boor?sketch.offsetWidth/2:Math.trunc(Math.random()*x)+1)+"px",
top:(boor?sketch.offsetHeight/2:Math.trunc(Math.random()*y)+1)+"px",
right:"auto",
bottom:"auto",
width:this.print.width.replace(/px/g,'')*scale+'px',
@@ -915,6 +932,10 @@ export default defineComponent({
img{
width: 100%;
cursor: pointer;
&.active{
opacity: .5;
transform: scale(.8);
}
}
.designOpenrtion_overall{
width: 80%;

View File

@@ -38,6 +38,20 @@
</div>
</div>
<div class="print_right show_print_right Guide_1_25" :class="[driver__?.driver?'showEvents':'']">
<div class="designOpenrtionMobile_nav">
<!-- <div class="designOpenrtionMobile_single" v-show="overallSingle" v-for="item,index in designOpenrtionList" :key="item" :class="{active:printStyleList[index]?.designOpenrtionBtn?printStyleList[index]?.designOpenrtionBtn:false}">
<img :src="item.path" @click="setpitch(item,index)">
</div> -->
<div class="designOpenrtionMobile_single" v-for="item,index in designOpenrtionList" :key="item" v-show="(stateOverallSingle == 'overall' && item.level2Type == 'Pattern') || stateOverallSingle == 'single'">
<img :class="[(item.checked == true && overallSingle == false)?'active':'']" :src="item.path" @click="setpitch(item,index)">
</div>
<div class="designOpenrtionMobile_single" v-for="item,index in designList" :key="item" v-show="(stateOverallSingle == 'overall' && item.level2Type == 'Pattern') || stateOverallSingle == 'single'">
<img :class="[(item.checked == true && overallSingle == false)?'active':'']" :src="item.path" @click="setpitch(item,index)">
</div>
<!-- <div class="designOpenrtionMobile_overall" v-show="!overallSingle">
<img :src="designOpenrtionList[0].path">
</div> -->
</div>
<div v-show="!overallSingle" class="habit_System_Designer">
<div class="habit_System_Designer_text">Scale</div>
<a-slider id="system_silder"
@@ -53,20 +67,7 @@
<input class="search_input" :placeholder="$t('DesignPrintOperation.inputContent')" type="Number" v-model="printAmount" @input="setprintAmount">
<i class="fi fi-rr-trash" @click="deletePrint"></i>
</div> -->
<div class="designOpenrtionMobile_nav">
<!-- <div class="designOpenrtionMobile_single" v-show="overallSingle" v-for="item,index in designOpenrtionList" :key="item" :class="{active:printStyleList[index]?.designOpenrtionBtn?printStyleList[index]?.designOpenrtionBtn:false}">
<img :src="item.path" @click="setpitch(item,index)">
</div> -->
<div class="designOpenrtionMobile_single" v-for="item,index in designOpenrtionList" :key="item" v-show="(stateOverallSingle == 'overall' && item.level2Type == 'Pattern') || stateOverallSingle == 'single'">
<img :src="item.path" @click="setpitch(item,index)">
</div>
<div class="designOpenrtionMobile_single" v-for="item,index in designList" :key="item" v-show="(stateOverallSingle == 'overall' && item.level2Type == 'Pattern') || stateOverallSingle == 'single'">
<img :src="item.path" @click="setpitch(item,index)">
</div>
<!-- <div class="designOpenrtionMobile_overall" v-show="!overallSingle">
<img :src="designOpenrtionList[0].path">
</div> -->
</div>
<div class="subitOkPreviewBtn" @click.stop="setPreview">{{ $t('DesignPrintOperation.preview') }}</div>
<div class="subitOkPreviewBtn Guide_1_25_1" :class="[driver__.driver?'hideEvents':'']" @click.stop="setOK">OK</div>
</div>
@@ -105,9 +106,9 @@
<ul v-if="!overallSingle && printStyleList[stateOverallSingle][0]" :class="{active:printStyleList[stateOverallSingle][0]?.designOpenrtionBtn}" class="designOpenrtionMobile_Mouoverall" :style="'left:'+printStyleList[stateOverallSingle][0]?.style?.left+';top:'+printStyleList[stateOverallSingle][0]?.style?.top+';'" @touchstart.stop="itemMoveMousedown(0,$event)">
<i class="fi fi-rr-arrows animtion1"></i>
<i class="fi fi-rr-arrows animtion2"></i>
<li class="designOpenrtionMobile__delete" @click="deletePrint">
<!-- <li class="designOpenrtionMobile__delete" @click="deletePrint">
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAACxAAAAsQHGLUmNAAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAdBJREFUSImt1r1uU0EQBeDPFh1pgBQEEwFVAg9BROhCAh1FAg1gkMA8DA0oKOEB3IEIRQgF4SEQBIUC6ENSGgPFXaPx+udeSxxppPXOzJnZ8e7MrRmPWdzANZxPv+EbvmILL/G9hGcADayjgz8l0kUb56qSX8dhBeJcDrFSRv44ZRQdt3EPczieZB5NvB1ymta4zCP5J1yucOIFfM6CDJykob8s73GiAnkPJ7Eb/H9iJhpsZJlPQh6D7AWe9Z5iFr+CIpalhjWspnXZ/pXA01FURkv/HxpxK+g2UE+yGfZXM5+doHt4DEtB2R5dAXdD9nfG2LVxNa2XKGreiziXGefZ5rKZbCLmg/4jHIWNqSEZ1fC0IrnE0bM5qqdFGWoV92RBf/P/S3RRVqI3YaOZGd8eQpgHXMt8HgTd67qi5fZwMzOO5XuREmim9ShEji04q78tLwSDSR/aYuD599DgeVDsY3pMhqOQt4pnUXlGf7PbTQ5VcQofgv8BTudGK/rb9Z6it5RhEV+CX1cxYoeiZXDg7OC+4vpNJbmkuC3vMtsuHpVltKzo55OOzINxmeeYxhPVhn5H0ftnhhGNeu49NBSjdBkX9H+27Cvu+Sv8GEXwF9+O3b1zwZqdAAAAAElFTkSuQmCC" alt="">
</li>
</li> -->
</ul>
</div>
</div>
@@ -288,7 +289,9 @@ export default defineComponent({
if(this.current.printObject.prints)this.exhibitionOpenrtionList[this.stateOverallSingle] = JSON.parse(JSON.stringify(this.current.printObject.prints))
if(this.$parent.exhibitionList.print)this.designOpenrtionList = JSON.parse(JSON.stringify(this.$parent.exhibitionList.print))
if(this.$parent.elementsList)this.designList = JSON.parse(JSON.stringify(this.$parent.printsList))
// this.overallSingle = this.current.ifSingle?false:this.current.ifSingle
if(this.overallSingle == false && this.designOpenrtionList.length > 0){
this.designOpenrtionList[0].checked = true
}
let skecth = new Image
skecth.src = this.current.path
skecth.onload=()=>{
@@ -347,7 +350,21 @@ export default defineComponent({
v.designOpenrtionBtn = false
})
if(!this.overallSingle){
if(item.checked){
this.deletePrint()
item.checked = false
return
}else{
this.designOpenrtionList.forEach((itemElem)=>{
itemElem.checked = false
})
this.designList.forEach((itemElem)=>{
itemElem.checked = false
})
item.checked = true
}
this.printStyleList[this.stateOverallSingle][0] = JSON.parse(JSON.stringify(this.currentPrintStyleList))
this.refetchTemplate(0,true)
this.exhibitionOpenrtionList[this.stateOverallSingle][0] = {
angle:0,
designType:item.designType,
@@ -358,8 +375,7 @@ export default defineComponent({
scale:.3,
location:[0,0]
}
this.refetchTemplate(0)
this.systemDesignerPercentage = 30
this.systemDesignerPercentage = item.scale?item.scale*100:30
}else{
this.printStyleList[this.stateOverallSingle].push(JSON.parse(JSON.stringify(this.currentPrintStyleList)))
let currentIndex = this.printStyleList[this.stateOverallSingle].length-1
@@ -373,7 +389,7 @@ export default defineComponent({
scale:1,
location:[0,0]
})
this.refetchTemplate(currentIndex)
this.refetchTemplate(currentIndex,false)
}
},
//设置移动
@@ -519,11 +535,11 @@ export default defineComponent({
},
random(){
this.exhibitionOpenrtionList[this.stateOverallSingle].forEach((v,index)=>{
this.refetchTemplate(index)
this.refetchTemplate(index,false)
})
},
//随机重置图片顺序
refetchTemplate(index) {
refetchTemplate(index,boor) {
// let scale = (Math.trunc(Math.random()*15)+1)*.1
let rotateZ1 = Math.trunc(Math.random()*360)+1
let rotateZ2 = Math.trunc(Math.random()*360)+1
@@ -550,8 +566,8 @@ export default defineComponent({
top:0,
},
style:{
left:Math.trunc(Math.random()*x)+1+"px",
top:Math.trunc(Math.random()*y)+1+"px",
left:(boor?sketch.offsetWidth/2:Math.trunc(Math.random()*x)+1)+"px",
top:(boor?sketch.offsetHeight/2:Math.trunc(Math.random()*y)+1)+"px",
right:"auto",
bottom:"auto",
width:this.print.width.replace(/px/g,'')*scale+'px',
@@ -567,7 +583,8 @@ export default defineComponent({
}
},
//设置图片
setTemplate(item,index) {
async setTemplate(item,index) {
await this.setPrintWH(item.path)
this.designOpenrtionList
let sketch = document.getElementsByClassName("designOpenrtionMobile_modal")[0]?.getElementsByClassName('designOpenrtionMobile_sketch')[0]
let sketchNum = this.sketch.width.replace(/rem/g,'')*10/sketch.offsetWidth
@@ -952,6 +969,10 @@ export default defineComponent({
img{
width: 100%;
cursor: pointer;
&.active{
opacity: .5;
transform: scale(.8);
}
}
.designOpenrtionMobile_overall{
width: 80%;

View File

@@ -31,7 +31,7 @@
<i class="icon iconfont icon-move" @click="setOperation('move')" :class="{active:canvasState == 'move'}"></i>
<i class="icon iconfont icon-bianji" @click="setOperation('pencil')" :class="{active:canvasState == 'pencil'}"></i>
<i class="icon iconfont icon-xiangpi_huaban1" @click="setOperation('eraser')" :class="{active:canvasState == 'eraser'}"></i>
<input type="range" v-show="canvasState != 'move'" @input="setPencilWidth" min="1" max="50" v-model="canvasPencilWidth">
<input type="range" v-show="canvasState != 'move'" @input="setPencilWidth" min="1" max="50" v-model="canvasPencilWidth[canvasState]">
<div class="icon iconfont icon-xiala" :class="{btnRotate:spreadState}" @click="()=>spreadState = !spreadState"></div>
</div>
</div>
@@ -76,7 +76,10 @@ export default defineComponent({
let exportWH = 512
let canvasBtn = reactive({
canvasState:'move',
canvasPencilWidth:4,
canvasPencilWidth:{
pencil:4,
eraser:4,
},
spreadState:false,
})
let canvasWH = ref(0);
@@ -166,7 +169,7 @@ export default defineComponent({
}
let rgba = 'rgba(0, 0, 0, 1)'
let brushIndicator = new fabric.Circle({
radius:(canvasBtn.canvasPencilWidth/2),
radius:(canvasBtn.canvasPencilWidth[canvasBtn.canvasState]/2),
fill: '#fff',
stroke: '#000',
strokeWidth: 1,
@@ -198,7 +201,7 @@ export default defineComponent({
let setPencil = ()=>{
canvas.isDrawingMode = true//开启绘画模式
canvas.freeDrawingBrush = new fabric.PencilBrush(canvas,{});
canvas.freeDrawingBrush.width = Number(canvasBtn.canvasPencilWidth);
canvas.freeDrawingBrush.width = Number(canvasBtn.canvasPencilWidth[canvasBtn.canvasState]);
canvas.freeDrawingBrush.color = rgba
brushIndicator.set('fill',rgba)
canvas.freeDrawingBrush.isEraser = false
@@ -210,7 +213,7 @@ export default defineComponent({
brushIndicator.set({fill: '#fff'});
canvas.requestRenderAll();
canvas.freeDrawingBrush.isEraser = true
canvas.freeDrawingBrush.width = Number(canvasBtn.canvasPencilWidth);
canvas.freeDrawingBrush.width = Number(canvasBtn.canvasPencilWidth[canvasBtn.canvasState]);
}
let deleteObj = ()=> {
// if(!canvas.getActiveObjects()){
@@ -231,7 +234,7 @@ export default defineComponent({
let setPencilWidth = ()=>{//切换颜色给铅笔设置颜色
clearTimeout(setTimeOutWidth)
setTimeOutWidth = setTimeout(()=>{
canvas.freeDrawingBrush.width = Number(canvasBtn.canvasPencilWidth)
canvas.freeDrawingBrush.width = Number(canvasBtn.canvasPencilWidth[canvasBtn.canvasState])
},300)
}
let updateCanvasState = () =>{

View File

@@ -169,6 +169,9 @@
<habitSetStyle ref="habitSetStyle" @setParentData=setParentData @setWorkspaceStyle=setWorkspaceStyle></habitSetStyle>
</div>
</div>
<div class="mark_loading" v-show="isShowMark">
<a-spin size="large" />
</div>
</template>
<script lang="ts">
import { useStore } from "vuex";
@@ -242,6 +245,7 @@ export default defineComponent({
])
const {t} = useI18n()
let styleList = ref([])
let isShowMark = ref(true)
return{
systemSeleves,
mannequins,
@@ -256,7 +260,8 @@ export default defineComponent({
sex,
position,
t,
styleList
styleList,
isShowMark
}
},
watch:{
@@ -493,43 +498,44 @@ export default defineComponent({
getDetail(id:any){//
Https.axiosGet(Https.httpUrls.workspaceDetail,{params:{id:id}}).then((rv: any) => {
if (rv) {
this.isShowMark = false
if(rv.position == "Overall"){
rv.overallSingle = false
}else{
rv.overallSingle = true
}
rv.keyWord = {
Moodboard:[{
name:'Moodboard',
id:1,
},{
name:'Moodboard',
id:2,
},{
name:'Moodboard',
id:3,
}],
Printboard:[{
name:'Printboard',
id:1,
},{
name:'Printboard',
id:2,
},{
name:'Printboard',
id:3,
}],
Sketchboard:[{
name:'Sketchboard',
id:1,
},{
name:'Sketchboard',
id:2,
},{
name:'Sketchboard',
id:3,
}],
}
// rv.allKeywordsByStyle = {
// Moodboard:[{
// name:'Moodboard',
// id:1,
// },{
// name:'Moodboard',
// id:2,
// },{
// name:'Moodboard',
// id:3,
// }],
// Printboard:[{
// name:'Printboard',
// id:1,
// },{
// name:'Printboard',
// id:2,
// },{
// name:'Printboard',
// id:3,
// }],
// Sketchboard:[{
// name:'Sketchboard',
// id:1,
// },{
// name:'Sketchboard',
// id:2,
// },{
// name:'Sketchboard',
// id:3,
// }],
// }
rv.putName = false
this.workspaceItem = rv
this.setMannequinsSex()
@@ -810,7 +816,8 @@ export default defineComponent({
// this.store.commit("setTemplateData", event);
// },
setWorkspaceStyle(data: any){
this.workspaceItem.styleId = data
this.workspaceItem.styleId = data.id
this.workspaceItem.styleName = data.name
this.putWorkspace(this.workspaceItem,this.workspaceItem.id)
},
setStyle(){

View File

@@ -29,9 +29,15 @@
</div>
</div>
</div>
<div class="habitSetStyle_ok started_btn" @click="setOk">
OK
<div class="habitSetStyle_ok">
<div class="started_btn" @click="setOk()">
OK
</div>
<div class="started_btn" @click="setClear()">
Clear
</div>
</div>
</div>
<div class="mark_loading" v-show="isShowMark">
<a-spin size="large" />
@@ -42,11 +48,12 @@
<script lang="ts">
import { defineComponent,watch,createVNode, h, ref ,toRefs,computed,reactive,triggerRef, nextTick} from "vue";
// import { getCookie } from "@/tool/cookie";
import { message,Modal } from "ant-design-vue";
import { LoadingOutlined ,ExclamationCircleOutlined} from "@ant-design/icons-vue";
import { Https } from "@/tool/https";
import { getCookie,setCookie } from "@/tool/cookie";
// import domTurnImg from '@/tool/domTurnImg'
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
import { Modal,message } from 'ant-design-vue';
import { downloadIamge } from "@/tool/util";
export default defineComponent({
@@ -55,6 +62,7 @@ emits:['setParentData','setWorkspaceStyle'],
setup(props,{emit}) {
let habitSetStyle: any = ref(false);//弹窗
let habitSetStyleMask:any = ref(false)//弹窗遮罩
let oldDataId = ''
let habitSetStyleData:any = reactive({
styleList:[],
selectStyle:{
@@ -85,6 +93,7 @@ setup(props,{emit}) {
if(habitSetStyleData.styleList.length == 0){
getStyleList()
}
oldDataId = data.styleId
habitSetStyleData.selectStyle.id = data.styleId
habitSetStyleData.selectStyle.name = data.styleName
// habitSetStyleData.selectStyleId = 'feng2'
@@ -108,8 +117,38 @@ setup(props,{emit}) {
cleardata()
}
let setOk= ()=>{
emit('setWorkspaceStyle',habitSetStyleData.selectStyle.id)
cleardata()
let data = {
id:habitSetStyleData.selectStyle.id,
name:habitSetStyleData.selectStyle.name,
isRevampModel:false,
}
if(oldDataId == data.id){
cleardata()
}else{
let _this = this
Modal.confirm({
title: 'It is detected that you have modified the style, may I ask whether the model is changed to the model corresponding to the style',
icon: createVNode(ExclamationCircleOutlined),
okText: 'Yes',
cancelText: 'No',
mask:false,
centered:true,
zIndex:1050,
onOk() {
data.isRevampModel = true
emit('setWorkspaceStyle',data)
cleardata()
},
onCancel() {
emit('setWorkspaceStyle',data)
cleardata()
},
});
}
}
let setClear = ()=>{
habitSetStyleData.selectStyle.id = ''
habitSetStyleData.selectStyle.name = ''
}
let setItemSelect = (item:any)=>{
habitSetStyleData.selectStyle = item
@@ -123,6 +162,7 @@ setup(props,{emit}) {
cancelDsign,
setItemSelect,
setOk,
setClear,
};
},
data() {
@@ -231,6 +271,11 @@ methods: {
width: 60%;
text-align: center;
margin: 0 auto;
display: flex;
justify-content: space-around;
>div{
width: 40%;
}
}
}