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){
|
||||
|
||||
@@ -107,7 +107,6 @@ router.beforeEach((to, from, next) => {
|
||||
// 如果页面存在,正常跳转
|
||||
next();
|
||||
}
|
||||
next();
|
||||
} else {
|
||||
// 如果页面不存在,可以跳转到404页面或者其他页面
|
||||
next('/404');
|
||||
|
||||
@@ -79,28 +79,13 @@
|
||||
</div>
|
||||
<HistoryDetail ref="historyDetail" :groupDetails="groupDetails" :collectionName="collectionName"></HistoryDetail>
|
||||
|
||||
<a-modal class="rename_modal_component"
|
||||
v-model:visible="renameVisivle"
|
||||
:footer="null"
|
||||
:title="renameData?.name"
|
||||
:keyboard="false"
|
||||
width="56rem"
|
||||
:maskClosable="false"
|
||||
:centered="true"
|
||||
>
|
||||
<div class="collection_rename_content">
|
||||
<div class="rename_form_content">
|
||||
<input class="rename_form_input" :placeholder="$t('HistoryPage.inputContent2')" v-model="newCollectionName" @keydown.enter="confrimRename()">
|
||||
</div>
|
||||
<div class="rename_submit_button" @click="confrimRename()">{{ $t('HistoryPage.Submit') }}</div>
|
||||
</div>
|
||||
</a-modal>
|
||||
<setLabel ref="setLabel"></setLabel>
|
||||
<RobotAssist></RobotAssist>
|
||||
<searchLabel ref="searchLabel"></searchLabel>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { defineComponent,ref,createVNode,computed,nextTick} from 'vue'
|
||||
import { defineComponent,ref,createVNode,computed,nextTick,provide} from 'vue'
|
||||
import HeaderComponent from "@/component/HomePage/Header.vue";
|
||||
import HistoryDetail from "@/component/Detail/HistoryDetail.vue";
|
||||
import { Https } from "@/tool/https";
|
||||
@@ -111,6 +96,7 @@ import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
||||
import { ElCascader } from 'element-plus'
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import setLabel from '@/component/LibraryPage/setLabel.vue';
|
||||
import searchLabel from '@/component/LibraryPage/searchLabel.vue';
|
||||
|
||||
export default defineComponent({
|
||||
components: {
|
||||
@@ -118,7 +104,8 @@ export default defineComponent({
|
||||
HistoryDetail,
|
||||
RobotAssist,
|
||||
setLabel,
|
||||
ElCascader
|
||||
ElCascader,
|
||||
searchLabel
|
||||
},
|
||||
setup() {
|
||||
let rangePickerValue:any = ref([])
|
||||
@@ -159,7 +146,12 @@ export default defineComponent({
|
||||
label:'classificationName',
|
||||
}
|
||||
let intersection = ref(1)
|
||||
|
||||
let selectCode = ref('History')
|
||||
let type:any = {
|
||||
selectCode:selectCode,
|
||||
designType:''
|
||||
}
|
||||
provide('type',type)
|
||||
return {
|
||||
rangePickerValue,
|
||||
columns,
|
||||
@@ -170,6 +162,7 @@ export default defineComponent({
|
||||
value,
|
||||
props,
|
||||
intersection,
|
||||
selectCode,
|
||||
}
|
||||
},
|
||||
data(){
|
||||
@@ -179,7 +172,6 @@ export default defineComponent({
|
||||
total:0,
|
||||
historyTableHeight:0,
|
||||
newCollectionName:'',
|
||||
renameVisivle:false,//修改名字弹窗
|
||||
groupDetails:{},//每个collection的详情
|
||||
collectionName:'',//选中的名字
|
||||
searchCollectionName:'',
|
||||
@@ -189,8 +181,39 @@ export default defineComponent({
|
||||
let historyTable:any = this.$refs.historyTable
|
||||
this.historyTableHeight = historyTable.clientHeight - 130
|
||||
this.getHistoryList()
|
||||
this.getClass()
|
||||
},
|
||||
methods:{
|
||||
getClass(){
|
||||
let data = {
|
||||
"classificationIdList": [],
|
||||
"classificationName": "",
|
||||
"createTime": "",
|
||||
"deleteConfirm": '',
|
||||
"id": '',
|
||||
"libraryId": '',
|
||||
"parentId": '',
|
||||
"type": this.selectCode,
|
||||
"updateTime": "",
|
||||
"userId": ''
|
||||
}
|
||||
|
||||
console.log(data);
|
||||
Https.axiosPost(Https.httpUrls.queryClassification, data).then(
|
||||
(rv: any) => {
|
||||
this.options = rv
|
||||
rv.forEach((rvItem:any,rvIndex:number) => {
|
||||
this.options[rvIndex].value = rvItem.id
|
||||
this.options[rvIndex].label = rvItem.classificationName
|
||||
rvItem.childList.forEach((childItem:any,index:number) => {
|
||||
this.options[rvIndex].childList[index].value = childItem.id
|
||||
this.options[rvIndex].childList[index].label = childItem.classificationName
|
||||
});
|
||||
});
|
||||
}
|
||||
).catch((res)=>{
|
||||
});
|
||||
},
|
||||
turnToDetail(record:any){
|
||||
this.groupDetails = record.groupDetails
|
||||
let historyDetail:any = this.$refs.historyDetail
|
||||
@@ -222,7 +245,24 @@ export default defineComponent({
|
||||
startDate:startDate,
|
||||
endDate:endDate
|
||||
}
|
||||
let labelArr:any = []
|
||||
this.value.labelValue.forEach((item:any)=>{
|
||||
labelArr.push(item[item.length-1])
|
||||
})
|
||||
// console.log(this.value.labelValue);
|
||||
|
||||
// let data = {
|
||||
// classificationIdList:labelArr,
|
||||
// level1Type:this.selectCode,
|
||||
// level2Type:'',
|
||||
// page:1,
|
||||
// modelSex:'',
|
||||
// pictureName:this.searchCollectionName,
|
||||
// size:this.pageSize,
|
||||
// intersection:this.intersection,
|
||||
// }
|
||||
Https.axiosPost( Https.httpUrls.queryUserGroup, data).then(
|
||||
// Https.axiosPost( Https.httpUrls.queryLibraryPage, data).then(
|
||||
(rv: any) => {
|
||||
if(this.currentPage > 1 && rv.content.length == 0){
|
||||
this.currentPage = 1
|
||||
@@ -231,7 +271,6 @@ export default defineComponent({
|
||||
this.collectionList = rv.content
|
||||
this.total = rv.total
|
||||
}
|
||||
|
||||
}
|
||||
);
|
||||
},
|
||||
@@ -264,30 +303,8 @@ export default defineComponent({
|
||||
|
||||
//修改名字
|
||||
renameCollection(record:any,index:number){
|
||||
this.renameVisivle = true
|
||||
this.renameData = {
|
||||
...record,
|
||||
index:index
|
||||
}
|
||||
},
|
||||
|
||||
//确定修改名字
|
||||
confrimRename(){
|
||||
let data = {
|
||||
timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone,
|
||||
userGroupId: this.renameData.id,
|
||||
userGroupName: this.newCollectionName
|
||||
}
|
||||
Https.axiosPost(Https.httpUrls.updateUserGroupName,data).then(
|
||||
(rv: any) => {
|
||||
message.success(this.t('HistoryPage.jsContent3'))
|
||||
this.collectionList[this.renameData.index].name = this.newCollectionName
|
||||
this.collectionList[this.renameData.index].updateDate = rv.updateDate
|
||||
this.renameVisivle = false
|
||||
this.newCollectionName = ''
|
||||
this.renameData = {}
|
||||
}
|
||||
);
|
||||
let searchLabel:any = this.$refs.searchLabel
|
||||
searchLabel.init(record,index)
|
||||
},
|
||||
|
||||
retrieveHome(record:any){
|
||||
@@ -332,34 +349,6 @@ export default defineComponent({
|
||||
el.innerHTML = this.t('LibraryPage.NoLabel')
|
||||
}
|
||||
},
|
||||
getClass(){
|
||||
let data = {
|
||||
"classificationIdList": [],
|
||||
"classificationName": "",
|
||||
"createTime": "",
|
||||
"deleteConfirm": '',
|
||||
"id": '',
|
||||
"libraryId": '',
|
||||
"parentId": '',
|
||||
"type": '',
|
||||
"updateTime": "",
|
||||
"userId": ''
|
||||
}
|
||||
Https.axiosPost(Https.httpUrls.queryClassification, data).then(
|
||||
(rv: any) => {
|
||||
this.options = rv
|
||||
rv.forEach((rvItem:any,rvIndex:number) => {
|
||||
this.options[rvIndex].value = rvItem.id
|
||||
this.options[rvIndex].label = rvItem.classificationName
|
||||
rvItem.childList.forEach((childItem:any,index:number) => {
|
||||
this.options[rvIndex].childList[index].value = childItem.id
|
||||
this.options[rvIndex].childList[index].label = childItem.classificationName
|
||||
});
|
||||
});
|
||||
}
|
||||
).catch((res)=>{
|
||||
});
|
||||
},
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
<div class="img_operate_block" :title="t('LibraryPage.Point')" @click.stop="editPlacementClick(img)" v-show="selectCode === 'Models'">
|
||||
<span class="icon iconfont icon-dianwei operate_icon"></span>
|
||||
</div>
|
||||
<div class="img_operate_block" :title="t('LibraryPage.Rename')" @click.stop="showRenameModal(img,'single')">
|
||||
<div class="img_operate_block" :title="t('LibraryPage.Rename')" @click.stop="showRenameModal(img,'total')">
|
||||
<span class="icon iconfont icon-tianxie operate_icon"></span>
|
||||
</div>
|
||||
<div class="img_operate_block" :title="t('LibraryPage.Delete')" @click.stop="deleteSinglePic(img,index)">
|
||||
@@ -573,7 +573,7 @@ export default defineComponent({
|
||||
});
|
||||
this.designType = arr[0]
|
||||
this.disignTypeList = arr
|
||||
// this.workspaceItem.position = this.singleTypeList[0].label
|
||||
// this.workspaceItem.position = this.totalTypeList[0].label
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user