history标签功能
This commit is contained in:
@@ -681,6 +681,10 @@ export default defineComponent({
|
||||
}
|
||||
isLoadCanvas = true;
|
||||
canvas.loadFromJSON(canvasState.value[index], () => {
|
||||
canvas.forEachObject(function(obj) {
|
||||
obj.cornerSize = 10
|
||||
obj.transparentCorners=false
|
||||
});
|
||||
canvas.renderAll();
|
||||
stateIndex.value = index;
|
||||
});
|
||||
|
||||
@@ -127,7 +127,7 @@ export default defineComponent({
|
||||
]
|
||||
let sex:any = ref('Meal')
|
||||
let designType:any = ref('Outwear')
|
||||
let renameType:any = ref('single')//修改名字的方式single-单个 batch-批量
|
||||
let renameType:any = ref('total')//修改名字的方式single-单个 batch-批量
|
||||
let selectImgList:any = ref([])
|
||||
|
||||
return {
|
||||
@@ -164,12 +164,12 @@ export default defineComponent({
|
||||
let parent:any = this.$parent
|
||||
this.selectCode = parent.selectCode || ''
|
||||
this.value = parent.value || ''
|
||||
this.disignTypeList = parent.disignTypeList || ''
|
||||
this.sexList = parent.sexList || ''
|
||||
this.disignTypeList = parent.disignTypeList || []
|
||||
this.sexList = parent.sexList || []
|
||||
this.sex = parent.sex || ''
|
||||
this.designType = parent.designType || ''
|
||||
this.selectImgList = parent.selectImgList || ''
|
||||
this.options = parent.options || ''
|
||||
this.options = parent.options || []
|
||||
|
||||
this.newPicName = ''
|
||||
this.editSex = this.sex
|
||||
@@ -199,7 +199,8 @@ export default defineComponent({
|
||||
this.value.editLabelValue = []
|
||||
this.selectSingleImg = data
|
||||
this.newPicName = data.name
|
||||
if(type === 'single'){
|
||||
|
||||
if(type === 'total'){
|
||||
Https.axiosPost(Https.httpUrls.getRelClassificationIdList, classData).then(
|
||||
(rv: any) => {
|
||||
this.value.editLabelValue = rv
|
||||
@@ -207,7 +208,11 @@ export default defineComponent({
|
||||
).catch((res)=>{
|
||||
});
|
||||
}else{
|
||||
classData.libraryIdList = data
|
||||
if(this.selectCode == 'History'){
|
||||
classData.libraryIdList = [data.id]
|
||||
}else{
|
||||
classData.libraryIdList = data
|
||||
}
|
||||
Https.axiosPost(Https.httpUrls.getRelPublicClassificationIdList, classData).then(
|
||||
(rv: any) => {
|
||||
this.value.editLabelValue = rv
|
||||
@@ -247,8 +252,10 @@ export default defineComponent({
|
||||
},
|
||||
async confrimRename(){
|
||||
let data = {
|
||||
libraryIds:this.renameType === 'single' ? [this.selectSingleImg.id] : this.selectImgList,
|
||||
libraryName:this.newPicName,
|
||||
libraryIds:this.renameType === 'total' ? this.selectImgList : [this.selectSingleImg.id] ,
|
||||
libraryName:this.newPicName,//library名字
|
||||
userGroupName:this.newPicName,//history名字
|
||||
userGroupId :this.selectSingleImg.id,//history id
|
||||
timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,
|
||||
}
|
||||
let designType = this.selectCode == 'Sketchboard' || this.selectCode == 'MarketingSketch' ? this.designType.value : ''
|
||||
@@ -261,40 +268,46 @@ export default defineComponent({
|
||||
"classificationName": "",
|
||||
"createTime": "",
|
||||
"id": 0,
|
||||
"libraryIdList": this.renameType === 'single' ? [this.selectSingleImg.id] : this.selectImgList,
|
||||
"libraryIdList": this.renameType === 'total' ? this.selectImgList : [this.selectSingleImg.id],
|
||||
"type": this.selectCode,
|
||||
"updateTime": "",
|
||||
"userId": 0
|
||||
}
|
||||
let bor = false
|
||||
if(this.newPicName){//多选修改名字
|
||||
await Https.axiosPost(Https.httpUrls.batchUpdateLibraryName, data).then(
|
||||
(rv: any) => {
|
||||
// if(this.renameType ==='batch'){
|
||||
// this.selectImgList = []
|
||||
// }
|
||||
bor = true
|
||||
}
|
||||
).catch((res)=>{
|
||||
});
|
||||
}
|
||||
if(this.renameType == 'single'){//多选修改标签
|
||||
await Https.axiosPost(Https.httpUrls.relationLibrary, data2).then(
|
||||
if(this.newPicName && this.selectCode == 'History'){//多选修改名字
|
||||
|
||||
await Https.axiosPost(Https.httpUrls.updateUserGroupName, data).then(
|
||||
(rv: any) => {
|
||||
bor = true
|
||||
}
|
||||
).catch((res)=>{
|
||||
});
|
||||
}else{
|
||||
await Https.axiosPost(Https.httpUrls.editRelPublicClassificationIdList, data2).then(
|
||||
await Https.axiosPost(Https.httpUrls.batchUpdateLibraryName, data).then(
|
||||
(rv: any) => {
|
||||
bor = true
|
||||
}
|
||||
).catch((res)=>{
|
||||
});
|
||||
}
|
||||
if(this.renameType == 'total'){//多选修改标签
|
||||
await Https.axiosPost(Https.httpUrls.editRelPublicClassificationIdList, data2).then(
|
||||
(rv: any) => {
|
||||
bor = true
|
||||
}
|
||||
).catch((res)=>{
|
||||
});
|
||||
}else{
|
||||
await Https.axiosPost(Https.httpUrls.relationLibrary, data2).then(
|
||||
(rv: any) => {
|
||||
bor = true
|
||||
}
|
||||
).catch((res)=>{
|
||||
});
|
||||
|
||||
}
|
||||
let data3 = {
|
||||
libraryId:this.renameType === 'single' ? [this.selectSingleImg.id] : this.selectImgList,
|
||||
libraryId:this.renameType === 'total' ? this.selectImgList : [this.selectSingleImg.id],
|
||||
level2Type:this.editDesignType.value,
|
||||
}
|
||||
if(this.selectCode == 'Sketchboard'){
|
||||
@@ -305,7 +318,11 @@ export default defineComponent({
|
||||
});
|
||||
}
|
||||
let parent:any = this.$parent
|
||||
parent.getLibraryList('')
|
||||
if(this.selectCode == 'History'){
|
||||
parent.getHistoryList()
|
||||
}else{
|
||||
parent.getLibraryList('')
|
||||
}
|
||||
this.closeRenameModal()
|
||||
},
|
||||
dropdownVisibleChange1(){
|
||||
|
||||
@@ -326,6 +326,8 @@ export default defineComponent({
|
||||
"updateTime": "",
|
||||
"userId": ''
|
||||
}
|
||||
console.log(this.type);
|
||||
|
||||
return data
|
||||
},
|
||||
deleteShow(value:any){
|
||||
|
||||
Reference in New Issue
Block a user