Merge remote-tracking branch 'origin/StableVersion' into develop
This commit is contained in:
5
.env.dev
5
.env.dev
@@ -1,8 +1,9 @@
|
|||||||
NODE_ENV = 'development'
|
NODE_ENV = 'development'
|
||||||
# VUE_APP_BASE_URL = 'https://develop.api.aida.com.hk'
|
# VUE_APP_BASE_URL = 'https://develop.api.aida.com.hk'
|
||||||
VUE_APP_BASE_URL = 'https://api.aida.com.hk'
|
# VUE_APP_BASE_URL = 'https://api.aida.com.hk'
|
||||||
|
|
||||||
# VUE_APP_BASE_URL = 'http://18.167.251.121:10086'
|
# VUE_APP_BASE_URL = 'http://18.167.251.121:10086'
|
||||||
# VUE_APP_BASE_URL = 'https://develop.api.aida.com.hk'
|
# VUE_APP_BASE_URL = 'https://develop.api.aida.com.hk'
|
||||||
# VUE_APP_BASE_URL = 'http://192.168.1.9:17088'
|
# VUE_APP_BASE_URL = 'http://192.168.1.9:17088'
|
||||||
# VUE_APP_BASE_URL = 'http://192.168.1.7:5567'
|
VUE_APP_BASE_URL = 'http://192.168.1.7:5567'
|
||||||
|
# VUE_APP_BASE_URL = 'http://192.168.1.9:5567'
|
||||||
|
|||||||
@@ -141,7 +141,6 @@ export default defineComponent({
|
|||||||
//获取列表
|
//获取列表
|
||||||
gettrialList() {
|
gettrialList() {
|
||||||
Https.axiosGet(Https.httpUrls.inquiryGetTrial).then((rv)=>{
|
Https.axiosGet(Https.httpUrls.inquiryGetTrial).then((rv)=>{
|
||||||
console.log(rv);
|
|
||||||
this.dataList = rv
|
this.dataList = rv
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -86,7 +86,7 @@
|
|||||||
<i v-else class="fi fi-rr-picture centent clothes_item_icon" @click="openCurrent(1)"></i>
|
<i v-else class="fi fi-rr-picture centent clothes_item_icon" @click="openCurrent(1)"></i>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="clothes_detail_item clothes_detail_item_print" :class="[current.id?'':'hideCursor']">
|
<div class="clothes_detail_item clothes_detail_item_print" :class="[current?.id?'':'hideCursor']">
|
||||||
<div class="clothes_item_header">
|
<div class="clothes_item_header">
|
||||||
<i class="fi fi-rs-comments"></i>
|
<i class="fi fi-rs-comments"></i>
|
||||||
<div>{{ $t('DesignDetail.CurrentPrint') }}</div>
|
<div>{{ $t('DesignDetail.CurrentPrint') }}</div>
|
||||||
@@ -100,7 +100,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="clothes_detail_item clothes_detail_item_color" :class="[current.id?'':'hideCursor']">
|
<div class="clothes_detail_item clothes_detail_item_color" :class="[current?.id?'':'hideCursor']">
|
||||||
<div class="clothes_item_header">
|
<div class="clothes_item_header">
|
||||||
<i class="fi fi-rs-comments"></i>
|
<i class="fi fi-rs-comments"></i>
|
||||||
<div>{{ $t('DesignDetail.CurrentColor') }}</div>
|
<div>{{ $t('DesignDetail.CurrentColor') }}</div>
|
||||||
@@ -676,7 +676,7 @@ export default defineComponent({
|
|||||||
changed:item.changed?item.changed:false,
|
changed:item.changed?item.changed:false,
|
||||||
designType:item.designType?item.designType:"Library",
|
designType:item.designType?item.designType:"Library",
|
||||||
offset:item.layersObject?.[1]?.offset == null?[0,0]:item.layersObject[1].offset,
|
offset:item.layersObject?.[1]?.offset == null?[0,0]:item.layersObject[1].offset,
|
||||||
scale:item.layersObject?.[1]?.scale?item.layersObject[1].scale:1,
|
scale:item.layersObject?.[1]?.scale?item.layersObject[1].scale:[1,1],
|
||||||
printObject:{
|
printObject:{
|
||||||
ifSingle:item.printObject.ifSingle == null ? false : item.printObject.ifSingle,
|
ifSingle:item.printObject.ifSingle == null ? false : item.printObject.ifSingle,
|
||||||
// path:item.printObject.path?item.printObject.path :'',
|
// path:item.printObject.path?item.printObject.path :'',
|
||||||
@@ -850,7 +850,9 @@ export default defineComponent({
|
|||||||
|
|
||||||
}else{
|
}else{
|
||||||
this.deleteShow = false
|
this.deleteShow = false
|
||||||
|
|
||||||
let designItemDetail = JSON.parse(JSON.stringify(this.designItemDetail))
|
let designItemDetail = JSON.parse(JSON.stringify(this.designItemDetail))
|
||||||
|
|
||||||
let data:any = this.setSubmitItem('preview',true)
|
let data:any = this.setSubmitItem('preview',true)
|
||||||
if(!this.deleteItemShow){
|
if(!this.deleteItemShow){
|
||||||
return
|
return
|
||||||
@@ -861,6 +863,12 @@ export default defineComponent({
|
|||||||
designItemDetail.currentFullBodyView = rv.currentFullBodyView
|
designItemDetail.currentFullBodyView = rv.currentFullBodyView
|
||||||
designItemDetail.ifSubmit = true
|
designItemDetail.ifSubmit = true
|
||||||
this.loadingShow = false
|
this.loadingShow = false
|
||||||
|
// if(this.designItemDetail.clothes[this.designItemDetail.clothes.legnth-1] && !this.designItemDetail.clothes[this.designItemDetail.clothes.legnth-1].id){
|
||||||
|
// this.designItemDetail.clothes.split(this.designItemDetail.clothes.legnth-1,1)
|
||||||
|
// }
|
||||||
|
if(data.clothes[data.clothes.legnth-1] && !data.clothes[data.clothes.legnth-1].id){
|
||||||
|
data.clothes.split(data.clothes.legnth-1,1)
|
||||||
|
}
|
||||||
this.store.commit("setDesignItemDetail", designItemDetail);
|
this.store.commit("setDesignItemDetail", designItemDetail);
|
||||||
this.store.commit("setDesignPreviewData", data);
|
this.store.commit("setDesignPreviewData", data);
|
||||||
this.setRevocation(designItemDetail,data)
|
this.setRevocation(designItemDetail,data)
|
||||||
@@ -931,6 +939,7 @@ export default defineComponent({
|
|||||||
"minIOPath": "",
|
"minIOPath": "",
|
||||||
"color": color,
|
"color": color,
|
||||||
gradient:gradient,
|
gradient:gradient,
|
||||||
|
priority:10,
|
||||||
"printObject": {
|
"printObject": {
|
||||||
"ifSingle": null,
|
"ifSingle": null,
|
||||||
"prints": [
|
"prints": [
|
||||||
@@ -944,10 +953,10 @@ export default defineComponent({
|
|||||||
// let DesignDetailAlter:any = this.$refs.DesignDetailAlter
|
// let DesignDetailAlter:any = this.$refs.DesignDetailAlter
|
||||||
// DesignDetailAlter.changePlace()
|
// DesignDetailAlter.changePlace()
|
||||||
this.designOrder = true
|
this.designOrder = true
|
||||||
if(this.designItemDetail.clothes?.[this.designItemDetail?.clothes.length-1]?.id){
|
if(this.designItemDetail.clothes?.[this.designItemDetail?.clothes.length-1]?.id || this.designItemDetail.clothes?.length == 0){
|
||||||
this.designItemDetail.clothes.push(aa)
|
this.designItemDetail.clothes.push(aa)
|
||||||
}else{
|
}else{
|
||||||
|
return
|
||||||
}
|
}
|
||||||
this.clothesDetail(aa,this.designItemDetail.clothes.length-1)
|
this.clothesDetail(aa,this.designItemDetail.clothes.length-1)
|
||||||
let DesignDetailAlter:any = this.$refs.DesignDetailAlter
|
let DesignDetailAlter:any = this.$refs.DesignDetailAlter
|
||||||
@@ -971,8 +980,13 @@ export default defineComponent({
|
|||||||
let designItemDetail = JSON.parse(JSON.stringify(this.store.state.DesignDetailModule.designItemDetail))
|
let designItemDetail = JSON.parse(JSON.stringify(this.store.state.DesignDetailModule.designItemDetail))
|
||||||
|
|
||||||
this.designOrder = true
|
this.designOrder = true
|
||||||
this.current = designItemDetail.clothes[index]
|
if(clothes){
|
||||||
if(this.current.id && !designItemDetail.clothes[designItemDetail.clothes.length-1].id){
|
this.current = clothes
|
||||||
|
}else{
|
||||||
|
this.current = designItemDetail.clothes[index]
|
||||||
|
}
|
||||||
|
if(!this.current) return
|
||||||
|
if(this.current?.id && !designItemDetail?.clothes[designItemDetail.clothes.length-1].id){
|
||||||
designItemDetail.clothes.splice(designItemDetail.clothes.length-1,1)
|
designItemDetail.clothes.splice(designItemDetail.clothes.length-1,1)
|
||||||
this.store.commit('setDesignItemDetail',designItemDetail)
|
this.store.commit('setDesignItemDetail',designItemDetail)
|
||||||
}
|
}
|
||||||
@@ -985,6 +999,7 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
this.currentIndex = this.currentIndex>0?this.currentIndex:0
|
||||||
data.designSingleItemDTOList[this.currentIndex] = {
|
data.designSingleItemDTOList[this.currentIndex] = {
|
||||||
color:`${this.current.color.r} ${this.current.color.g} ${this.current.color.b}`,
|
color:`${this.current.color.r} ${this.current.color.g} ${this.current.color.b}`,
|
||||||
|
|
||||||
@@ -994,7 +1009,7 @@ export default defineComponent({
|
|||||||
path:this.current.minIOPath?this.current.minIOPath:'',
|
path:this.current.minIOPath?this.current.minIOPath:'',
|
||||||
offset:this.current.layersObject?.[1]?.offset?this.current.layersObject[1].offset:[0,0],
|
offset:this.current.layersObject?.[1]?.offset?this.current.layersObject[1].offset:[0,0],
|
||||||
priority:this.current.priority,
|
priority:this.current.priority,
|
||||||
scale:this.current.layersObject?.[1]?.scale?this.current.layersObject[1].scale:1,
|
scale:this.current.layersObject?.[1]?.scale?this.current.layersObject[1].scale:[1,1],
|
||||||
printObject:{
|
printObject:{
|
||||||
ifSingle:this.current?.printObject?.ifSingle == null ? false : this.current?.printObject?.ifSingle,
|
ifSingle:this.current?.printObject?.ifSingle == null ? false : this.current?.printObject?.ifSingle,
|
||||||
// prints:this.current?.printObject[0]?.path == null ? [] : [{
|
// prints:this.current?.printObject[0]?.path == null ? [] : [{
|
||||||
@@ -1195,7 +1210,8 @@ export default defineComponent({
|
|||||||
position: relative;
|
position: relative;
|
||||||
width: auto;
|
width: auto;
|
||||||
max-height: 100%;
|
max-height: 100%;
|
||||||
|
max-width: 100%;
|
||||||
|
object-fit: contain;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
transform: translateY(-50%);
|
transform: translateY(-50%);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -566,7 +566,17 @@ export default defineComponent({
|
|||||||
init(num){
|
init(num){
|
||||||
this.type_ = num
|
this.type_ = num
|
||||||
this.select = true
|
this.select = true
|
||||||
let arr = this.current.color
|
let arr
|
||||||
|
if(this.current?.color){
|
||||||
|
arr = this.current.color
|
||||||
|
}else{
|
||||||
|
arr = {
|
||||||
|
r: 0,
|
||||||
|
g: 0,
|
||||||
|
b: 0,
|
||||||
|
a:1,
|
||||||
|
}
|
||||||
|
}
|
||||||
// if(!arr[3]){
|
// if(!arr[3]){
|
||||||
// arr[3] = 1
|
// arr[3] = 1
|
||||||
// }
|
// }
|
||||||
|
|||||||
@@ -60,7 +60,7 @@
|
|||||||
<img v-show="type_==1" class="result_appare_img" :src="sketchImg?.path?sketchImg?.path:current?.path" :title="current?.type">
|
<img v-show="type_==1" class="result_appare_img" :src="sketchImg?.path?sketchImg?.path:current?.path" :title="current?.type">
|
||||||
<!-- <img v-show="type_==2" class="result_print_img" :src="current?.path" :title="current?.type" @click="setPrint"> -->
|
<!-- <img v-show="type_==2" class="result_print_img" :src="current?.path" :title="current?.type" @click="setPrint"> -->
|
||||||
<div v-show="type_==2" class="result_print_img" @click="setPrint" :title="current?.type">
|
<div v-show="type_==2" class="result_print_img" @click="setPrint" :title="current?.type">
|
||||||
<img v-for="item in current.layersObject" :src="item.imageUrl" alt="">
|
<img v-for="item in current?.layersObject" :src="item.imageUrl" alt="">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -84,7 +84,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</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-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?.[0]?.path != null" @click.stop="setPrint" class="subitOkPreviewBtn Guide_1_23">{{ $t('DesignDetailEnd.Layout') }}</div>
|
<div v-if="type_ == 2 && current?.printObject?.prints?.[0]?.path != null" @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-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>
|
||||||
<DesignPrintOperation v-if="!moible" ref="DesignPrintOperation"></DesignPrintOperation>
|
<DesignPrintOperation v-if="!moible" ref="DesignPrintOperation"></DesignPrintOperation>
|
||||||
@@ -189,7 +189,7 @@ export default defineComponent({
|
|||||||
this.type_ = num
|
this.type_ = num
|
||||||
this.colorList[this.selectIndex] = this.$parent.selectColor
|
this.colorList[this.selectIndex] = this.$parent.selectColor
|
||||||
this.overallSingle = this.current?.printObject?.ifSingle == null?false:this.current?.printObject?.ifSingle
|
this.overallSingle = this.current?.printObject?.ifSingle == null?false:this.current?.printObject?.ifSingle
|
||||||
this.systemDesignerPercentage = this.current?.printObject?.scale?this.current?.printObject?.scale:.3*100
|
this.systemDesignerPercentage = this.current?.printObject?.ifSingle?100:this.current?.printObject?.prints[0].scale?this.current?.printObject?.prints[0].scale*100:100
|
||||||
},
|
},
|
||||||
//模型
|
//模型
|
||||||
setSketchImg(v){
|
setSketchImg(v){
|
||||||
@@ -304,13 +304,16 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
index = index? index:0
|
||||||
if(!this.current.id){
|
if(!this.current.id){
|
||||||
data.designSingleItemDTOList[index].priority = zIndex+=1
|
if(index){
|
||||||
|
data.designSingleItemDTOList[index].priority = zIndex+=1
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(this.type_ == 1){
|
if(this.type_ == 1){
|
||||||
if(data.designSingleItemDTOList[index].path != this.sketchImg.minIOPath && this.sketchImg.id_){
|
if(data.designSingleItemDTOList[index].path != this.sketchImg.minIOPath && this.sketchImg.id_){
|
||||||
data.designSingleItemDTOList[index].offset = [0,0]
|
data.designSingleItemDTOList[index].offset = [0,0]
|
||||||
data.designSingleItemDTOList[index].scale = 1
|
data.designSingleItemDTOList[index].scale = [1,1]
|
||||||
}
|
}
|
||||||
data.designSingleItemDTOList = this.soleId(data.designSingleItemDTOList,index)
|
data.designSingleItemDTOList = this.soleId(data.designSingleItemDTOList,index)
|
||||||
this.sketchImg.id_ = data.designSingleItemDTOList[index].id
|
this.sketchImg.id_ = data.designSingleItemDTOList[index].id
|
||||||
|
|||||||
@@ -41,6 +41,7 @@
|
|||||||
<div v-show="!overallSingle" class="habit_System_Designer">
|
<div v-show="!overallSingle" class="habit_System_Designer">
|
||||||
<div class="habit_System_Designer_text">{{ $t('DesignPrintOperation.Scale') }}</div>
|
<div class="habit_System_Designer_text">{{ $t('DesignPrintOperation.Scale') }}</div>
|
||||||
<a-slider id="system_silder"
|
<a-slider id="system_silder"
|
||||||
|
:min="1"
|
||||||
v-model:value="systemDesignerPercentage"
|
v-model:value="systemDesignerPercentage"
|
||||||
@afterChange="systemDesigner"
|
@afterChange="systemDesigner"
|
||||||
:tip-formatter="formatter"
|
:tip-formatter="formatter"
|
||||||
@@ -296,15 +297,14 @@ export default defineComponent({
|
|||||||
this.refetchTemplate(0)
|
this.refetchTemplate(0)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
systemDesigner(num) {
|
systemDesigner(num) {
|
||||||
let DesignPrintOperationParent = this.$parent
|
let DesignPrintOperationParent = this.$parent
|
||||||
DesignPrintOperationParent.systemDesignerPercentage = num
|
DesignPrintOperationParent.systemDesignerPercentage = num
|
||||||
},
|
},
|
||||||
formatter(value) {
|
formatter(value) {
|
||||||
|
if(value<30)value = 30
|
||||||
return `${value*3}%`;
|
return `${value*3}%`;
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -608,7 +608,7 @@ export default defineComponent({
|
|||||||
let location
|
let location
|
||||||
arr.forEach((v,index)=>{
|
arr.forEach((v,index)=>{
|
||||||
if(!this.overallSingle){
|
if(!this.overallSingle){
|
||||||
scale = this.systemDesignerPercentage*3/100
|
scale = this.systemDesignerPercentage/100
|
||||||
// location = [arr[index].style.left.replace(/px/g,'')*sketchNum+this.print.width.replace(/px/g,'')/2-7,arr[index].style.top.replace(/px/g,'')*sketchNum+this.print.height.replace(/px/g,'')/2-7]
|
// location = [arr[index].style.left.replace(/px/g,'')*sketchNum+this.print.width.replace(/px/g,'')/2-7,arr[index].style.top.replace(/px/g,'')*sketchNum+this.print.height.replace(/px/g,'')/2-7]
|
||||||
location = [arr[index].style.left.replace(/px/g,'')*sketchNum,arr[index].style.top.replace(/px/g,'')*sketchNum]
|
location = [arr[index].style.left.replace(/px/g,'')*sketchNum,arr[index].style.top.replace(/px/g,'')*sketchNum]
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
@@ -41,6 +41,7 @@
|
|||||||
<div v-show="!overallSingle" class="habit_System_Designer">
|
<div v-show="!overallSingle" class="habit_System_Designer">
|
||||||
<div class="habit_System_Designer_text">Scale</div>
|
<div class="habit_System_Designer_text">Scale</div>
|
||||||
<a-slider id="system_silder"
|
<a-slider id="system_silder"
|
||||||
|
:min="1"
|
||||||
v-model:value="systemDesignerPercentage"
|
v-model:value="systemDesignerPercentage"
|
||||||
@afterChange="systemDesigner"
|
@afterChange="systemDesigner"
|
||||||
:tip-formatter="formatter"
|
:tip-formatter="formatter"
|
||||||
@@ -610,7 +611,7 @@ export default defineComponent({
|
|||||||
let location
|
let location
|
||||||
arr.forEach((v,index)=>{
|
arr.forEach((v,index)=>{
|
||||||
if(!this.overallSingle){
|
if(!this.overallSingle){
|
||||||
scale = this.systemDesignerPercentage*3/100
|
scale = this.systemDesignerPercentage/100
|
||||||
// location = [arr[index].style.left.replace(/px/g,'')*sketchNum+this.print.width.replace(/px/g,'')/2-7,arr[index].style.top.replace(/px/g,'')*sketchNum+this.print.height.replace(/px/g,'')/2-7]
|
// location = [arr[index].style.left.replace(/px/g,'')*sketchNum+this.print.width.replace(/px/g,'')/2-7,arr[index].style.top.replace(/px/g,'')*sketchNum+this.print.height.replace(/px/g,'')/2-7]
|
||||||
location = [arr[index].style.left.replace(/px/g,'')*sketchNum,arr[index].style.top.replace(/px/g,'')*sketchNum]
|
location = [arr[index].style.left.replace(/px/g,'')*sketchNum,arr[index].style.top.replace(/px/g,'')*sketchNum]
|
||||||
}else{
|
}else{
|
||||||
@@ -755,6 +756,11 @@ export default defineComponent({
|
|||||||
|
|
||||||
<style lang="less">
|
<style lang="less">
|
||||||
.designOpenrtionMobile_modal {
|
.designOpenrtionMobile_modal {
|
||||||
|
-moz-user-select: none;
|
||||||
|
-webkit-user-select: none;
|
||||||
|
-ms-user-select: none;
|
||||||
|
-khtml-user-select: none;
|
||||||
|
user-select: none;
|
||||||
// max-width: 1440px;
|
// max-width: 1440px;
|
||||||
.mark_loading{
|
.mark_loading{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|||||||
@@ -89,18 +89,19 @@
|
|||||||
<div class="habit_System_Designer">
|
<div class="habit_System_Designer">
|
||||||
<a-slider id="system_silder"
|
<a-slider id="system_silder"
|
||||||
v-model:value="workspaceItem.systemDesignerPercentage"
|
v-model:value="workspaceItem.systemDesignerPercentage"
|
||||||
@afterChange="systemDesigner"
|
@afterChange="setSystemDesigner"
|
||||||
:tip-formatter="formatter"
|
:tip-formatter="formatter"
|
||||||
|
:tooltipVisible="false"
|
||||||
>
|
>
|
||||||
</a-slider>
|
</a-slider>
|
||||||
<div class="habit_System_Designer_text_max">
|
<div class="habit_System_Designer_text_max">
|
||||||
<div class="habit_System_Designer_text">
|
<div class="habit_System_Designer_text">
|
||||||
|
|
||||||
{{ $t('Habit.System') }}<span>(100%)</span>
|
{{ $t('Habit.System') }}<span>({{systemDesigner.system}}%)</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="habit_System_Designer_text">
|
<div class="habit_System_Designer_text">
|
||||||
|
|
||||||
{{ $t('Habit.Designer') }}<span>(100%)</span>
|
{{ $t('Habit.Designer') }}<span>({{systemDesigner.designer}}%)</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -191,6 +192,10 @@ export default defineComponent({
|
|||||||
mannequinType:'',
|
mannequinType:'',
|
||||||
mannequinId:'',
|
mannequinId:'',
|
||||||
})
|
})
|
||||||
|
let systemDesigner:any = ref({
|
||||||
|
system:0,
|
||||||
|
designer:0,
|
||||||
|
})
|
||||||
let mannequins:any = ref([{},{}])
|
let mannequins:any = ref([{},{}])
|
||||||
let systemSeleves= ref(false);
|
let systemSeleves= ref(false);
|
||||||
let total= ref(0);
|
let total= ref(0);
|
||||||
@@ -228,6 +233,7 @@ export default defineComponent({
|
|||||||
return{
|
return{
|
||||||
systemSeleves,
|
systemSeleves,
|
||||||
mannequins,
|
mannequins,
|
||||||
|
systemDesigner,
|
||||||
openType,
|
openType,
|
||||||
total,
|
total,
|
||||||
driver__,
|
driver__,
|
||||||
@@ -251,10 +257,12 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
let data = this.workspaceItem
|
let data = this.workspaceItem
|
||||||
delete data.isLastIndex
|
delete data.isLastIndex
|
||||||
this.putWorkspace(data,'')
|
this.putWorkspace(data,this.workspaceItem.id)
|
||||||
this.openType.model = false
|
this.openType.model = false
|
||||||
// this.getDetail(this.workspaceItem.id)
|
// this.getDetail(this.workspaceItem.id)
|
||||||
this.store.commit("setWorkspace", this.workspaceItem);
|
this.store.commit("setWorkspace", this.workspaceItem);
|
||||||
|
}else{
|
||||||
|
this.getworkspace('detail')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -266,20 +274,20 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
'workspaceItem.id_':{
|
'workspace.id':{
|
||||||
handler(newVal:any,oldVal:any){
|
handler(newVal:any,oldVal:any){
|
||||||
this.workspace.workspaceList.forEach((v:any)=>{
|
// this.workspace.workspaceList.forEach((v:any)=>{
|
||||||
if(v.id == this.workspaceItem.id_){
|
// if(v.id == this.workspaceItem.id_){
|
||||||
this.workspaceItem = v
|
// this.workspaceItem = v
|
||||||
this.workspaceItem.id_ = v.id
|
// this.workspaceItem.id_ = v.id
|
||||||
}
|
// }
|
||||||
if(v.id == oldVal){
|
// if(v.id == oldVal){
|
||||||
delete v.isLastIndex
|
// delete v.isLastIndex
|
||||||
this.putWorkspace(v,newVal)
|
// this.putWorkspace(v,newVal)
|
||||||
this.getDetail(newVal)
|
// this.getDetail(newVal)
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
this.getMannequins()
|
this.getDetail(newVal)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
'openType.workspace':{
|
'openType.workspace':{
|
||||||
@@ -339,8 +347,8 @@ export default defineComponent({
|
|||||||
// new Promise((resolve) => {
|
// new Promise((resolve) => {
|
||||||
// this.getPosition(resolve)
|
// this.getPosition(resolve)
|
||||||
// })
|
// })
|
||||||
await this.getPosition()
|
await this.getPosition()//获取衣服类型
|
||||||
this.getworkspace()
|
this.getworkspace('')
|
||||||
this.getSex()
|
this.getSex()
|
||||||
},
|
},
|
||||||
directives:{
|
directives:{
|
||||||
@@ -452,7 +460,7 @@ export default defineComponent({
|
|||||||
// this.getworkspace()
|
// this.getworkspace()
|
||||||
// this.setPosition('')
|
// this.setPosition('')
|
||||||
},
|
},
|
||||||
getworkspace(){
|
getworkspace(str:any){
|
||||||
// Https.axiosGet(Https.httpUrls.workspaceDetail,{params:{id:3}}).then((rv: any) => {
|
// Https.axiosGet(Https.httpUrls.workspaceDetail,{params:{id:3}}).then((rv: any) => {
|
||||||
// if (rv) {
|
// if (rv) {
|
||||||
// console.log(rv,'workspace');
|
// console.log(rv,'workspace');
|
||||||
@@ -467,27 +475,18 @@ export default defineComponent({
|
|||||||
|
|
||||||
Https.axiosPost(Https.httpUrls.workspaceList,data).then((rv: any) => {
|
Https.axiosPost(Https.httpUrls.workspaceList,data).then((rv: any) => {
|
||||||
if (rv) {
|
if (rv) {
|
||||||
rv.page.content.forEach((v:any) => {
|
// rv.page.content.forEach((v:any) => {
|
||||||
v.id_ = v.id
|
// v.id_ = v.id
|
||||||
if(v.position == "Overall"){
|
// if(v.position == "Overall"){
|
||||||
v.overallSingle = false
|
// v.overallSingle = false
|
||||||
}else{
|
// }else{
|
||||||
v.overallSingle = true
|
// v.overallSingle = true
|
||||||
}
|
// }
|
||||||
v.putName = false
|
// v.putName = false
|
||||||
if(v.id == (this.workspaceItem.id == -1 ?rv.id:this.workspaceItem.id)){
|
// });
|
||||||
this.workspaceItem = v
|
|
||||||
this.setMannequinsSex()
|
|
||||||
this.setPosition('')
|
|
||||||
}
|
|
||||||
});
|
|
||||||
this.total = rv.page.total
|
|
||||||
this.workspace.id = rv.id
|
this.workspace.id = rv.id
|
||||||
// if(this.workspace.workspaceList){
|
if(str == 'detail') this.getDetail(rv.id)
|
||||||
// this.workspace.workspaceList.push(...rv.page.content)
|
this.total = rv.page.total
|
||||||
// }else{
|
|
||||||
// this.workspace.workspaceList = rv.page.content
|
|
||||||
// }
|
|
||||||
this.workspace.workspaceList = rv.page.content
|
this.workspace.workspaceList = rv.page.content
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -495,6 +494,15 @@ export default defineComponent({
|
|||||||
getDetail(id:any){//
|
getDetail(id:any){//
|
||||||
Https.axiosGet(Https.httpUrls.workspaceDetail,{params:{id:id}}).then((rv: any) => {
|
Https.axiosGet(Https.httpUrls.workspaceDetail,{params:{id:id}}).then((rv: any) => {
|
||||||
if (rv) {
|
if (rv) {
|
||||||
|
if(rv.position == "Overall"){
|
||||||
|
rv.overallSingle = false
|
||||||
|
}else{
|
||||||
|
rv.overallSingle = true
|
||||||
|
}
|
||||||
|
rv.putName = false
|
||||||
|
this.workspaceItem = rv
|
||||||
|
this.setMannequinsSex()
|
||||||
|
this.setPosition('')
|
||||||
// this.getworkspace()
|
// this.getworkspace()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -522,25 +530,30 @@ export default defineComponent({
|
|||||||
if(this.workspaceItem.id == -1){
|
if(this.workspaceItem.id == -1){
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
this.openType.model = false
|
||||||
Https.axiosPost(Https.httpUrls.workspacesaveOrUpdate,data).then((rv: any) => {
|
Https.axiosPost(Https.httpUrls.workspacesaveOrUpdate,data).then((rv: any) => {
|
||||||
if (rv) {
|
if (rv) {
|
||||||
if(index){
|
if(index){
|
||||||
// this.getDetail(index)
|
// this.getDetail(index)
|
||||||
}else{
|
}else{
|
||||||
this.getworkspace()
|
}
|
||||||
|
if(index){
|
||||||
|
this.getDetail(index)
|
||||||
|
}else{
|
||||||
|
this.getworkspace('')
|
||||||
}
|
}
|
||||||
this.workspace.workspaceList[index].workSpaceName = this.workspaceItemName
|
this.workspace.workspaceList[index].workSpaceName = this.workspaceItemName
|
||||||
this.workspace.workspaceList[index].putName = false
|
this.workspace.workspaceList[index].putName = false
|
||||||
this.openType.addWorkspace = false
|
this.openType.addWorkspace = false
|
||||||
}
|
}
|
||||||
}).catch((res)=>{
|
}).catch((res)=>{
|
||||||
this.getworkspace()
|
// this.getworkspace()
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
deleteWorkspace(data:any){
|
deleteWorkspace(data:any){
|
||||||
Https.axiosDelete(Https.httpUrls.workspaceRemove,data).then((rv: any) => {
|
Https.axiosDelete(Https.httpUrls.workspaceRemove,data).then((rv: any) => {
|
||||||
if (rv) {
|
if (rv) {
|
||||||
this.getworkspace()
|
this.getworkspace('')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -595,6 +608,7 @@ export default defineComponent({
|
|||||||
message.info(this.t('Habit.jsContent2'));
|
message.info(this.t('Habit.jsContent2'));
|
||||||
}else{
|
}else{
|
||||||
if(index == -1){
|
if(index == -1){
|
||||||
|
|
||||||
let data = {
|
let data = {
|
||||||
workSpaceName:this.workspaceItemName,
|
workSpaceName:this.workspaceItemName,
|
||||||
}
|
}
|
||||||
@@ -608,7 +622,7 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
data.workSpaceName = this.workspaceItemName
|
data.workSpaceName = this.workspaceItemName
|
||||||
this.putWorkspace(data,'')
|
this.putWorkspace(data,this.workspaceItem.id)
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -616,10 +630,12 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
//设置系统设计占比
|
//设置系统设计占比
|
||||||
systemDesigner(num: number) {
|
setSystemDesigner(num: number) {
|
||||||
this.workspaceItem.systemDesignerPercentage = num
|
this.workspaceItem.systemDesignerPercentage = num
|
||||||
},
|
},
|
||||||
formatter(value: number) {
|
formatter(value: number) {
|
||||||
|
this.systemDesigner.system = 100 - value
|
||||||
|
this.systemDesigner.designer = value
|
||||||
let num = Math.abs((value-50)*2)
|
let num = Math.abs((value-50)*2)
|
||||||
return `${num}%`;
|
return `${num}%`;
|
||||||
},
|
},
|
||||||
@@ -630,8 +646,9 @@ export default defineComponent({
|
|||||||
this.workspace.workspaceList.forEach((v:any) => {
|
this.workspace.workspaceList.forEach((v:any) => {
|
||||||
v.putName = false
|
v.putName = false
|
||||||
});
|
});
|
||||||
|
this.putWorkspace(this.workspaceItem,'')
|
||||||
this.workspaceItem.id_ = num
|
this.workspace.id = num
|
||||||
|
// this.workspaceItem.id_ = num
|
||||||
this.openType.workspace = false
|
this.openType.workspace = false
|
||||||
},
|
},
|
||||||
//新建参数
|
//新建参数
|
||||||
@@ -899,7 +916,7 @@ export default defineComponent({
|
|||||||
|
|
||||||
}
|
}
|
||||||
.habit_System_Designer {
|
.habit_System_Designer {
|
||||||
margin-top: calc(8rem*1.2);
|
// margin-top: calc(8rem*1.2);
|
||||||
:deep(.ant-slider-track),
|
:deep(.ant-slider-track),
|
||||||
:deep(.ant-slider-rail) {
|
:deep(.ant-slider-rail) {
|
||||||
|
|
||||||
|
|||||||
@@ -139,7 +139,6 @@ export default defineComponent({
|
|||||||
let front = []
|
let front = []
|
||||||
let back = []
|
let back = []
|
||||||
let body
|
let body
|
||||||
|
|
||||||
designItemDetail.others.forEach((item) => {
|
designItemDetail.others.forEach((item) => {
|
||||||
if(item.type == 'Body'){
|
if(item.type == 'Body'){
|
||||||
body = item
|
body = item
|
||||||
@@ -299,7 +298,7 @@ export default defineComponent({
|
|||||||
w = (e.x - this.frontBack.front[this.imgDomIndex].centers.left)
|
w = (e.x - this.frontBack.front[this.imgDomIndex].centers.left)
|
||||||
h = (e.x - this.frontBack.front[this.imgDomIndex].centers.left)*num
|
h = (e.x - this.frontBack.front[this.imgDomIndex].centers.left)*num
|
||||||
width = w+'px'
|
width = w+'px'
|
||||||
height = w*num+'px'
|
// height = w*num+'px'
|
||||||
}else if(this.direction == 'top'){
|
}else if(this.direction == 'top'){
|
||||||
num = width/height
|
num = width/height
|
||||||
this.frontBack.front[this.imgDomIndex].style.top = 'auto'
|
this.frontBack.front[this.imgDomIndex].style.top = 'auto'
|
||||||
@@ -309,19 +308,19 @@ export default defineComponent({
|
|||||||
h = (this.frontBack.front[this.imgDomIndex].centers.top - e.y)
|
h = (this.frontBack.front[this.imgDomIndex].centers.top - e.y)
|
||||||
|
|
||||||
height = h+'px'
|
height = h+'px'
|
||||||
width = h*num+'px'
|
// width = h*num+'px'
|
||||||
}else if(this.direction == 'bottom'){
|
}else if(this.direction == 'bottom'){
|
||||||
num = width/height
|
num = width/height
|
||||||
h = (e.y - this.frontBack.front[this.imgDomIndex].centers.top)
|
h = (e.y - this.frontBack.front[this.imgDomIndex].centers.top)
|
||||||
height = h+'px'
|
height = h+'px'
|
||||||
width = h*num+'px'
|
// width = h*num+'px'
|
||||||
}else if(this.direction == 'left'){
|
}else if(this.direction == 'left'){
|
||||||
this.frontBack.front[this.imgDomIndex].style.left = 'auto'
|
this.frontBack.front[this.imgDomIndex].style.left = 'auto'
|
||||||
this.frontBack.front[this.imgDomIndex].style.right = parentNode.offsetWidth -imgDomWH.width - this.imgDom.offsetLeft+'px'
|
this.frontBack.front[this.imgDomIndex].style.right = parentNode.offsetWidth -imgDomWH.width - this.imgDom.offsetLeft+'px'
|
||||||
w = (this.frontBack.front[this.imgDomIndex].centers.left - e.x)
|
w = (this.frontBack.front[this.imgDomIndex].centers.left - e.x)
|
||||||
|
|
||||||
width = w+'px'
|
width = w+'px'
|
||||||
height = w*num+'px'
|
// height = w*num+'px'
|
||||||
}
|
}
|
||||||
//判断尺寸是否到边
|
//判断尺寸是否到边
|
||||||
this.frontBack.front[this.imgDomIndex].style.width = width
|
this.frontBack.front[this.imgDomIndex].style.width = width
|
||||||
@@ -409,8 +408,10 @@ export default defineComponent({
|
|||||||
if(item.id == arr[index].id && !arr[index].similarity){
|
if(item.id == arr[index].id && !arr[index].similarity){
|
||||||
let y = ((arr[index]?.style?.top.replace(/px/g,'')*ratio).toFixed(0) - arr[index]?.position[0])
|
let y = ((arr[index]?.style?.top.replace(/px/g,'')*ratio).toFixed(0) - arr[index]?.position[0])
|
||||||
let x = ((arr[index]?.style?.left.replace(/px/g,'')*ratio).toFixed(0) - arr[index]?.position[1])
|
let x = ((arr[index]?.style?.left.replace(/px/g,'')*ratio).toFixed(0) - arr[index]?.position[1])
|
||||||
let scale = arr[index]?.imageSize?Number(((arr[index]?.style?.width.replace(/px/g,'')*ratio)/(arr[index]?.imageSize[0]/arr[index].scale)).toFixed(2)):1
|
let scaleWidth = arr[index]?.imageSize?Number(((arr[index]?.style?.width.replace(/px/g,'')*ratio)/(arr[index]?.imageSize[0]/arr[index].scale[0])).toFixed(2)):1
|
||||||
item.scale = scale
|
let scaleHeight = arr[index]?.imageSize?Number(((arr[index]?.style?.height.replace(/px/g,'')*ratio)/(arr[index]?.imageSize[1]/arr[index].scale[1])).toFixed(2)):1
|
||||||
|
// let widthScale = (arr[index].style.width.replace(/px/g,'')/arr[index].style.height.replace(/px/g,'')).toFixed(2)
|
||||||
|
item.scale = [scaleWidth,scaleHeight]
|
||||||
let top = y == 0 ? item.offset[1]:y+item.offset[1]
|
let top = y == 0 ? item.offset[1]:y+item.offset[1]
|
||||||
let left = x == 0 ? item.offset[0]:x+item.offset[0]
|
let left = x == 0 ? item.offset[0]:x+item.offset[0]
|
||||||
item.offset = [left,top]
|
item.offset = [left,top]
|
||||||
|
|||||||
@@ -151,7 +151,6 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
let fontBackMove = []
|
let fontBackMove = []
|
||||||
canvas.on('selection:created', (e)=> {
|
canvas.on('selection:created', (e)=> {
|
||||||
console.log(3213123123);
|
|
||||||
// console.log(canvas.getActiveObject());
|
// console.log(canvas.getActiveObject());
|
||||||
// // if()
|
// // if()
|
||||||
// console.log(frontBack.front.find(person => person.id === canvas.getActiveObject().id));
|
// console.log(frontBack.front.find(person => person.id === canvas.getActiveObject().id));
|
||||||
|
|||||||
@@ -296,7 +296,7 @@ export default defineComponent({
|
|||||||
w = (e.changedTouches[0].pageX -imgDomWH.left)
|
w = (e.changedTouches[0].pageX -imgDomWH.left)
|
||||||
h = (e.changedTouches[0].pageX -imgDomWH.left)*num
|
h = (e.changedTouches[0].pageX -imgDomWH.left)*num
|
||||||
width = w+'px'
|
width = w+'px'
|
||||||
height = w*num+'px'
|
// height = w*num+'px'
|
||||||
}else if(this.direction == 'top'){
|
}else if(this.direction == 'top'){
|
||||||
num = width/height
|
num = width/height
|
||||||
this.frontBack.front[this.imgDomIndex].style.top = 'auto'
|
this.frontBack.front[this.imgDomIndex].style.top = 'auto'
|
||||||
@@ -307,18 +307,18 @@ export default defineComponent({
|
|||||||
h = (this.frontBack.front[this.imgDomIndex].centers.top - e.changedTouches[0].pageY)
|
h = (this.frontBack.front[this.imgDomIndex].centers.top - e.changedTouches[0].pageY)
|
||||||
|
|
||||||
height = h+'px'
|
height = h+'px'
|
||||||
width = h*num+'px'
|
// width = h*num+'px'
|
||||||
}else if(this.direction == 'bottom'){
|
}else if(this.direction == 'bottom'){
|
||||||
num = width/height
|
num = width/height
|
||||||
h = (e.changedTouches[0].pageY -imgDomWH.top)
|
h = (e.changedTouches[0].pageY -imgDomWH.top)
|
||||||
height = h+'px'
|
height = h+'px'
|
||||||
width = h*num+'px'
|
// width = h*num+'px'
|
||||||
}else if(this.direction == 'left'){
|
}else if(this.direction == 'left'){
|
||||||
w = (this.frontBack.front[this.imgDomIndex].centers.left - e.changedTouches[0].pageX)
|
w = (this.frontBack.front[this.imgDomIndex].centers.left - e.changedTouches[0].pageX)
|
||||||
this.frontBack.front[this.imgDomIndex].style.left = 'auto'
|
this.frontBack.front[this.imgDomIndex].style.left = 'auto'
|
||||||
this.frontBack.front[this.imgDomIndex].style.right = this.frontBack.front[this.imgDomIndex].centers.right+'px'
|
this.frontBack.front[this.imgDomIndex].style.right = this.frontBack.front[this.imgDomIndex].centers.right+'px'
|
||||||
width = w+'px'
|
width = w+'px'
|
||||||
height = w*num+'px'
|
// height = w*num+'px'
|
||||||
}
|
}
|
||||||
//判断尺寸是否到边
|
//判断尺寸是否到边
|
||||||
this.frontBack.front[this.imgDomIndex].style.width = width
|
this.frontBack.front[this.imgDomIndex].style.width = width
|
||||||
@@ -403,12 +403,13 @@ export default defineComponent({
|
|||||||
imageCategory1 = arr[1].imageCategory
|
imageCategory1 = arr[1].imageCategory
|
||||||
}
|
}
|
||||||
arr.forEach((i)=>{
|
arr.forEach((i)=>{
|
||||||
let imageCategory = i.imageCategory.split('_')[0]
|
|
||||||
if(item.id == i.id){
|
if(item.id == i.id){
|
||||||
let y = ((i?.style?.top.replace(/px/g,'')*ratio).toFixed(0) - i?.position[0])
|
let y = ((i?.style?.top.replace(/px/g,'')*ratio).toFixed(0) - i?.position[0])
|
||||||
let x = ((i?.style?.left.replace(/px/g,'')*ratio).toFixed(0) - i?.position[1])
|
let x = ((i?.style?.left.replace(/px/g,'')*ratio).toFixed(0) - i?.position[1])
|
||||||
let scale = i?.imageSize?Number(((i?.style?.width.replace(/px/g,'')*ratio)/(i?.imageSize[0]/i.scale)).toFixed(2)):1
|
// let scale = i?.imageSize?Number(((i?.style?.width.replace(/px/g,'')*ratio)/(i?.imageSize[0]/i.scale)).toFixed(2)):1
|
||||||
item.scale = scale
|
let scaleWidth = i?.imageSize?Number(((i?.style?.width.replace(/px/g,'')*ratio)/(i?.imageSize[0]/i.scale[0])).toFixed(2)):1
|
||||||
|
let scaleHeight = i?.imageSize?Number(((i?.style?.height.replace(/px/g,'')*ratio)/(i?.imageSize[1]/i.scale[1])).toFixed(2)):1
|
||||||
|
item.scale = [scaleWidth,scaleHeight]
|
||||||
let top = y == 0 ? item.offset[1]:y+item.offset[1]
|
let top = y == 0 ? item.offset[1]:y+item.offset[1]
|
||||||
let left = x == 0 ? item.offset[0]:x+item.offset[0]
|
let left = x == 0 ? item.offset[0]:x+item.offset[0]
|
||||||
item.offset = [left,top]
|
item.offset = [left,top]
|
||||||
@@ -449,6 +450,11 @@ export default defineComponent({
|
|||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
.designOpenrtion_modal {
|
.designOpenrtion_modal {
|
||||||
// max-width: 1440px;
|
// max-width: 1440px;
|
||||||
|
-moz-user-select: none;
|
||||||
|
-webkit-user-select: none;
|
||||||
|
-ms-user-select: none;
|
||||||
|
-khtml-user-select: none;
|
||||||
|
user-select: none;
|
||||||
.ant-modal-body{
|
.ant-modal-body{
|
||||||
padding: calc(4rem*1.2) calc(5rem*1.2) calc(0rem*1.2)!important;
|
padding: calc(4rem*1.2) calc(5rem*1.2) calc(0rem*1.2)!important;
|
||||||
// height: calc(65vh - 6.calc(4rem*1.2));
|
// height: calc(65vh - 6.calc(4rem*1.2));
|
||||||
|
|||||||
@@ -658,7 +658,7 @@ export default defineComponent({
|
|||||||
this.inputTime = setTimeout(()=>{
|
this.inputTime = setTimeout(()=>{
|
||||||
// let num1 = ((input as HTMLInputElement).value.match(/ /g) || []).length
|
// let num1 = ((input as HTMLInputElement).value.match(/ /g) || []).length
|
||||||
// let num2 = (input as HTMLInputElement).value.split(' ').length
|
// let num2 = (input as HTMLInputElement).value.split(' ').length
|
||||||
if(this.searchPictureName?.split(/\s+/).length > 75){
|
if(this.searchPictureName?.split(/\s+/).length > 250){
|
||||||
(this.$refs.inputShowText as any).innerHTML = this.t('Generate.maximumLength')
|
(this.$refs.inputShowText as any).innerHTML = this.t('Generate.maximumLength')
|
||||||
this.inputShow = true
|
this.inputShow = true
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
@@ -248,8 +248,6 @@ export default defineComponent({
|
|||||||
|
|
||||||
},
|
},
|
||||||
selectImgItem(imgData:any){
|
selectImgItem(imgData:any){
|
||||||
console.log(imgData);
|
|
||||||
|
|
||||||
let parent:any = this.$parent
|
let parent:any = this.$parent
|
||||||
if(parent.isUseGenerate){
|
if(parent.isUseGenerate){
|
||||||
this.setUseGenerate([])
|
this.setUseGenerate([])
|
||||||
|
|||||||
@@ -443,8 +443,9 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
layout(){
|
async layout(){
|
||||||
|
if(this.loadingShow)return
|
||||||
|
this.loadingShow = true
|
||||||
this.store.commit("setDisposeMoodboard", []);
|
this.store.commit("setDisposeMoodboard", []);
|
||||||
let arr = JSON.parse(JSON.stringify(this.store.state.UploadFilesModule.moodboard))
|
let arr = JSON.parse(JSON.stringify(this.store.state.UploadFilesModule.moodboard))
|
||||||
this.layoutList = arr
|
this.layoutList = arr
|
||||||
@@ -457,51 +458,52 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
if(this.moodb_[arr.length-1].length != 1){
|
if(this.moodb_[arr.length-1].length != 1){
|
||||||
if(JSON.stringify(this.moodb_className) == JSON.stringify(this.moodb_[arr.length-1][random])){
|
if(JSON.stringify(this.moodb_className) == JSON.stringify(this.moodb_[arr.length-1][random])){
|
||||||
|
this.loadingShow = false
|
||||||
this.layout()
|
this.layout()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(this.loadingShow){
|
|
||||||
return
|
|
||||||
}
|
|
||||||
this.loadingShow = true
|
|
||||||
this.edieShow = true
|
this.edieShow = true
|
||||||
if(this.moodb_[arr.length-1].length == 2){
|
if(this.moodb_[arr.length-1].length == 2){
|
||||||
this.moodb_className = this.moodb_[arr.length-1][0]
|
this.moodb_className = this.moodb_[arr.length-1][0]
|
||||||
}else{
|
}else{
|
||||||
this.moodb_className = this.moodb_[arr.length-1][random]
|
this.moodb_className = this.moodb_[arr.length-1][random]
|
||||||
}
|
}
|
||||||
|
|
||||||
this.layoutOpen = true
|
this.layoutOpen = true
|
||||||
//提交模板
|
//提交模板
|
||||||
// this.loadingShow = true
|
// this.loadingShow = true
|
||||||
this.layoutList.forEach((v:any)=>{
|
this.layoutList.forEach((v:any)=>{
|
||||||
v.setPitch = false
|
v.setPitch = false
|
||||||
})
|
})
|
||||||
nextTick().then(async ()=>{
|
nextTick().then(()=>{
|
||||||
let layoutCentent = document.getElementById('modal_img')
|
let layoutCentent = document.getElementById('modal_img')
|
||||||
let file = await domTurnImg(layoutCentent)
|
domTurnImg(layoutCentent).then((rv)=>{
|
||||||
let param = new FormData();
|
let file = rv
|
||||||
param.append('inPin','0')
|
let param = new FormData();
|
||||||
param.append('level1Type','Moodboard')
|
param.append('inPin','0')
|
||||||
param.append('gender','')
|
param.append('level1Type','Moodboard')
|
||||||
param.append('timeZone',Intl.DateTimeFormat().resolvedOptions().timeZone)
|
param.append('gender','')
|
||||||
param.append('file',file);
|
param.append('timeZone',Intl.DateTimeFormat().resolvedOptions().timeZone)
|
||||||
let config:any = {headers:{'Content-Type':'multipart/form-data','Accept':'*/*' }}
|
param.append('file',file);
|
||||||
Https.axiosPost(Https.httpUrls.elementUpload,param,config)
|
let config:any = {headers:{'Content-Type':'multipart/form-data','Accept':'*/*' }}
|
||||||
.then((rv: any) => {
|
Https.axiosPost(Https.httpUrls.elementUpload,param,config)
|
||||||
let img:any = rv
|
.then((rv: any) => {
|
||||||
img.imgUrl = rv.url
|
let img:any = rv
|
||||||
img.resData = JSON.parse(JSON.stringify(img))
|
img.imgUrl = rv.url
|
||||||
this.store.commit("setDisposeMoodboard", img);
|
img.resData = JSON.parse(JSON.stringify(img))
|
||||||
|
this.store.commit("setDisposeMoodboard", img);
|
||||||
|
this.loadingShow = false
|
||||||
|
}
|
||||||
|
).catch(rv=>{
|
||||||
this.loadingShow = false
|
this.loadingShow = false
|
||||||
|
})
|
||||||
|
if(this.driver__.driver){
|
||||||
|
driverObj__.moveNext()
|
||||||
}
|
}
|
||||||
).catch(rv=>{
|
|
||||||
this.loadingShow = false
|
|
||||||
})
|
})
|
||||||
if(this.driver__.driver){
|
|
||||||
driverObj__.moveNext()
|
})
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
setmoodbClass(val:any){
|
setmoodbClass(val:any){
|
||||||
this.moodb_className = val
|
this.moodb_className = val
|
||||||
|
|||||||
@@ -671,7 +671,7 @@ export default defineComponent({
|
|||||||
},
|
},
|
||||||
ifMaximumLength(){
|
ifMaximumLength(){
|
||||||
this.inputTime = setTimeout(()=>{
|
this.inputTime = setTimeout(()=>{
|
||||||
if(this.captionGeneration?.split(/\s+/).length > 75){
|
if(this.captionGeneration?.split(/\s+/).length > 250){
|
||||||
(this.$refs.inputShowText as any).innerHTML = this.t('PrintboardUpload.maximumLength')
|
(this.$refs.inputShowText as any).innerHTML = this.t('PrintboardUpload.maximumLength')
|
||||||
this.inputShow = true
|
this.inputShow = true
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
@@ -525,7 +525,7 @@ export default defineComponent({
|
|||||||
// let num1 = ((input as HTMLInputElement).value.match(/ /g) || []).length
|
// let num1 = ((input as HTMLInputElement).value.match(/ /g) || []).length
|
||||||
// let num2 = (input as HTMLInputElement).value.split(' ').length
|
// let num2 = (input as HTMLInputElement).value.split(' ').length
|
||||||
|
|
||||||
if(this.captionGeneration?.split(/\s+/).length > 75){
|
if(this.captionGeneration?.split(/\s+/).length > 250){
|
||||||
(this.$refs.inputShowText as any).innerHTML = this.t('SketchboardUpload.maximumLength')
|
(this.$refs.inputShowText as any).innerHTML = this.t('SketchboardUpload.maximumLength')
|
||||||
this.inputShow = true
|
this.inputShow = true
|
||||||
}else{
|
}else{
|
||||||
@@ -1115,6 +1115,7 @@ export default defineComponent({
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
&:hover .delete_like_file_block{
|
&:hover .delete_like_file_block{
|
||||||
display: block;
|
display: block;
|
||||||
|
opacity: 1;
|
||||||
}
|
}
|
||||||
img{
|
img{
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ export default defineComponent({
|
|||||||
function callback(entries:any, observer:any) {
|
function callback(entries:any, observer:any) {
|
||||||
entries.forEach((entry:any) => {
|
entries.forEach((entry:any) => {
|
||||||
if (entry.isIntersecting) {
|
if (entry.isIntersecting) {
|
||||||
this_.getTaskMoreList()
|
this_.getTaskMoreList('')
|
||||||
} else {
|
} else {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -154,12 +154,12 @@ export default defineComponent({
|
|||||||
// this.getTaskList()
|
// this.getTaskList()
|
||||||
let time = 100
|
let time = 100
|
||||||
if(data){
|
if(data){
|
||||||
time = 1000
|
time = 10000
|
||||||
}
|
}
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.currentPage = 1
|
this.currentPage = 1
|
||||||
this.isShowMark = true
|
this.isShowMark = true
|
||||||
this.getTaskMoreList()
|
this.getTaskMoreList(data)
|
||||||
this.getTaskTime = null
|
this.getTaskTime = null
|
||||||
}, time);
|
}, time);
|
||||||
},
|
},
|
||||||
@@ -182,7 +182,7 @@ export default defineComponent({
|
|||||||
this.currentPage = 1
|
this.currentPage = 1
|
||||||
this.total = 0
|
this.total = 0
|
||||||
this.taskListMore = []
|
this.taskListMore = []
|
||||||
this.getTaskMoreList()
|
this.getTaskMoreList('')
|
||||||
},
|
},
|
||||||
getTaskList(){
|
getTaskList(){
|
||||||
clearTimeout(this.getTaskTime)
|
clearTimeout(this.getTaskTime)
|
||||||
@@ -226,7 +226,7 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getTaskMoreList(){
|
getTaskMoreList(value:any){
|
||||||
let data = {
|
let data = {
|
||||||
size:this.pageSize,
|
size:this.pageSize,
|
||||||
page: this.currentPage,
|
page: this.currentPage,
|
||||||
@@ -238,12 +238,20 @@ export default defineComponent({
|
|||||||
this.isShowMark = false
|
this.isShowMark = false
|
||||||
if(this.currentPage != 1 && rv.content.length == 0){
|
if(this.currentPage != 1 && rv.content.length == 0){
|
||||||
this.currentPage = 1
|
this.currentPage = 1
|
||||||
this.getTaskMoreList()
|
this.getTaskMoreList('')
|
||||||
}else{
|
}else{
|
||||||
this.currentPage += 1
|
this.currentPage += 1
|
||||||
this.taskListMore.push(...rv.content)
|
this.taskListMore.push(...rv.content)
|
||||||
this.total = rv.total
|
this.total = rv.total
|
||||||
this.taskListUnfinished = []
|
this.taskListUnfinished = []
|
||||||
|
rv.content.forEach((item:any) => {
|
||||||
|
value.forEach((valueItem:any) => {
|
||||||
|
if(valueItem == item.taskId && item.status == 'success'){
|
||||||
|
downloadIamge(item.outputImage,item.imageName)
|
||||||
|
this.store.dispatch('getCredits')
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
this.taskListMore.forEach((item:any,index:number)=>{
|
this.taskListMore.forEach((item:any,index:number)=>{
|
||||||
if(item.status == 'Waiting' || item.status == 'Executing'){
|
if(item.status == 'Waiting' || item.status == 'Executing'){
|
||||||
item.index = index
|
item.index = index
|
||||||
@@ -260,7 +268,6 @@ export default defineComponent({
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
setDownloadIamge(item:any){
|
setDownloadIamge(item:any){
|
||||||
console.log(item);
|
|
||||||
downloadIamge(item.outputImage,item.imageName)
|
downloadIamge(item.outputImage,item.imageName)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -610,25 +610,28 @@ export default defineComponent({
|
|||||||
})
|
})
|
||||||
nextTick().then(async ()=>{
|
nextTick().then(async ()=>{
|
||||||
let layoutCentent = document.getElementById('layoutCentent')
|
let layoutCentent = document.getElementById('layoutCentent')
|
||||||
let file = await domTurnImg(layoutCentent)
|
domTurnImg(layoutCentent).then((rv)=>{
|
||||||
let param = new FormData();
|
let file =rv
|
||||||
param.append('inPin','0')
|
let param = new FormData();
|
||||||
param.append('gender','')
|
param.append('inPin','0')
|
||||||
param.append('level1Type','Moodboard')
|
param.append('gender','')
|
||||||
param.append('timeZone',Intl.DateTimeFormat().resolvedOptions().timeZone)
|
param.append('level1Type','Moodboard')
|
||||||
param.append('file',file);
|
param.append('timeZone',Intl.DateTimeFormat().resolvedOptions().timeZone)
|
||||||
let config:any = {headers:{'Content-Type':'multipart/form-data','Accept':'*/*' }}
|
param.append('file',file);
|
||||||
Https.axiosPost(Https.httpUrls.elementUpload,param,config)
|
let config:any = {headers:{'Content-Type':'multipart/form-data','Accept':'*/*' }}
|
||||||
.then((rv: any) => {
|
Https.axiosPost(Https.httpUrls.elementUpload,param,config)
|
||||||
// console.log(rv);
|
.then((rv: any) => {
|
||||||
rv.imgUrl = rv.url
|
// console.log(rv);
|
||||||
this.layout = false
|
rv.imgUrl = rv.url
|
||||||
|
this.layout = false
|
||||||
|
this.loadingShow = false
|
||||||
|
this.store.commit("setDisposeMoodboard", rv);
|
||||||
|
}
|
||||||
|
).catch(rv=>{
|
||||||
this.loadingShow = false
|
this.loadingShow = false
|
||||||
this.store.commit("setDisposeMoodboard", rv);
|
})
|
||||||
}
|
|
||||||
).catch(rv=>{
|
|
||||||
this.loadingShow = false
|
|
||||||
})
|
})
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -180,6 +180,28 @@ export default defineComponent({
|
|||||||
this.uploadUrl = getUploadUrl();
|
this.uploadUrl = getUploadUrl();
|
||||||
},
|
},
|
||||||
directives:{
|
directives:{
|
||||||
|
modelImg:{
|
||||||
|
mounted(el) {
|
||||||
|
let parentNode = el.parentNode
|
||||||
|
if(parentNode.offsetHeight > parentNode.offsetWidth){
|
||||||
|
el.style.height = 100+'%'
|
||||||
|
el.style.width = 'auto'
|
||||||
|
}else{
|
||||||
|
el.style.width = 100+'%'
|
||||||
|
el.style.height = 'auto'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
updated (el) {
|
||||||
|
let parentNode = el.parentNode
|
||||||
|
if(parentNode.offsetHeight > parentNode.offsetWidth){
|
||||||
|
el.style.height = 100+'%'
|
||||||
|
el.style.width = 'auto'
|
||||||
|
}else{
|
||||||
|
el.style.width = 100+'%'
|
||||||
|
el.style.height = 'auto'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
//操作移动
|
//操作移动
|
||||||
layout:{
|
layout:{
|
||||||
mounted (el,layout:any,binding) {
|
mounted (el,layout:any,binding) {
|
||||||
@@ -541,28 +563,6 @@ export default defineComponent({
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
modelImg:{
|
|
||||||
// mounted(el) {
|
|
||||||
// let parentNode = el.parentNode
|
|
||||||
// if(parentNode.offsetHeight > parentNode.offsetWidth){
|
|
||||||
// el.style.height = 100+'%'
|
|
||||||
// el.style.width = 'auto'
|
|
||||||
// }else{
|
|
||||||
// el.style.width = 100+'%'
|
|
||||||
// el.style.height = 'auto'
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
// updated (el) {
|
|
||||||
// let parentNode = el.parentNode
|
|
||||||
// if(parentNode.offsetHeight > parentNode.offsetWidth){
|
|
||||||
// el.style.height = 100+'%'
|
|
||||||
// el.style.width = 'auto'
|
|
||||||
// }else{
|
|
||||||
// el.style.width = 100+'%'
|
|
||||||
// el.style.height = 'auto'
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
init(){
|
init(){
|
||||||
@@ -641,27 +641,28 @@ export default defineComponent({
|
|||||||
})
|
})
|
||||||
nextTick().then(async ()=>{
|
nextTick().then(async ()=>{
|
||||||
let layoutCentent = document.getElementById('layoutCentent')
|
let layoutCentent = document.getElementById('layoutCentent')
|
||||||
let file = await domTurnImg(layoutCentent)
|
domTurnImg(layoutCentent).then((rv)=>{
|
||||||
let param = new FormData();
|
let file = rv
|
||||||
param.append('inPin','0')
|
let param = new FormData();
|
||||||
param.append('gender','')
|
param.append('inPin','0')
|
||||||
param.append('level1Type','Moodboard')
|
param.append('gender','')
|
||||||
param.append('timeZone',Intl.DateTimeFormat().resolvedOptions().timeZone)
|
param.append('level1Type','Moodboard')
|
||||||
param.append('file',file);
|
param.append('timeZone',Intl.DateTimeFormat().resolvedOptions().timeZone)
|
||||||
let config:any = {headers:{'Content-Type':'multipart/form-data','Accept':'*/*' }}
|
param.append('file',file);
|
||||||
Https.axiosPost(Https.httpUrls.elementUpload,param,config)
|
let config:any = {headers:{'Content-Type':'multipart/form-data','Accept':'*/*' }}
|
||||||
.then((rv: any) => {
|
Https.axiosPost(Https.httpUrls.elementUpload,param,config)
|
||||||
// console.log(rv);
|
.then((rv: any) => {
|
||||||
rv.imgUrl = rv.url
|
// console.log(rv);
|
||||||
this.layout = false
|
rv.imgUrl = rv.url
|
||||||
|
this.layout = false
|
||||||
|
this.loadingShow = false
|
||||||
|
this.store.commit("setDisposeMoodboard", rv);
|
||||||
|
}
|
||||||
|
).catch(rv=>{
|
||||||
this.loadingShow = false
|
this.loadingShow = false
|
||||||
this.store.commit("setDisposeMoodboard", rv);
|
})
|
||||||
}
|
|
||||||
).catch(rv=>{
|
|
||||||
this.loadingShow = false
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
beforeUpload(){
|
beforeUpload(){
|
||||||
|
|
||||||
@@ -900,6 +901,8 @@ export default defineComponent({
|
|||||||
// object-fit: cover;
|
// object-fit: cover;
|
||||||
// width: 100%;
|
// width: 100%;
|
||||||
// height: 100%;
|
// height: 100%;
|
||||||
|
height: 100%;
|
||||||
|
width: auto;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
float: left;
|
float: left;
|
||||||
user-select:none;
|
user-select:none;
|
||||||
|
|||||||
@@ -99,7 +99,6 @@ export default defineComponent({
|
|||||||
// document.execCommand("copy");
|
// document.execCommand("copy");
|
||||||
// }
|
// }
|
||||||
let init = ()=>{
|
let init = ()=>{
|
||||||
console.log(213123);
|
|
||||||
publish.value = true
|
publish.value = true
|
||||||
// publishDate.publishList = list
|
// publishDate.publishList = list
|
||||||
// publishDate.publishIndex = index
|
// publishDate.publishIndex = index
|
||||||
|
|||||||
@@ -111,6 +111,7 @@ export default {
|
|||||||
GetStarted:'开始设计',
|
GetStarted:'开始设计',
|
||||||
Start:'开始',
|
Start:'开始',
|
||||||
Edit:'编辑',
|
Edit:'编辑',
|
||||||
|
Reset:'重置',
|
||||||
Design:'设计',
|
Design:'设计',
|
||||||
Redesign:'重新设计',
|
Redesign:'重新设计',
|
||||||
GeneratedDesign:'生成的设计',
|
GeneratedDesign:'生成的设计',
|
||||||
|
|||||||
@@ -112,6 +112,7 @@ export default {
|
|||||||
GetStarted:'Get Started',
|
GetStarted:'Get Started',
|
||||||
Start:'Start',
|
Start:'Start',
|
||||||
Edit:'Edit',
|
Edit:'Edit',
|
||||||
|
Reset:'Reset',
|
||||||
Design:'Design',
|
Design:'Design',
|
||||||
Redesign:'Redesign',
|
Redesign:'Redesign',
|
||||||
GeneratedDesign:'Generated Design',
|
GeneratedDesign:'Generated Design',
|
||||||
|
|||||||
@@ -185,7 +185,6 @@ const UploadFilesModule : Module<UploadFiles,RootState> = {
|
|||||||
state.printboard = [...state.printboardFiles,...state.printGenerateFiles,...state.printMaterialFiles]
|
state.printboard = [...state.printboardFiles,...state.printGenerateFiles,...state.printMaterialFiles]
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
setColorboardList(state,colorBoards){
|
setColorboardList(state,colorBoards){
|
||||||
state.colorBoards = colorBoards
|
state.colorBoards = colorBoards
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,45 +1,48 @@
|
|||||||
import html2canvas from "html2canvas";
|
import html2canvas from "html2canvas";
|
||||||
const getJpeg = dom =>{
|
const getJpeg = dom =>{
|
||||||
return new Promise(resolve =>{
|
return new Promise(resolve =>{
|
||||||
html2canvas(dom,{useCORS: true,}).then(canvas =>{
|
setTimeout(() => {
|
||||||
let base64 = canvas.toDataURL('image/jpeg',.9);
|
html2canvas(dom,{useCORS: true,}).then(canvas =>{
|
||||||
let quality = 0.9 // 压缩系数0-1之间
|
let base64 = canvas.toDataURL('image/jpeg',.9);
|
||||||
let newImage = new Image()
|
// let quality = 0.9 // 压缩系数0-1之间
|
||||||
newImage.src = base64
|
let newImage = new Image()
|
||||||
newImage.setAttribute('crossOrigin', 'Anonymous') // url为外域时需要
|
newImage.src = base64
|
||||||
let imgWidth,
|
newImage.setAttribute('crossOrigin', 'Anonymous') // url为外域时需要
|
||||||
imgHeight
|
// let imgWidth,
|
||||||
let w = undefined
|
// imgHeight
|
||||||
newImage.onload = function () {
|
// let w = undefined
|
||||||
w = this.width * 1
|
newImage.onload = function () {
|
||||||
imgWidth = this.width
|
// w = this.width * 1
|
||||||
imgHeight = this.height
|
// imgWidth = this.width
|
||||||
let canvas = document.createElement('canvas')
|
// imgHeight = this.height
|
||||||
let ctx = canvas.getContext('2d')
|
// let canvas = document.createElement('canvas')
|
||||||
if (Math.max(imgWidth, imgHeight) > w) {
|
// let ctx = canvas.getContext('2d')
|
||||||
if (imgWidth > imgHeight) {
|
// if (Math.max(imgWidth, imgHeight) > w) {
|
||||||
canvas.width = w
|
// if (imgWidth > imgHeight) {
|
||||||
canvas.height = w * (imgHeight / imgWidth)
|
// canvas.width = w
|
||||||
} else {
|
// canvas.height = w * (imgHeight / imgWidth)
|
||||||
canvas.height = w
|
// } else {
|
||||||
canvas.width = w * (imgWidth / imgHeight)
|
// canvas.height = w
|
||||||
}
|
// canvas.width = w * (imgWidth / imgHeight)
|
||||||
} else {
|
// }
|
||||||
canvas.width = imgWidth
|
// } else {
|
||||||
canvas.height = imgHeight
|
// canvas.width = imgWidth
|
||||||
quality = 0.6
|
// canvas.height = imgHeight
|
||||||
}
|
// quality = 0.6
|
||||||
ctx.clearRect(0, 0, canvas.width, canvas.height)
|
// }
|
||||||
ctx.drawImage(this, 0, 0, canvas.width, canvas.height) // // 这里面的 this 指向 newImage
|
// ctx.clearRect(0, 0, canvas.width, canvas.height)
|
||||||
let smallBase64 = canvas.toDataURL('image/jpeg', quality) // 压缩语句
|
// ctx.drawImage(this, 0, 0, canvas.width, canvas.height) // // 这里面的 this 指向 newImage
|
||||||
let fileData = dataURLtoFile(smallBase64);
|
// let smallBase64 = canvas.toDataURL('image/jpeg', quality) // 压缩语句
|
||||||
let fileOfBlob = new File([fileData], new Date() + ".jpg"); // 命名图片名
|
let fileData = dataURLtoFile(base64);
|
||||||
// console.log(smallBase64);
|
let fileOfBlob = new File([fileData], new Date() + ".jpg"); // 命名图片名
|
||||||
// resolve(base64ToFile(fileOfBlob))
|
// console.log(smallBase64);
|
||||||
resolve(fileOfBlob)
|
// resolve(base64ToFile(fileOfBlob))
|
||||||
}
|
resolve(fileOfBlob)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}, 100);
|
||||||
})
|
})
|
||||||
})
|
|
||||||
}
|
}
|
||||||
//base64转成blob
|
//base64转成blob
|
||||||
function dataURLtoFile(dataURI, type) {
|
function dataURLtoFile(dataURI, type) {
|
||||||
|
|||||||
@@ -149,7 +149,7 @@ const formatTime = (timestamp, fmt) => {//吧时间戳转为YYYY-MM-DD hh:mm:ss
|
|||||||
const isMoible = () => {//判断是否是移动端
|
const isMoible = () => {//判断是否是移动端
|
||||||
let is_mobile = navigator.userAgent.toLowerCase().match(/(ipad|ipod|iphone|android|coolpad|mmp|smartphone|midp|wap|xoom|symbian|j2me|blackberry|wince)/i) != null;
|
let is_mobile = navigator.userAgent.toLowerCase().match(/(ipad|ipod|iphone|android|coolpad|mmp|smartphone|midp|wap|xoom|symbian|j2me|blackberry|wince)/i) != null;
|
||||||
// alert(navigator.userAgent.toLowerCase())
|
// alert(navigator.userAgent.toLowerCase())
|
||||||
var isiPad = (navigator.maxTouchPoints && navigator.maxTouchPoints > 0);
|
var isiPad = (navigator.maxTouchPoints && navigator.maxTouchPoints > 1);
|
||||||
// if (is_mobile) {
|
// if (is_mobile) {
|
||||||
// return true//判断是否在正则内
|
// return true//判断是否在正则内
|
||||||
// } else if(window.matchMedia("(pointer:fine)").matches){
|
// } else if(window.matchMedia("(pointer:fine)").matches){
|
||||||
@@ -160,7 +160,7 @@ const isMoible = () => {//判断是否是移动端
|
|||||||
if (is_mobile) {
|
if (is_mobile) {
|
||||||
return true//判断是否在正则内
|
return true//判断是否在正则内
|
||||||
} else{
|
} else{
|
||||||
isiPad//判断触摸点
|
return isiPad//判断触摸点
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -33,6 +33,9 @@
|
|||||||
<div class="button_first button_margin" @click="recollection()">
|
<div class="button_first button_margin" @click="recollection()">
|
||||||
{{ $t('HomeView.Edit') }}
|
{{ $t('HomeView.Edit') }}
|
||||||
</div>
|
</div>
|
||||||
|
<div class="button_first button_margin" @click="resetCollection()">
|
||||||
|
{{ $t('HomeView.Reset') }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="left_info_content scroll_style">
|
<div class="left_info_content scroll_style">
|
||||||
<div class="left_info_content_body" ref="collection_canvas">
|
<div class="left_info_content_body" ref="collection_canvas">
|
||||||
@@ -556,6 +559,13 @@ export default defineComponent({
|
|||||||
collectionModal.recollection();
|
collectionModal.recollection();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
resetCollection(){
|
||||||
|
this.store.commit("clearAllData");
|
||||||
|
this.store.commit("clearAllCollection");
|
||||||
|
this.store.commit("setAllBoardDataChoose",{});
|
||||||
|
this.store.commit("clearShowSketchboard",{});
|
||||||
|
|
||||||
|
},
|
||||||
//完成设计
|
//完成设计
|
||||||
finishCollection() {
|
finishCollection() {
|
||||||
let _this = this;
|
let _this = this;
|
||||||
|
|||||||
@@ -201,7 +201,6 @@ export default defineComponent({
|
|||||||
let likeFile = (item:any,type:string) => {
|
let likeFile = (item:any,type:string) => {
|
||||||
}
|
}
|
||||||
let getImgScale = (index:any)=>{
|
let getImgScale = (index:any)=>{
|
||||||
console.log(newScaleImage.value);
|
|
||||||
newScaleImage.value.scaleImageMask = true
|
newScaleImage.value.scaleImageMask = true
|
||||||
newScaleImage.value.init(filter.worksList,index)
|
newScaleImage.value.init(filter.worksList,index)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -875,7 +875,27 @@ export default defineComponent({
|
|||||||
centered:true,
|
centered:true,
|
||||||
onOk() {
|
onOk() {
|
||||||
data.deleteModelConfirm = 1
|
data.deleteModelConfirm = 1
|
||||||
|
let id = _this.store.state.Workspace.workspace.id
|
||||||
|
Https.axiosGet(Https.httpUrls.workspaceDetail,{params:{id:id}}).then((rv: any) => {
|
||||||
|
if (rv) {
|
||||||
|
if(rv.position == "Overall"){
|
||||||
|
rv.overallSingle = false
|
||||||
|
}else{
|
||||||
|
rv.overallSingle = true
|
||||||
|
}
|
||||||
|
if(rv.sexEnum.name == 'Female'){
|
||||||
|
rv.mannequinUrl = rv.femalePresignedUrl
|
||||||
|
rv.mannequinType = rv.mannequinFemaleType
|
||||||
|
rv.mannequinId = rv.mannequinFemaleId
|
||||||
|
}else if(rv.sexEnum.name == 'Male'){
|
||||||
|
rv.mannequinUrl = rv.malePresignedUrl
|
||||||
|
rv.mannequinType = rv.mannequinMaleType
|
||||||
|
rv.mannequinId = rv.mannequinMaleId
|
||||||
|
}
|
||||||
|
|
||||||
|
_this.store.commit("setWorkspace", rv);
|
||||||
|
}
|
||||||
|
})
|
||||||
_this.confirmDeletePic(data,index)
|
_this.confirmDeletePic(data,index)
|
||||||
},
|
},
|
||||||
onCancel(){
|
onCancel(){
|
||||||
@@ -1052,7 +1072,7 @@ export default defineComponent({
|
|||||||
ifMaximumLength(){
|
ifMaximumLength(){
|
||||||
clearTimeout(this.inputTime)
|
clearTimeout(this.inputTime)
|
||||||
this.inputTime = setTimeout(()=>{
|
this.inputTime = setTimeout(()=>{
|
||||||
if(this.captionGeneration?.split(/\s+/).length > 75){
|
if(this.captionGeneration?.split(/\s+/).length > 250){
|
||||||
(this.$refs.inputShowText as any).innerHTML = this.t('LibraryPage.maximumLength')
|
(this.$refs.inputShowText as any).innerHTML = this.t('LibraryPage.maximumLength')
|
||||||
this.inputShow = true
|
this.inputShow = true
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
@@ -529,6 +529,7 @@ export default defineComponent({
|
|||||||
this.store.commit("clearAllData");
|
this.store.commit("clearAllData");
|
||||||
this.store.commit("clearAllCollection");
|
this.store.commit("clearAllCollection");
|
||||||
this.store.commit("setAllBoardDataChoose",{});
|
this.store.commit("setAllBoardDataChoose",{});
|
||||||
|
this.store.commit("clearShowSketchboard",{});
|
||||||
this.$router.push("/home");
|
this.$router.push("/home");
|
||||||
},
|
},
|
||||||
//获取当前语言
|
//获取当前语言
|
||||||
|
|||||||
Reference in New Issue
Block a user