修复history回来的数据bug
This commit is contained in:
@@ -68,7 +68,8 @@
|
|||||||
@dragstart="onDragstart(key,imgItem)"
|
@dragstart="onDragstart(key,imgItem)"
|
||||||
>
|
>
|
||||||
<div class="exportCanvasBox_img">
|
<div class="exportCanvasBox_img">
|
||||||
<img :src="key == 'likeDesignCollectionList'?imgItem.designOutfitUrl:imgItem.imgUrl" alt="" />
|
<!-- <div v-if="key == 'likeDesignCollectionList'">{{ imgItem.designOutfitUrl }}</div> -->
|
||||||
|
<img :src="key == 'likeDesignCollectionList'?imgItem?.designOutfitUrl:imgItem?.imgUrl" alt="" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -225,10 +226,18 @@
|
|||||||
<div class="modal_title_text_intro">{{ $t('exportModel.requiresCredits') }}</div>
|
<div class="modal_title_text_intro">{{ $t('exportModel.requiresCredits') }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="SRExport_operate">
|
<div class="SRExport_operate">
|
||||||
<label>
|
<div class="SRExport_operate_box">
|
||||||
<div>{{ $t('exportModel.Scale') }}:</div>
|
<div>{{ $t('exportModel.Scale') }}:</div>
|
||||||
<input type="number" @input="setMaxInput('scale', 500)" v-model="scaleSR"/>
|
<!-- <input type="number" @input="setMaxInput('scale', 500)" v-model="scaleSR"/> -->
|
||||||
</label>
|
<a-select ref="select" class="SRExport_operate_sclae" size="small" v-model:value="scaleSR"
|
||||||
|
style="flex: 1"
|
||||||
|
@change="setScaleSR"
|
||||||
|
>
|
||||||
|
<!-- v-model:value="brushwork" -->
|
||||||
|
<a-select-option class="label_select_item" v-for="item in scaleSRList" :value="item.value">
|
||||||
|
</a-select-option>
|
||||||
|
</a-select>
|
||||||
|
</div>
|
||||||
<div :class="['check_all_block',allChecked ? 'check_all' : '']" @click="selectAllImg()">
|
<div :class="['check_all_block',allChecked ? 'check_all' : '']" @click="selectAllImg()">
|
||||||
<div class="check_block"><div class="check_block_body"></div></div>
|
<div class="check_block"><div class="check_block_body"></div></div>
|
||||||
<div>all</div>
|
<div>all</div>
|
||||||
@@ -236,7 +245,10 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="SRExport_img">
|
<div class="SRExport_img">
|
||||||
<img v-for="item in allExportSR" @click="selectImg(item)" class="SRExport_img_item" :class="[item.checked? 'active':'']" :src="item.imgUrl" alt="">
|
<div class="SRExport_img_item_box" v-for="item in allExportSR" @click="selectImg(item)">
|
||||||
|
<input type="checkbox" v-model="item.checked">
|
||||||
|
<img class="SRExport_img_item" :src="item.imgUrl" alt="">
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="generalModelOperate_endBtn">
|
<div class="generalModelOperate_endBtn">
|
||||||
<div class="generalModelOperate_btn_cancel" @click="cancelSRExport">{{ $t('exportModel.Cancel') }}</div>
|
<div class="generalModelOperate_btn_cancel" @click="cancelSRExport">{{ $t('exportModel.Cancel') }}</div>
|
||||||
@@ -315,11 +327,13 @@ export default defineComponent({
|
|||||||
normalCanvasState.value = []
|
normalCanvasState.value = []
|
||||||
reverseCanvasState.value = []
|
reverseCanvasState.value = []
|
||||||
showUpgradePlan.value = true;
|
showUpgradePlan.value = true;
|
||||||
nextTick().then(async () => {
|
|
||||||
let exportCanvasBoxCanvas = document.querySelector('.exportCanvasBox_center')
|
|
||||||
canvasWH.value.width = exportCanvasBoxCanvas.offsetWidth - 10
|
|
||||||
allBoardData.value.likeDesignCollectionList =
|
allBoardData.value.likeDesignCollectionList =
|
||||||
likeDesignCollectionList;
|
likeDesignCollectionList;
|
||||||
|
nextTick().then(async () => {
|
||||||
|
|
||||||
|
let exportCanvasBoxCanvas = document.querySelector('.exportCanvasBox_center')
|
||||||
|
canvasWH.value.width = exportCanvasBoxCanvas.offsetWidth - 10
|
||||||
|
|
||||||
let canvasBox = document.querySelector(
|
let canvasBox = document.querySelector(
|
||||||
".Export .exportCanvasBox_center"
|
".Export .exportCanvasBox_center"
|
||||||
);
|
);
|
||||||
@@ -387,6 +401,9 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
for (const [allItemIndex, allItem,] of allBoardData.value[key].entries()) {
|
for (const [allItemIndex, allItem,] of allBoardData.value[key].entries()) {
|
||||||
await new Promise((resolve, reject) => {
|
await new Promise((resolve, reject) => {
|
||||||
|
if(!allItem){
|
||||||
|
resolve()
|
||||||
|
}
|
||||||
maxHeight = position.y + position.height>maxHeight?position.y +position.height:maxHeight
|
maxHeight = position.y + position.height>maxHeight?position.y +position.height:maxHeight
|
||||||
if (key == "colorBoards") {
|
if (key == "colorBoards") {
|
||||||
let rect = setGroup(allItem)
|
let rect = setGroup(allItem)
|
||||||
@@ -1331,7 +1348,7 @@ export default defineComponent({
|
|||||||
allBoardData.value.printboardFiles.forEach((item)=>{
|
allBoardData.value.printboardFiles.forEach((item)=>{
|
||||||
arr.push({
|
arr.push({
|
||||||
imgUrl:item.imgUrl,
|
imgUrl:item.imgUrl,
|
||||||
checked:true,
|
checked:false,
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -1391,6 +1408,21 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
let allExportSR = ref([])
|
let allExportSR = ref([])
|
||||||
let scaleSR = ref(2);
|
let scaleSR = ref(2);
|
||||||
|
let scaleSRList = ref([
|
||||||
|
{
|
||||||
|
value:2,
|
||||||
|
label:2
|
||||||
|
},{
|
||||||
|
value:4,
|
||||||
|
label:4
|
||||||
|
},{
|
||||||
|
value:6,
|
||||||
|
label:6
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
let setScaleSR = (value)=>{
|
||||||
|
scaleSR.value = value
|
||||||
|
}
|
||||||
let showSRExport = ref(false)
|
let showSRExport = ref(false)
|
||||||
let cancelSRExport = ()=>{
|
let cancelSRExport = ()=>{
|
||||||
allExportSR.value = []
|
allExportSR.value = []
|
||||||
@@ -1490,6 +1522,8 @@ export default defineComponent({
|
|||||||
brushworkValue,//当前笔触
|
brushworkValue,//当前笔触
|
||||||
textureValue,//当前材质
|
textureValue,//当前材质
|
||||||
scaleSR,
|
scaleSR,
|
||||||
|
scaleSRList,
|
||||||
|
setScaleSR,
|
||||||
//SR页面
|
//SR页面
|
||||||
showSRExport,
|
showSRExport,
|
||||||
allExportSR,
|
allExportSR,
|
||||||
@@ -1778,12 +1812,26 @@ export default defineComponent({
|
|||||||
margin-bottom: 2rem;
|
margin-bottom: 2rem;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
min-height: 12rem;
|
||||||
|
.SRExport_img_item_box{
|
||||||
|
position: relative;
|
||||||
|
margin-right: 2rem;
|
||||||
|
margin-bottom: 2rem;
|
||||||
|
input{
|
||||||
|
position: absolute;
|
||||||
|
top: 0rem;
|
||||||
|
right: 0rem;
|
||||||
|
z-index: 2;
|
||||||
|
height: 3rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
img{
|
img{
|
||||||
width: 10rem;
|
width: 10rem;
|
||||||
max-height: 10rem;
|
max-height: 10rem;
|
||||||
object-fit: contain;
|
object-fit: contain;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-right: 2rem;
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
&.active{
|
&.active{
|
||||||
transform: scale(.8);
|
transform: scale(.8);
|
||||||
@@ -1827,18 +1875,30 @@ export default defineComponent({
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
label {
|
.SRExport_operate_box {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-bottom: 1rem;
|
margin-bottom: 1rem;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
div {
|
>div {
|
||||||
width: 8rem;
|
width: 5rem;
|
||||||
}
|
}
|
||||||
input {
|
.SRExport_operate_sclae{
|
||||||
// width: 10em;
|
max-width: 15rem;
|
||||||
overflow: hidden;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// input {
|
||||||
|
// // width: 10em;
|
||||||
|
// overflow: hidden;
|
||||||
|
// }
|
||||||
|
// label{
|
||||||
|
// display: flex;
|
||||||
|
// align-items: center;
|
||||||
|
// margin-right: 2rem;
|
||||||
|
// span{
|
||||||
|
// margin-right: 1rem;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.generalModelOperate_endBtn{
|
.generalModelOperate_endBtn{
|
||||||
|
|||||||
@@ -148,6 +148,7 @@ export default defineComponent({
|
|||||||
// setTimeout(() => {
|
// setTimeout(() => {
|
||||||
this.getTaskMoreList()
|
this.getTaskMoreList()
|
||||||
// }, 1000);
|
// }, 1000);
|
||||||
|
this.getTaskTime = null
|
||||||
},
|
},
|
||||||
sort(arr:any){
|
sort(arr:any){
|
||||||
arr.sort((a:any, b:any) => {
|
arr.sort((a:any, b:any) => {
|
||||||
|
|||||||
@@ -440,7 +440,11 @@ export default defineComponent({
|
|||||||
// console.log(this.store.state.UserHabit);
|
// console.log(this.store.state.UserHabit);
|
||||||
|
|
||||||
let noRefresh = this.$route.params.noRefresh; //判断是否主动刷新还是路由跳转过来的 true 路由跳转过来的
|
let noRefresh = this.$route.params.noRefresh; //判断是否主动刷新还是路由跳转过来的 true 路由跳转过来的
|
||||||
if (noRefresh) {
|
window.addEventListener('beforeunload', (event)=>{
|
||||||
|
this.store.commit("setUserGroupId", this.$route.params.id);
|
||||||
|
this.store.commit("clearAllCollection");
|
||||||
|
});
|
||||||
|
if (this.$route.name == "homePage") {
|
||||||
let colorBoards =
|
let colorBoards =
|
||||||
this.store.state.UploadFilesModule.allBoardData.colorBoards ||
|
this.store.state.UploadFilesModule.allBoardData.colorBoards ||
|
||||||
[];
|
[];
|
||||||
@@ -448,11 +452,12 @@ export default defineComponent({
|
|||||||
this.isHaveReviewCollection = true;
|
this.isHaveReviewCollection = true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.store.commit("setUserGroupId", this.$route.params.id);
|
// this.store.commit("setUserGroupId", this.$route.params.id);
|
||||||
this.store.commit("clearAllCollection");
|
// this.store.commit("clearAllCollection");
|
||||||
}
|
}
|
||||||
if (this.$route.params.id) {
|
if (this.$route.params.id) {
|
||||||
this.getHistoryChoose(this.$route.params.id, "normal");
|
this.getHistoryChoose(this.$route.params.id, "normal");
|
||||||
|
this.store.commit("setDesignCollectionList",[]);
|
||||||
} else {
|
} else {
|
||||||
this.store.commit("clearAllData");
|
this.store.commit("clearAllData");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user