添加画布颜色历史

This commit is contained in:
X1627315083
2024-09-27 16:31:33 +08:00
parent e26d57dd76
commit 21b0af1365
32 changed files with 423 additions and 885 deletions

View File

@@ -195,7 +195,7 @@
</div>
</div>
<KeepAlive>
<CollectionModal ref="collectionModal" @finishCollection="finishCollection()"></CollectionModal>
<CollectionModal :getDesignData="getDesignData" ref="collectionModal" @finishCollection="finishCollection()"></CollectionModal>
</KeepAlive>
<productImg ref="productImg" @setTask="setTask"></productImg>
<DesignDetail ref="designDetail" @finishRedesign="finishRedesign"></DesignDetail>
@@ -616,53 +616,9 @@ export default defineComponent({
},
//完成设计
finishCollection() {
let _this = this;
_this.isFinishLoading = true;
this.getPantongName()
.then((res) => {
_this.store.commit("setAllBoardData");
_this.isHaveReviewCollection = true;
_this.isFinishLoading = false;
})
.catch((res) => {
_this.isFinishLoading = false;
});
this.isHaveReviewCollection = true;
this.isFinishLoading = false;
},
//查询颜色的潘通值和txc
getPantongName() {
let colorBoards = this.store.state.UploadFilesModule.colorBoards;
let data: any = [];
for (let v of colorBoards) {
let color: any = [v.rgbValue.r, v.rgbValue.g, v.rgbValue.b];
let hsv = rgbToHsv(color);
v.hsv = hsv[0] + hsv[1] + hsv[2];
data.push({
h: hsv[0],
s: hsv[1],
v: hsv[2],
});
}
return new Promise((resolve: any, reject: any) => {
Https.axiosPost(Https.httpUrls.getRgbByHsvBatch, data)
.then((rv: any) => {
if (rv) {
rv.forEach((ele: any, index: number) => {
colorBoards[index].id = ele.id;
colorBoards[index].tcx = ele.tcx;
colorBoards[index].name = ele.name;
});
this.store.commit("setColorboardList", colorBoards);
resolve();
}
})
.catch((res) => {
reject();
});
});
},
getContainer() {
return document.querySelector("#system_silder");
},
@@ -781,11 +737,16 @@ export default defineComponent({
timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone,
processId:this.designRandom
};
if (designCollectionId) {
let isLoad = false
if(designCollectionId == -1){
isLoad = true
} else if (designCollectionId) {
data.collectionId = designCollectionId;
}
this.designProgress = 0;
this.showDesignMark = true;
if(!isLoad){
this.designProgress = 0;
this.showDesignMark = true;
}
return data;
},
@@ -1001,7 +962,7 @@ export default defineComponent({
name:data.collection.moodTemplateName,
}
}]:[],
moodboardPosition:data.collection.moodboardPosition?data.collection.moodboardPosition:{},
moodboardPosition:data.collection.moodboardPosition?JSON.parse(data.collection.moodboardPosition):{},
moodboardFiles: this.dealViewChooseData(
data.collection.moodBoards,"Moodboard"
),