Merge remote-tracking branch 'origin/StableVersion' into localDevelop

This commit is contained in:
X1627315083
2024-05-28 16:06:01 +08:00
22 changed files with 342 additions and 219 deletions

View File

@@ -34,6 +34,7 @@
<div class="admin_table_content" ref="historyTable">
<a-table
@resizeColumn="handleResizeColumn"
:columns="columns"
:data-source="dataList"
:scroll="{ y: historyTableHeight }"
@@ -146,6 +147,10 @@ export default defineComponent({
title: 'Create Time',
align: "center",
ellipsis: true,
// width: 150,
// minWidth: 100,
// maxWidth: 200,
// resizable: true,
dataIndex: "createTime",
key: "createTime",
},
@@ -153,6 +158,10 @@ export default defineComponent({
title: 'Occupation',
align: "center",
ellipsis: true,
// width: 150,
// minWidth: 100,
// maxWidth: 200,
// resizable: true,
dataIndex: "occupation",
key: "occupation",
},
@@ -160,6 +169,8 @@ export default defineComponent({
title: 'Trial Order Id',
align: "center",
ellipsis: true,
// width: 150,
// resizable: true,
dataIndex: "trialOrderId",
key: "trialOrderId",
},
@@ -202,6 +213,9 @@ export default defineComponent({
pageSize: 10,
total: 0,
historyTableHeight: 0,
handleResizeColumn: (w:any, col:any) => {
col.width = w;
},
};
},
mounted() {

View File

@@ -9,6 +9,7 @@
:data-source="dataList"
:scroll="{ y: historyTableHeight}"
@change="changePage"
@resizeColumn="handleResizeColumn"
:pagination="{
showSizeChanger: true,
current: currentPage,
@@ -30,27 +31,28 @@
<script lang="ts">
import { defineComponent, ref, createVNode, computed } from "vue";
import { Https } from "@/tool/https";
import type { TableColumnsType } from 'ant-design-vue';
import { setCookie, getCookie, WriteCookie } from "@/tool/cookie";
export default defineComponent({
components: {
},
setup() {
let renameData: any = ref({}); //修改名字选中的数据
const columns: any = computed(() => {
return [
const columns: any = ref<TableColumnsType>([
{
title: 'Email',
align: "center",
ellipsis: true,
width: 30,
width: 50,
dataIndex: "email",
key: "email",
fixed: 'left',
},
{
title: 'User Id',
align: "center",
width: 30,
width: 50,
dataIndex: "id",
key: "id",
},
@@ -58,7 +60,8 @@ export default defineComponent({
title: 'User Name',
align: "center",
ellipsis: true,
width: 30,
width: 50,
dataIndex: "userName",
key: "userName",
},
@@ -66,14 +69,16 @@ export default defineComponent({
title: 'Given Name',
align: "center",
ellipsis: true,
width: 30,
width: 50,
dataIndex: "givenName",
key: "givenName",
},
{
title: 'Create Time',
align: "center",
width: 30,
width: 50,
dataIndex: "createTime",
key: "createTime",
},
@@ -81,7 +86,8 @@ export default defineComponent({
title: 'Title',
align: "center",
ellipsis: true,
width: 30,
width: 50,
//
dataIndex: "title",
key: "title",
},
@@ -89,14 +95,12 @@ export default defineComponent({
title: 'Country',
align: "center",
ellipsis: true,
width: 30,
dataIndex: "country",
key: "country",
fixed: 'right',
},
];
});
]
);
let dataList: any = ref([]);
let userInfo: any = {};
return {
@@ -104,6 +108,11 @@ export default defineComponent({
dataList,
renameData,
userInfo,
handleResizeColumn: (w:any, col:any) => {
console.log(col,w);
col.width = w;
},
};
},
data() {

View File

@@ -81,6 +81,7 @@ export default defineComponent({
title: 'Email',
align: "center",
ellipsis: true,
width: 100,
dataIndex: "email",
key: "email",
@@ -90,6 +91,7 @@ export default defineComponent({
align: "center",
width: 70,
dataIndex: "updateTime",
key: "updateTime",
// customRender: (record: any) => {
// let time = formatTime(
@@ -103,6 +105,7 @@ export default defineComponent({
title: 'State',
align: "center",
ellipsis: true,
width: 70,
dataIndex: "status",
key: "status",
@@ -122,6 +125,7 @@ export default defineComponent({
title: 'Address',
align: "center",
ellipsis: true,
width: 70,
dataIndex: "country",
key: "country",
@@ -130,6 +134,7 @@ export default defineComponent({
title: 'Surname',
align: "center",
ellipsis: true,
width: 70,
dataIndex: "surname",
key: "surname",
@@ -138,6 +143,7 @@ export default defineComponent({
title: 'Name',
align: "center",
ellipsis: true,
width: 70,
dataIndex: "userName",
key: "userName",
@@ -150,6 +156,7 @@ export default defineComponent({
width: 70,
// slots:{customRender:'action'}
Operations: true,
},
];
});

View File

@@ -86,7 +86,7 @@
<i v-else class="fi fi-rr-picture centent clothes_item_icon" @click="openCurrent(1)"></i>
</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">
<i class="fi fi-rs-comments"></i>
<div>{{ $t('DesignDetail.CurrentPrint') }}</div>
@@ -100,7 +100,7 @@
</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">
<i class="fi fi-rs-comments"></i>
<div>{{ $t('DesignDetail.CurrentColor') }}</div>
@@ -278,6 +278,7 @@ export default defineComponent({
watch:{
designItemDetail:{
handler: async function(newVal,oldVal) {
let designItemDetail = JSON.parse(JSON.stringify(this.store.state.DesignDetailModule.designItemDetail))
this.ifSubmit = designItemDetail.ifSubmit?designItemDetail.ifSubmit:false
if(newVal.clothes.length == 0){
@@ -676,7 +677,7 @@ export default defineComponent({
changed:item.changed?item.changed:false,
designType:item.designType?item.designType:"Library",
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:{
ifSingle:item.printObject.ifSingle == null ? false : item.printObject.ifSingle,
// path:item.printObject.path?item.printObject.path :'',
@@ -850,7 +851,9 @@ export default defineComponent({
}else{
this.deleteShow = false
let designItemDetail = JSON.parse(JSON.stringify(this.designItemDetail))
let data:any = this.setSubmitItem('preview',true)
if(!this.deleteItemShow){
return
@@ -858,10 +861,17 @@ export default defineComponent({
this.loadingShow = true
Https.axiosPost(Https.httpUrls.designSingle, data).then(
(rv) => {
designItemDetail.currentFullBodyView = rv.currentFullBodyView
designItemDetail.ifSubmit = true
this.designItemDetail.currentFullBodyView = rv.currentFullBodyView
this.designItemDetail.ifSubmit = true
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.designSingleItemDTOList[data.designSingleItemDTOList.legnth-1] && !data.designSingleItemDTOList[data.designSingleItemDTOList.legnth-1].id){
data.designSingleItemDTOList.split(data.designSingleItemDTOList.legnth-1,1)
}
this.store.commit("setDesignItemDetail", designItemDetail);
console.log(123);
this.store.commit("setDesignPreviewData", data);
this.setRevocation(designItemDetail,data)
this.deleteItemShow = false
@@ -931,6 +941,7 @@ export default defineComponent({
"minIOPath": "",
"color": color,
gradient:gradient,
priority:10,
"printObject": {
"ifSingle": null,
"prints": [
@@ -944,10 +955,10 @@ export default defineComponent({
// let DesignDetailAlter:any = this.$refs.DesignDetailAlter
// DesignDetailAlter.changePlace()
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)
}else{
return
}
this.clothesDetail(aa,this.designItemDetail.clothes.length-1)
let DesignDetailAlter:any = this.$refs.DesignDetailAlter
@@ -971,8 +982,13 @@ export default defineComponent({
let designItemDetail = JSON.parse(JSON.stringify(this.store.state.DesignDetailModule.designItemDetail))
this.designOrder = true
this.current = designItemDetail.clothes[index]
if(this.current.id && !designItemDetail.clothes[designItemDetail.clothes.length-1].id){
if(clothes){
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)
this.store.commit('setDesignItemDetail',designItemDetail)
}
@@ -985,6 +1001,7 @@ export default defineComponent({
}
});
}
this.currentIndex = this.currentIndex>0?this.currentIndex:0
data.designSingleItemDTOList[this.currentIndex] = {
color:`${this.current.color.r} ${this.current.color.g} ${this.current.color.b}`,
@@ -994,7 +1011,7 @@ export default defineComponent({
path:this.current.minIOPath?this.current.minIOPath:'',
offset:this.current.layersObject?.[1]?.offset?this.current.layersObject[1].offset:[0,0],
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:{
ifSingle:this.current?.printObject?.ifSingle == null ? false : this.current?.printObject?.ifSingle,
// prints:this.current?.printObject[0]?.path == null ? [] : [{

View File

@@ -566,7 +566,17 @@ export default defineComponent({
init(num){
this.type_ = num
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]){
// arr[3] = 1
// }

View File

@@ -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_==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">
<img v-for="item in current.layersObject" :src="item.imageUrl" alt="">
<img v-for="item in current?.layersObject" :src="item.imageUrl" alt="">
</div>
</div>
@@ -84,7 +84,7 @@
</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-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>
@@ -189,7 +189,7 @@ export default defineComponent({
this.type_ = num
this.colorList[this.selectIndex] = this.$parent.selectColor
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?this.current?.printObject?.prints[0].scale?this.current?.printObject?.prints[0].scale*100:100:100
},
//模型
setSketchImg(v){
@@ -304,13 +304,16 @@ export default defineComponent({
}
}
})
index = index? index:0
if(!this.current.id){
data.designSingleItemDTOList[index].priority = zIndex+=1
if(index){
data.designSingleItemDTOList[index].priority = zIndex+=1
}
}
if(this.type_ == 1){
if(data.designSingleItemDTOList[index].path != this.sketchImg.minIOPath && this.sketchImg.id_){
data.designSingleItemDTOList[index].offset = [0,0]
data.designSingleItemDTOList[index].scale = 1
data.designSingleItemDTOList[index].scale = [1,1]
}
data.designSingleItemDTOList = this.soleId(data.designSingleItemDTOList,index)
this.sketchImg.id_ = data.designSingleItemDTOList[index].id

View File

@@ -41,6 +41,7 @@
<div v-show="!overallSingle" class="habit_System_Designer">
<div class="habit_System_Designer_text">{{ $t('DesignPrintOperation.Scale') }}</div>
<a-slider id="system_silder"
:min="1"
v-model:value="systemDesignerPercentage"
@afterChange="systemDesigner"
:tip-formatter="formatter"
@@ -296,15 +297,14 @@ export default defineComponent({
this.refetchTemplate(0)
}
})
}
},
systemDesigner(num) {
let DesignPrintOperationParent = this.$parent
DesignPrintOperationParent.systemDesignerPercentage = num
},
formatter(value) {
if(value<30)value = 30
return `${value*3}%`;
},
@@ -608,7 +608,7 @@ export default defineComponent({
let location
arr.forEach((v,index)=>{
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,arr[index].style.top.replace(/px/g,'')*sketchNum]
}else{
@@ -678,24 +678,28 @@ export default defineComponent({
index = ind
}
})
designItemDetail.currentFullBodyView = this.designItemDetailTS.rv.currentFullBodyView
designItemDetail.clothes[index].printObject.ifSingle = this.overallSingle
designItemDetail.clothes[index].layersObject = this.designItemDetailTS.rv.clothes[index].layersObject
designItemDetail.clothes[index].printObject.prints = this.computeZindex()
designItemDetail.ifSubmit = true
designItemDetail.clothes.forEach((item,i)=>{
let a
if(item.layersObject[0].imageCategory.indexOf("back") == -1){
a = item.layersObject[0]
item.layersObject[0] = item.layersObject[1]
item.layersObject[1] = a
}
item.layersObject[0].id = this.store.state.DesignDetailModule.designItemDetail.clothes[i].layersObject[0].id
item.layersObject[1].id = this.store.state.DesignDetailModule.designItemDetail.clothes[i].layersObject[1].id
})
this.store.commit("setDesignItemDetail", designItemDetail);
this.store.commit("setDesignPreviewData", this.designItemDetailTS.data);
this.setRevocation(designItemDetail,this.designItemDetailTS.data)
console.log(this.designItemDetailTS);
if(this.designItemDetailTS.rv){
designItemDetail.currentFullBodyView = this.designItemDetailTS.rv.currentFullBodyView
designItemDetail.clothes[index].printObject.ifSingle = this.overallSingle
designItemDetail.clothes[index].layersObject = this.designItemDetailTS.rv.clothes[index].layersObject
designItemDetail.clothes[index].printObject.prints = this.computeZindex()
designItemDetail.ifSubmit = true
designItemDetail.clothes.forEach((item,i)=>{
let a
if(item.layersObject[0].imageCategory.indexOf("back") == -1){
a = item.layersObject[0]
item.layersObject[0] = item.layersObject[1]
item.layersObject[1] = a
}
item.layersObject[0].id = this.store.state.DesignDetailModule.designItemDetail.clothes[i].layersObject[0]?.id
item.layersObject[1].id = this.store.state.DesignDetailModule.designItemDetail.clothes[i].layersObject[1]?.id
})
this.store.commit("setDesignItemDetail", designItemDetail);
this.store.commit("setDesignPreviewData", this.designItemDetailTS.data);
this.setRevocation(designItemDetail,this.designItemDetailTS.data)
this.designItemDetailTS = {}
}
this.designOpenrtion = false
if(this.driver__.driver){
driverObj__.moveNext();

View File

@@ -41,6 +41,7 @@
<div v-show="!overallSingle" class="habit_System_Designer">
<div class="habit_System_Designer_text">Scale</div>
<a-slider id="system_silder"
:min="1"
v-model:value="systemDesignerPercentage"
@afterChange="systemDesigner"
:tip-formatter="formatter"
@@ -610,7 +611,7 @@ export default defineComponent({
let location
arr.forEach((v,index)=>{
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,arr[index].style.top.replace(/px/g,'')*sketchNum]
}else{
@@ -681,27 +682,27 @@ export default defineComponent({
}
})
this.designOpenrtion = false
if(!this.designItemDetailTS.rv){
return
if(this.designItemDetailTS.rv){
designItemDetail.currentFullBodyView = this.designItemDetailTS.rv.currentFullBodyView
designItemDetail.clothes[index].printObject.ifSingle = this.overallSingle
designItemDetail.clothes[index].layersObject = this.designItemDetailTS.rv.clothes[index].layersObject
designItemDetail.clothes[index].printObject.prints = this.computeZindex()
designItemDetail.ifSubmit = true
designItemDetail.clothes.forEach((item,i)=>{
let a
if(item.layersObject[0].imageCategory.indexOf("back") == -1){
a = item.layersObject[0]
item.layersObject[0] = item.layersObject[1]
item.layersObject[1] = a
}
item.layersObject[0].id = this.store.state.DesignDetailModule.designItemDetail.clothes[i].layersObject[0].id
item.layersObject[1].id = this.store.state.DesignDetailModule.designItemDetail.clothes[i].layersObject[1].id
})
this.store.commit("setDesignItemDetail", designItemDetail);
this.store.commit("setDesignPreviewData", this.designItemDetailTS.data);
this.setRevocation(designItemDetail,this.designItemDetailTS.data)
this.designItemDetailTS = {}
}
designItemDetail.currentFullBodyView = this.designItemDetailTS.rv.currentFullBodyView
designItemDetail.clothes[index].printObject.ifSingle = this.overallSingle
designItemDetail.clothes[index].layersObject = this.designItemDetailTS.rv.clothes[index].layersObject
designItemDetail.clothes[index].printObject.prints = this.computeZindex()
designItemDetail.ifSubmit = true
designItemDetail.clothes.forEach((item,i)=>{
let a
if(item.layersObject[0].imageCategory.indexOf("back") == -1){
a = item.layersObject[0]
item.layersObject[0] = item.layersObject[1]
item.layersObject[1] = a
}
item.layersObject[0].id = this.store.state.DesignDetailModule.designItemDetail.clothes[i].layersObject[0].id
item.layersObject[1].id = this.store.state.DesignDetailModule.designItemDetail.clothes[i].layersObject[1].id
})
this.store.commit("setDesignItemDetail", designItemDetail);
this.store.commit("setDesignPreviewData", this.designItemDetailTS.data);
this.setRevocation(designItemDetail,this.designItemDetailTS.data)
if(this.driver__.driver){
driverObj__.moveNext();
}
@@ -755,6 +756,11 @@ export default defineComponent({
<style lang="less">
.designOpenrtionMobile_modal {
-moz-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
-khtml-user-select: none;
user-select: none;
// max-width: 1440px;
.mark_loading{
position: absolute;

View File

@@ -97,18 +97,19 @@
<div class="habit_System_Designer">
<a-slider id="system_silder"
v-model:value="workspaceItem.systemDesignerPercentage"
@afterChange="systemDesigner"
@afterChange="setSystemDesigner"
:tip-formatter="formatter"
:tooltipVisible="false"
>
</a-slider>
<div class="habit_System_Designer_text_max">
<div class="habit_System_Designer_text">
{{ $t('Habit.System') }}<span>(100%)</span>
{{ $t('Habit.System') }}<span>({{systemDesigner.system}}%)</span>
</div>
<div class="habit_System_Designer_text">
{{ $t('Habit.Designer') }}<span>(100%)</span>
{{ $t('Habit.Designer') }}<span>({{systemDesigner.designer}}%)</span>
</div>
</div>
</div>
@@ -202,6 +203,10 @@ export default defineComponent({
mannequinType:'',
mannequinId:'',
})
let systemDesigner:any = ref({
system:0,
designer:0,
})
let mannequins:any = ref([{},{}])
let systemSeleves= ref(false);
let total= ref(0);
@@ -240,6 +245,7 @@ export default defineComponent({
return{
systemSeleves,
mannequins,
systemDesigner,
openType,
total,
driver__,
@@ -473,6 +479,7 @@ export default defineComponent({
// v.putName = false
// });
this.workspace.id = rv.id
if(str == 'detail') this.getDetail(rv.id)
this.total = rv.page.total
this.workspace.workspaceList = rv.page.content
@@ -653,10 +660,12 @@ export default defineComponent({
}
},
//设置系统设计占比
systemDesigner(num: number) {
setSystemDesigner(num: number) {
this.workspaceItem.systemDesignerPercentage = num
},
formatter(value: number) {
this.systemDesigner.system = 100 - value
this.systemDesigner.designer = value
let num = Math.abs((value-50)*2)
return `${num}%`;
},
@@ -968,7 +977,7 @@ export default defineComponent({
}
.habit_System_Designer {
margin-top: calc(8rem*1.2);
// margin-top: calc(8rem*1.2);
:deep(.ant-slider-track),
:deep(.ant-slider-rail) {

View File

@@ -139,7 +139,6 @@ export default defineComponent({
let front = []
let back = []
let body
designItemDetail.others.forEach((item) => {
if(item.type == 'Body'){
body = item
@@ -299,7 +298,7 @@ export default defineComponent({
w = (e.x - this.frontBack.front[this.imgDomIndex].centers.left)
h = (e.x - this.frontBack.front[this.imgDomIndex].centers.left)*num
width = w+'px'
height = w*num+'px'
// height = w*num+'px'
}else if(this.direction == 'top'){
num = width/height
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)
height = h+'px'
width = h*num+'px'
// width = h*num+'px'
}else if(this.direction == 'bottom'){
num = width/height
h = (e.y - this.frontBack.front[this.imgDomIndex].centers.top)
height = h+'px'
width = h*num+'px'
// width = h*num+'px'
}else if(this.direction == 'left'){
this.frontBack.front[this.imgDomIndex].style.left = 'auto'
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)
width = w+'px'
height = w*num+'px'
// height = w*num+'px'
}
//判断尺寸是否到边
this.frontBack.front[this.imgDomIndex].style.width = width
@@ -409,8 +408,10 @@ export default defineComponent({
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 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
item.scale = scale
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
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 left = x == 0 ? item.offset[0]:x+item.offset[0]
item.offset = [left,top]

View File

@@ -296,7 +296,7 @@ export default defineComponent({
w = (e.changedTouches[0].pageX -imgDomWH.left)
h = (e.changedTouches[0].pageX -imgDomWH.left)*num
width = w+'px'
height = w*num+'px'
// height = w*num+'px'
}else if(this.direction == 'top'){
num = width/height
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)
height = h+'px'
width = h*num+'px'
// width = h*num+'px'
}else if(this.direction == 'bottom'){
num = width/height
h = (e.changedTouches[0].pageY -imgDomWH.top)
height = h+'px'
width = h*num+'px'
// width = h*num+'px'
}else if(this.direction == 'left'){
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.right = this.frontBack.front[this.imgDomIndex].centers.right+'px'
width = w+'px'
height = w*num+'px'
// height = w*num+'px'
}
//判断尺寸是否到边
this.frontBack.front[this.imgDomIndex].style.width = width
@@ -403,12 +403,13 @@ export default defineComponent({
imageCategory1 = arr[1].imageCategory
}
arr.forEach((i)=>{
let imageCategory = i.imageCategory.split('_')[0]
if(item.id == i.id){
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 scale = i?.imageSize?Number(((i?.style?.width.replace(/px/g,'')*ratio)/(i?.imageSize[0]/i.scale)).toFixed(2)):1
item.scale = scale
// let scale = i?.imageSize?Number(((i?.style?.width.replace(/px/g,'')*ratio)/(i?.imageSize[0]/i.scale)).toFixed(2)):1
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 left = x == 0 ? item.offset[0]:x+item.offset[0]
item.offset = [left,top]
@@ -449,6 +450,11 @@ export default defineComponent({
<style lang="less" scoped>
.designOpenrtion_modal {
// 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{
padding: calc(4rem*1.2) calc(5rem*1.2) calc(0rem*1.2)!important;
// height: calc(65vh - 6.calc(4rem*1.2));

View File

@@ -443,8 +443,9 @@ export default defineComponent({
}
},
layout(){
async layout(){
if(this.loadingShow)return
this.loadingShow = true
this.store.commit("setDisposeMoodboard", []);
let arr = JSON.parse(JSON.stringify(this.store.state.UploadFilesModule.moodboard))
this.layoutList = arr
@@ -457,51 +458,52 @@ export default defineComponent({
}
if(this.moodb_[arr.length-1].length != 1){
if(JSON.stringify(this.moodb_className) == JSON.stringify(this.moodb_[arr.length-1][random])){
this.loadingShow = false
this.layout()
return
}
}
if(this.loadingShow){
return
}
this.loadingShow = true
this.edieShow = true
if(this.moodb_[arr.length-1].length == 2){
this.moodb_className = this.moodb_[arr.length-1][0]
}else{
this.moodb_className = this.moodb_[arr.length-1][random]
}
this.layoutOpen = true
//提交模板
// this.loadingShow = true
this.layoutList.forEach((v:any)=>{
v.setPitch = false
})
nextTick().then(async ()=>{
nextTick().then(()=>{
let layoutCentent = document.getElementById('modal_img')
let file = await domTurnImg(layoutCentent)
let param = new FormData();
param.append('inPin','0')
param.append('level1Type','Moodboard')
param.append('gender','')
param.append('timeZone',Intl.DateTimeFormat().resolvedOptions().timeZone)
param.append('file',file);
let config:any = {headers:{'Content-Type':'multipart/form-data','Accept':'*/*' }}
Https.axiosPost(Https.httpUrls.elementUpload,param,config)
.then((rv: any) => {
let img:any = rv
img.imgUrl = rv.url
img.resData = JSON.parse(JSON.stringify(img))
this.store.commit("setDisposeMoodboard", img);
domTurnImg(layoutCentent).then((rv)=>{
let file = rv
let param = new FormData();
param.append('inPin','0')
param.append('level1Type','Moodboard')
param.append('gender','')
param.append('timeZone',Intl.DateTimeFormat().resolvedOptions().timeZone)
param.append('file',file);
let config:any = {headers:{'Content-Type':'multipart/form-data','Accept':'*/*' }}
Https.axiosPost(Https.httpUrls.elementUpload,param,config)
.then((rv: any) => {
let img:any = rv
img.imgUrl = rv.url
img.resData = JSON.parse(JSON.stringify(img))
this.store.commit("setDisposeMoodboard", img);
this.loadingShow = false
}
).catch(rv=>{
this.loadingShow = false
})
if(this.driver__.driver){
driverObj__.moveNext()
}
).catch(rv=>{
this.loadingShow = false
})
if(this.driver__.driver){
driverObj__.moveNext()
}
})
})
},
setmoodbClass(val:any){
this.moodb_className = val

View File

@@ -1149,6 +1149,7 @@ export default defineComponent({
cursor: pointer;
&:hover .delete_like_file_block{
display: block;
opacity: 1;
}
img{
object-fit: cover;

View File

@@ -612,25 +612,28 @@ export default defineComponent({
})
nextTick().then(async ()=>{
let layoutCentent = document.getElementById('layoutCentent')
let file = await domTurnImg(layoutCentent)
let param = new FormData();
param.append('inPin','0')
param.append('gender','')
param.append('level1Type','Moodboard')
param.append('timeZone',Intl.DateTimeFormat().resolvedOptions().timeZone)
param.append('file',file);
let config:any = {headers:{'Content-Type':'multipart/form-data','Accept':'*/*' }}
Https.axiosPost(Https.httpUrls.elementUpload,param,config)
.then((rv: any) => {
// console.log(rv);
rv.imgUrl = rv.url
this.layout = false
domTurnImg(layoutCentent).then((rv)=>{
let file =rv
let param = new FormData();
param.append('inPin','0')
param.append('gender','')
param.append('level1Type','Moodboard')
param.append('timeZone',Intl.DateTimeFormat().resolvedOptions().timeZone)
param.append('file',file);
let config:any = {headers:{'Content-Type':'multipart/form-data','Accept':'*/*' }}
Https.axiosPost(Https.httpUrls.elementUpload,param,config)
.then((rv: any) => {
// console.log(rv);
rv.imgUrl = rv.url
this.layout = false
this.loadingShow = false
this.store.commit("setDisposeMoodboard", rv);
}
).catch(rv=>{
this.loadingShow = false
this.store.commit("setDisposeMoodboard", rv);
}
).catch(rv=>{
this.loadingShow = false
})
})
})
},

View File

@@ -182,6 +182,28 @@ export default defineComponent({
this.uploadUrl = getUploadUrl();
},
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:{
mounted (el,layout:any,binding) {
@@ -543,28 +565,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: {
init(){
@@ -643,27 +643,28 @@ export default defineComponent({
})
nextTick().then(async ()=>{
let layoutCentent = document.getElementById('layoutCentent')
let file = await domTurnImg(layoutCentent)
let param = new FormData();
param.append('inPin','0')
param.append('gender','')
param.append('level1Type','Moodboard')
param.append('timeZone',Intl.DateTimeFormat().resolvedOptions().timeZone)
param.append('file',file);
let config:any = {headers:{'Content-Type':'multipart/form-data','Accept':'*/*' }}
Https.axiosPost(Https.httpUrls.elementUpload,param,config)
.then((rv: any) => {
// console.log(rv);
rv.imgUrl = rv.url
this.layout = false
domTurnImg(layoutCentent).then((rv)=>{
let file = rv
let param = new FormData();
param.append('inPin','0')
param.append('gender','')
param.append('level1Type','Moodboard')
param.append('timeZone',Intl.DateTimeFormat().resolvedOptions().timeZone)
param.append('file',file);
let config:any = {headers:{'Content-Type':'multipart/form-data','Accept':'*/*' }}
Https.axiosPost(Https.httpUrls.elementUpload,param,config)
.then((rv: any) => {
// console.log(rv);
rv.imgUrl = rv.url
this.layout = false
this.loadingShow = false
this.store.commit("setDisposeMoodboard", rv);
}
).catch(rv=>{
this.loadingShow = false
this.store.commit("setDisposeMoodboard", rv);
}
).catch(rv=>{
this.loadingShow = false
})
})
})
},
beforeUpload(){
@@ -864,6 +865,8 @@ export default defineComponent({
// object-fit: cover;
// width: 100%;
// height: 100%;
height: 100%;
width: auto;
pointer-events: none;
float: left;
user-select:none;

View File

@@ -111,6 +111,7 @@ export default {
GetStarted:'开始设计',
Start:'开始',
Edit:'编辑',
Reset:'重置',
Design:'设计',
Redesign:'重新设计',
GeneratedDesign:'生成的设计',
@@ -130,6 +131,7 @@ export default {
jsContent7:"友情提示",
jsContent5:"我们很高兴让您体验AiDA 3.0。请注意,部分服务在试用期间可能会受到限制。如果您已经准备好全身心投入并享受完整的体验,我们诚挚地邀请您订阅。只需访问",
jsContent6:" 就可以开始订阅。感谢您试用我们的服务!",
jsContent9:"是否清除当前收集?",
},
LibraryPage:{
Organize:'整理',

View File

@@ -112,6 +112,7 @@ export default {
GetStarted:'Get Started',
Start:'Start',
Edit:'Edit',
Reset:'Reset',
Design:'Design',
Redesign:'Redesign',
GeneratedDesign:'Generated Design',
@@ -131,6 +132,7 @@ export default {
jsContent7:"Friendly Reminder",
jsContent5:"We're delighted to have you experience AiDA 3.0. Please be aware that some services may be limited during the trial period. If you're ready to fully dive in and enjoy the complete experience, we warmly invite you to subscribe. Just visit ",
jsContent6:" to get started. Thank you for trying our services!",
jsContent9:"Whether to clear the current collection?",
},
LibraryPage:{
Organize:'Organize',

View File

@@ -185,7 +185,6 @@ const UploadFilesModule : Module<UploadFiles,RootState> = {
state.printboard = [...state.printboardFiles,...state.printGenerateFiles,...state.printMaterialFiles]
},
setColorboardList(state,colorBoards){
state.colorBoards = colorBoards
},

View File

@@ -1,45 +1,48 @@
import html2canvas from "html2canvas";
const getJpeg = dom =>{
return new Promise(resolve =>{
html2canvas(dom,{useCORS: true,}).then(canvas =>{
let base64 = canvas.toDataURL('image/jpeg',.9);
let quality = 0.9 // 压缩系数0-1之间
let newImage = new Image()
newImage.src = base64
newImage.setAttribute('crossOrigin', 'Anonymous') // url为外域时需要
let imgWidth,
imgHeight
let w = undefined
newImage.onload = function () {
w = this.width * 1
imgWidth = this.width
imgHeight = this.height
let canvas = document.createElement('canvas')
let ctx = canvas.getContext('2d')
if (Math.max(imgWidth, imgHeight) > w) {
if (imgWidth > imgHeight) {
canvas.width = w
canvas.height = w * (imgHeight / imgWidth)
} else {
canvas.height = w
canvas.width = w * (imgWidth / imgHeight)
}
} else {
canvas.width = imgWidth
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
let smallBase64 = canvas.toDataURL('image/jpeg', quality) // 压缩语句
let fileData = dataURLtoFile(smallBase64);
let fileOfBlob = new File([fileData], new Date() + ".jpg"); // 命名图片名
// console.log(smallBase64);
// resolve(base64ToFile(fileOfBlob))
resolve(fileOfBlob)
}
return new Promise(resolve =>{
setTimeout(() => {
html2canvas(dom,{useCORS: true,}).then(canvas =>{
let base64 = canvas.toDataURL('image/jpeg',.9);
// let quality = 0.9 // 压缩系数0-1之间
let newImage = new Image()
newImage.src = base64
newImage.setAttribute('crossOrigin', 'Anonymous') // url为外域时需要
// let imgWidth,
// imgHeight
// let w = undefined
newImage.onload = function () {
// w = this.width * 1
// imgWidth = this.width
// imgHeight = this.height
// let canvas = document.createElement('canvas')
// let ctx = canvas.getContext('2d')
// if (Math.max(imgWidth, imgHeight) > w) {
// if (imgWidth > imgHeight) {
// canvas.width = w
// canvas.height = w * (imgHeight / imgWidth)
// } else {
// canvas.height = w
// canvas.width = w * (imgWidth / imgHeight)
// }
// } else {
// canvas.width = imgWidth
// 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
// let smallBase64 = canvas.toDataURL('image/jpeg', quality) // 压缩语句
let fileData = dataURLtoFile(base64);
let fileOfBlob = new File([fileData], new Date() + ".jpg"); // 命名图片名
// console.log(smallBase64);
// resolve(base64ToFile(fileOfBlob))
resolve(fileOfBlob)
}
})
}, 100);
})
})
}
//base64转成blob
function dataURLtoFile(dataURI, type) {

View File

@@ -149,7 +149,7 @@ const formatTime = (timestamp, fmt) => {//吧时间戳转为YYYY-MM-DD hh:mm:ss
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;
// alert(navigator.userAgent.toLowerCase())
var isiPad = (navigator.maxTouchPoints && navigator.maxTouchPoints > 0);
var isiPad = (navigator.maxTouchPoints && navigator.maxTouchPoints > 1);
// if (is_mobile) {
// return true//判断是否在正则内
// } else if(window.matchMedia("(pointer:fine)").matches){
@@ -160,7 +160,7 @@ const isMoible = () => {//判断是否是移动端
if (is_mobile) {
return true//判断是否在正则内
} else{
isiPad//判断触摸点
return isiPad//判断触摸点
}
}

View File

@@ -27,12 +27,15 @@
<!-- 有图状态 start-->
<div class="home_left_info" v-show="isHaveReviewCollection">
<div class="left_info_top">
<div class="button_second" @click="startNewCollection()">
<!-- <div class="button_second" @click="startNewCollection()">
{{ $t('HomeView.Start') }}
</div>
</div> -->
<div class="button_first button_margin" @click="recollection()">
{{ $t('HomeView.Edit') }}
</div>
<div class="button_first button_margin" @click="resetCollection()">
{{ $t('HomeView.Reset') }}
</div>
</div>
<div class="left_info_content scroll_style">
<div class="left_info_content_body" ref="collection_canvas">
@@ -234,7 +237,7 @@ import { useStore } from "vuex";
import { Https } from "@/tool/https";
import { rgbToHsv, dataURLtoBlob } from "@/tool/util";
import { openGuide,driverObj__ } from "@/tool/guide";
import { LoadingOutlined } from "@ant-design/icons-vue";
import { LoadingOutlined ,ExclamationCircleOutlined} from "@ant-design/icons-vue";
import draggable from 'vuedraggable'
// import JSZip, { forEach } from "jszip";
import { setCookie, getCookie, WriteCookie } from "@/tool/cookie";
@@ -560,6 +563,24 @@ export default defineComponent({
collectionModal.recollection();
},
resetCollection(){
let _this = this
Modal.confirm({
title: this.t('HomeView.jsContent9'),
icon: createVNode(ExclamationCircleOutlined),
okText: 'Yes',
cancelText: 'No',
mask:false,
centered:true,
onOk() {
_this.store.commit("clearAllData");
_this.store.commit("clearAllCollection");
_this.store.commit("setAllBoardDataChoose",{});
_this.store.commit("clearShowSketchboard",{});
_this.isHaveReviewCollection = false
}
});
},
//完成设计
finishCollection() {
let _this = this;

View File

@@ -529,6 +529,7 @@ export default defineComponent({
this.store.commit("clearAllData");
this.store.commit("clearAllCollection");
this.store.commit("setAllBoardDataChoose",{});
this.store.commit("clearShowSketchboard",{});
this.$router.push("/home");
},
//获取当前语言