2023-11-6-1
This commit is contained in:
@@ -245,18 +245,6 @@ export default defineComponent({
|
||||
window.removeEventListener('beforeunload',beforeunload)
|
||||
}
|
||||
window.addEventListener('beforeunload',beforeunload)
|
||||
let onresizeTime:any
|
||||
let this_ = this
|
||||
window.onresize = () => {
|
||||
return (() => {
|
||||
clearTimeout(onresizeTime)
|
||||
onresizeTime = setTimeout(async ()=>{
|
||||
await this_.setImgSize()
|
||||
},500)
|
||||
|
||||
})()
|
||||
}
|
||||
|
||||
let userInfo:any = getCookie("userInfo")
|
||||
this.userInfo = JSON.parse(userInfo);
|
||||
// let url = Https.httpUrls.getDesignDetail + `?designItemId=34242&designPythonOutfitId=34004`
|
||||
@@ -408,6 +396,17 @@ export default defineComponent({
|
||||
height:body.layersObject[0].imageSize?.[1]*ratio+'px',
|
||||
}
|
||||
}
|
||||
let onresizeTime:any
|
||||
let this_ = this
|
||||
window.onresize = () => {
|
||||
return (() => {
|
||||
clearTimeout(onresizeTime)
|
||||
onresizeTime = setTimeout(async ()=>{
|
||||
await this_.setImgSize()
|
||||
},500)
|
||||
|
||||
})()
|
||||
}
|
||||
this.frontBack = {
|
||||
front:front,
|
||||
back:back,
|
||||
|
||||
@@ -259,14 +259,12 @@ export default defineComponent({
|
||||
hex = '#FFFFFF'
|
||||
}
|
||||
this.selectIndex = index
|
||||
this.selectColor = color?.r ? {rgba:{r:color.r,g:color.g,b:color.b,a:color.a? color.a: 1},hex:hex} : {}
|
||||
// this.fileList = []
|
||||
this.tcxColor = ''
|
||||
this.pantongName = ''
|
||||
this.pantongNameList = []
|
||||
// this.selectColorList= []
|
||||
this.reviewColor= {}
|
||||
this.getColorBg = false
|
||||
// this.selectColor = color?.r ? {rgba:{r:color.r,g:color.g,b:color.b,a:color.a? color.a: 1},hex:hex} : {}
|
||||
},
|
||||
|
||||
//通过tcx获取颜色
|
||||
|
||||
@@ -69,10 +69,11 @@
|
||||
:before-upload="beforeUpload"
|
||||
v-model:file-list="fileList"
|
||||
multiple
|
||||
:maxCount="8 - moodboarList.length+fileList.length"
|
||||
:maxCount="8 - moodboarList.length+fileList.length"
|
||||
accept=".jpg,.png,.jpeg,.bmp"
|
||||
@change="(file) => fileUploadChange(file)"
|
||||
>
|
||||
|
||||
<div
|
||||
class="upload_tip_block"
|
||||
v-show=" moodboarList.length < 8"
|
||||
@@ -84,6 +85,10 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="upload_max_tip">
|
||||
<span class="icon iconfont icon-zhuyi"></span>
|
||||
<span>{{ $t('MoodboardUpload.Maximum') }}</span>
|
||||
</div>
|
||||
<!-- <div class="upload_max_tip">
|
||||
<span class="icon iconfont icon-zhuyi"></span>
|
||||
<span
|
||||
@@ -536,6 +541,8 @@ export default defineComponent({
|
||||
height: 30rem;
|
||||
overflow-x: hidden;
|
||||
border-right: 1px solid #e5e5e5;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
&.moodboard_body::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
@@ -592,6 +599,7 @@ export default defineComponent({
|
||||
margin: 0 1rem 1rem 0;
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
overflow: hidden;
|
||||
img{
|
||||
width: auto;
|
||||
height: 100%;
|
||||
|
||||
@@ -78,6 +78,10 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="upload_max_tip">
|
||||
<span class="icon iconfont icon-zhuyi"></span>
|
||||
<span>{{ $t('PrintboardUpload.Maximum') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<Material v-show="openClick == 2" ref="Material" msg="Printboard" @confirmSelect="confirmSelect"></Material>
|
||||
<Generate v-show="openClick == 3" ref="Generate" msg="Printboard" @generateCheckbox="getgenerateCheckbox"></Generate>
|
||||
@@ -638,6 +642,8 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
.printboard_body{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
// height: calc(100% - 5rem);
|
||||
flex: 1;
|
||||
padding-top: 2.5rem;
|
||||
@@ -726,6 +732,18 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
}
|
||||
.upload_max_tip {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 1.4rem;
|
||||
color: #030303;
|
||||
|
||||
.icon-zhuyi {
|
||||
font-size: 1.6rem;
|
||||
margin-right: 0.7rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.delete_like_file_block{
|
||||
@@ -788,6 +806,7 @@ export default defineComponent({
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
overflow: hidden;
|
||||
img{
|
||||
width: auto;
|
||||
height: 100%;
|
||||
|
||||
@@ -138,6 +138,10 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="upload_max_tip">
|
||||
<span class="icon iconfont icon-zhuyi"></span>
|
||||
<span>{{ $t('SketchboardUpload.Maximum') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<Material
|
||||
@@ -700,12 +704,14 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
.sketchboard_body {
|
||||
// height: calc(100% - 5rem);
|
||||
flex: 1;
|
||||
padding-top: 2.5rem;
|
||||
height: 30rem;
|
||||
overflow-x: hidden;
|
||||
border-right: 1px solid #e5e5e5;
|
||||
// height: calc(100% - 5rem);
|
||||
flex: 1;
|
||||
padding-top: 2.5rem;
|
||||
height: 30rem;
|
||||
overflow-x: hidden;
|
||||
border-right: 1px solid #e5e5e5;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
&.moodboard_body::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
@@ -783,7 +789,18 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.upload_max_tip {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 1.4rem;
|
||||
color: #030303;
|
||||
|
||||
.icon-zhuyi {
|
||||
font-size: 1.6rem;
|
||||
margin-right: 0.7rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.delete_like_file_block{
|
||||
@@ -847,6 +864,7 @@ export default defineComponent({
|
||||
position: relative;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
overflow: hidden;
|
||||
img{
|
||||
// width: 100%;
|
||||
width: auto;
|
||||
|
||||
@@ -280,13 +280,9 @@ export default defineComponent({
|
||||
// imgBoxSize.style.backgroundImage = 'url('+require('@assets/images/library/lemaleBG.png')')'
|
||||
|
||||
let cropper:any = this.$refs.cropper
|
||||
console.log(cropper);
|
||||
|
||||
cropper.cropH = cropper.scale*cropper.trueHeight
|
||||
cropper.cropW = cropper.cropH/2.125
|
||||
cropper.cropOffsertX = cropper.getImgAxis().x1+(cropper.scale*cropper.trueWidth/2-cropper.cropW/2)
|
||||
console.log(cropper.getImgAxis().x1,cropper.scale*cropper.trueWidth/2,cropper.cropW/2);
|
||||
|
||||
cropper.cropOffsertY = cropper.getImgAxis().y1
|
||||
imgBoxSize.addEventListener('mousemove',this.startMove)
|
||||
this.setImageSize()
|
||||
@@ -307,7 +303,6 @@ export default defineComponent({
|
||||
let position = imgBoxSize.getBoundingClientRect()
|
||||
let position1 = imgbox.getBoundingClientRect()
|
||||
let cropper:any = this.$refs.cropper
|
||||
console.log(position1,position);
|
||||
this.imgBox = {
|
||||
width:cropper.cropW,
|
||||
height:cropper.cropH,
|
||||
@@ -387,8 +382,8 @@ export default defineComponent({
|
||||
|
||||
},
|
||||
setPoint(){
|
||||
console.log();
|
||||
let printObject = JSON.parse(JSON.stringify(this.printObject))
|
||||
let file = this.printObject.file
|
||||
let url = this.printObject.url
|
||||
this.printObject = {
|
||||
"shoulderLeft": [
|
||||
0.3338,
|
||||
@@ -414,8 +409,8 @@ export default defineComponent({
|
||||
0.6764,
|
||||
0.4715
|
||||
],
|
||||
file:printObject.file,
|
||||
url:printObject.url
|
||||
file:file,
|
||||
url:url
|
||||
}
|
||||
this.getDefaultPointList(this.imgBox,'setPoint')
|
||||
},
|
||||
@@ -506,8 +501,6 @@ export default defineComponent({
|
||||
this.moveOriginal.posX = 0
|
||||
this.moveOriginal.posY = 0 // 1为边框
|
||||
|
||||
console.log(this.moveOriginal);
|
||||
|
||||
this.startDian = true
|
||||
}
|
||||
|
||||
@@ -554,8 +547,6 @@ export default defineComponent({
|
||||
|
||||
restoreLocationList(){
|
||||
this.locationList = []
|
||||
console.log(this.locationList);
|
||||
|
||||
this.pointList = JSON.parse(JSON.stringify(this.oldPointList))
|
||||
this.locationList = JSON.parse(JSON.stringify(this.oldLocationList))
|
||||
},
|
||||
@@ -571,27 +562,42 @@ export default defineComponent({
|
||||
// })
|
||||
let cropper:any = this.$refs.cropper,
|
||||
that = this
|
||||
|
||||
cropper.getCropData(async (value:any) => {
|
||||
// 转换为File对象
|
||||
|
||||
if(this.printObject.templateId){
|
||||
this.printObject.id = this.printObject.libraryId
|
||||
this.confrimSubmit()
|
||||
}else{
|
||||
let file:any = base64toFile(value,this.printObject.file.name);
|
||||
// console.log(file,this.printObject,'-=-=--==-');
|
||||
file.uid = this.printObject.file.uid
|
||||
this.printObject.file = file
|
||||
this.customRequest().then((rv:any)=>{
|
||||
this.isShowMark = false
|
||||
this.printObject.id = rv.id
|
||||
if(this.userInfo.userId == 88 || this.userInfo.userId == 83){
|
||||
if(this.modelType == 'System'){
|
||||
if(this.printObject.templateId){
|
||||
this.printObject.id = this.printObject.libraryId
|
||||
this.confrimSubmit()
|
||||
}).catch((res:any)=>{
|
||||
this.isShowMark = false
|
||||
}else{
|
||||
this.customRequest().then((rv:any)=>{
|
||||
this.isShowMark = false
|
||||
this.printObject.id = rv.id
|
||||
this.confrimSubmit()
|
||||
}).catch((res:any)=>{
|
||||
this.isShowMark = false
|
||||
})
|
||||
}
|
||||
}else{
|
||||
cropper.getCropData(async (value:any) => {
|
||||
// 转换为File对象
|
||||
if(this.printObject.templateId){
|
||||
this.printObject.id = this.printObject.libraryId
|
||||
this.confrimSubmit()
|
||||
}else{
|
||||
let file:any = base64toFile(value,this.printObject.file.name);
|
||||
file.uid = this.printObject.file.uid
|
||||
this.printObject.file = file
|
||||
this.customRequest().then((rv:any)=>{
|
||||
this.isShowMark = false
|
||||
this.printObject.id = rv.id
|
||||
this.confrimSubmit()
|
||||
}).catch((res:any)=>{
|
||||
this.isShowMark = false
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
confrimSubmit(){
|
||||
|
||||
Reference in New Issue
Block a user