history标签功能
This commit is contained in:
@@ -681,6 +681,10 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
isLoadCanvas = true;
|
isLoadCanvas = true;
|
||||||
canvas.loadFromJSON(canvasState.value[index], () => {
|
canvas.loadFromJSON(canvasState.value[index], () => {
|
||||||
|
canvas.forEachObject(function(obj) {
|
||||||
|
obj.cornerSize = 10
|
||||||
|
obj.transparentCorners=false
|
||||||
|
});
|
||||||
canvas.renderAll();
|
canvas.renderAll();
|
||||||
stateIndex.value = index;
|
stateIndex.value = index;
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ export default defineComponent({
|
|||||||
]
|
]
|
||||||
let sex:any = ref('Meal')
|
let sex:any = ref('Meal')
|
||||||
let designType:any = ref('Outwear')
|
let designType:any = ref('Outwear')
|
||||||
let renameType:any = ref('single')//修改名字的方式single-单个 batch-批量
|
let renameType:any = ref('total')//修改名字的方式single-单个 batch-批量
|
||||||
let selectImgList:any = ref([])
|
let selectImgList:any = ref([])
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@@ -164,12 +164,12 @@ export default defineComponent({
|
|||||||
let parent:any = this.$parent
|
let parent:any = this.$parent
|
||||||
this.selectCode = parent.selectCode || ''
|
this.selectCode = parent.selectCode || ''
|
||||||
this.value = parent.value || ''
|
this.value = parent.value || ''
|
||||||
this.disignTypeList = parent.disignTypeList || ''
|
this.disignTypeList = parent.disignTypeList || []
|
||||||
this.sexList = parent.sexList || ''
|
this.sexList = parent.sexList || []
|
||||||
this.sex = parent.sex || ''
|
this.sex = parent.sex || ''
|
||||||
this.designType = parent.designType || ''
|
this.designType = parent.designType || ''
|
||||||
this.selectImgList = parent.selectImgList || ''
|
this.selectImgList = parent.selectImgList || ''
|
||||||
this.options = parent.options || ''
|
this.options = parent.options || []
|
||||||
|
|
||||||
this.newPicName = ''
|
this.newPicName = ''
|
||||||
this.editSex = this.sex
|
this.editSex = this.sex
|
||||||
@@ -199,7 +199,8 @@ export default defineComponent({
|
|||||||
this.value.editLabelValue = []
|
this.value.editLabelValue = []
|
||||||
this.selectSingleImg = data
|
this.selectSingleImg = data
|
||||||
this.newPicName = data.name
|
this.newPicName = data.name
|
||||||
if(type === 'single'){
|
|
||||||
|
if(type === 'total'){
|
||||||
Https.axiosPost(Https.httpUrls.getRelClassificationIdList, classData).then(
|
Https.axiosPost(Https.httpUrls.getRelClassificationIdList, classData).then(
|
||||||
(rv: any) => {
|
(rv: any) => {
|
||||||
this.value.editLabelValue = rv
|
this.value.editLabelValue = rv
|
||||||
@@ -207,7 +208,11 @@ export default defineComponent({
|
|||||||
).catch((res)=>{
|
).catch((res)=>{
|
||||||
});
|
});
|
||||||
}else{
|
}else{
|
||||||
classData.libraryIdList = data
|
if(this.selectCode == 'History'){
|
||||||
|
classData.libraryIdList = [data.id]
|
||||||
|
}else{
|
||||||
|
classData.libraryIdList = data
|
||||||
|
}
|
||||||
Https.axiosPost(Https.httpUrls.getRelPublicClassificationIdList, classData).then(
|
Https.axiosPost(Https.httpUrls.getRelPublicClassificationIdList, classData).then(
|
||||||
(rv: any) => {
|
(rv: any) => {
|
||||||
this.value.editLabelValue = rv
|
this.value.editLabelValue = rv
|
||||||
@@ -247,8 +252,10 @@ export default defineComponent({
|
|||||||
},
|
},
|
||||||
async confrimRename(){
|
async confrimRename(){
|
||||||
let data = {
|
let data = {
|
||||||
libraryIds:this.renameType === 'single' ? [this.selectSingleImg.id] : this.selectImgList,
|
libraryIds:this.renameType === 'total' ? this.selectImgList : [this.selectSingleImg.id] ,
|
||||||
libraryName:this.newPicName,
|
libraryName:this.newPicName,//library名字
|
||||||
|
userGroupName:this.newPicName,//history名字
|
||||||
|
userGroupId :this.selectSingleImg.id,//history id
|
||||||
timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,
|
timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,
|
||||||
}
|
}
|
||||||
let designType = this.selectCode == 'Sketchboard' || this.selectCode == 'MarketingSketch' ? this.designType.value : ''
|
let designType = this.selectCode == 'Sketchboard' || this.selectCode == 'MarketingSketch' ? this.designType.value : ''
|
||||||
@@ -261,40 +268,46 @@ export default defineComponent({
|
|||||||
"classificationName": "",
|
"classificationName": "",
|
||||||
"createTime": "",
|
"createTime": "",
|
||||||
"id": 0,
|
"id": 0,
|
||||||
"libraryIdList": this.renameType === 'single' ? [this.selectSingleImg.id] : this.selectImgList,
|
"libraryIdList": this.renameType === 'total' ? this.selectImgList : [this.selectSingleImg.id],
|
||||||
"type": this.selectCode,
|
"type": this.selectCode,
|
||||||
"updateTime": "",
|
"updateTime": "",
|
||||||
"userId": 0
|
"userId": 0
|
||||||
}
|
}
|
||||||
let bor = false
|
let bor = false
|
||||||
if(this.newPicName){//多选修改名字
|
if(this.newPicName && this.selectCode == 'History'){//多选修改名字
|
||||||
await Https.axiosPost(Https.httpUrls.batchUpdateLibraryName, data).then(
|
|
||||||
(rv: any) => {
|
await Https.axiosPost(Https.httpUrls.updateUserGroupName, data).then(
|
||||||
// if(this.renameType ==='batch'){
|
|
||||||
// this.selectImgList = []
|
|
||||||
// }
|
|
||||||
bor = true
|
|
||||||
}
|
|
||||||
).catch((res)=>{
|
|
||||||
});
|
|
||||||
}
|
|
||||||
if(this.renameType == 'single'){//多选修改标签
|
|
||||||
await Https.axiosPost(Https.httpUrls.relationLibrary, data2).then(
|
|
||||||
(rv: any) => {
|
(rv: any) => {
|
||||||
bor = true
|
bor = true
|
||||||
}
|
}
|
||||||
).catch((res)=>{
|
).catch((res)=>{
|
||||||
});
|
});
|
||||||
}else{
|
}else{
|
||||||
await Https.axiosPost(Https.httpUrls.editRelPublicClassificationIdList, data2).then(
|
await Https.axiosPost(Https.httpUrls.batchUpdateLibraryName, data).then(
|
||||||
(rv: any) => {
|
(rv: any) => {
|
||||||
bor = true
|
bor = true
|
||||||
}
|
}
|
||||||
).catch((res)=>{
|
).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 = {
|
let data3 = {
|
||||||
libraryId:this.renameType === 'single' ? [this.selectSingleImg.id] : this.selectImgList,
|
libraryId:this.renameType === 'total' ? this.selectImgList : [this.selectSingleImg.id],
|
||||||
level2Type:this.editDesignType.value,
|
level2Type:this.editDesignType.value,
|
||||||
}
|
}
|
||||||
if(this.selectCode == 'Sketchboard'){
|
if(this.selectCode == 'Sketchboard'){
|
||||||
@@ -305,7 +318,11 @@ export default defineComponent({
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
let parent:any = this.$parent
|
let parent:any = this.$parent
|
||||||
parent.getLibraryList('')
|
if(this.selectCode == 'History'){
|
||||||
|
parent.getHistoryList()
|
||||||
|
}else{
|
||||||
|
parent.getLibraryList('')
|
||||||
|
}
|
||||||
this.closeRenameModal()
|
this.closeRenameModal()
|
||||||
},
|
},
|
||||||
dropdownVisibleChange1(){
|
dropdownVisibleChange1(){
|
||||||
|
|||||||
@@ -326,6 +326,8 @@ export default defineComponent({
|
|||||||
"updateTime": "",
|
"updateTime": "",
|
||||||
"userId": ''
|
"userId": ''
|
||||||
}
|
}
|
||||||
|
console.log(this.type);
|
||||||
|
|
||||||
return data
|
return data
|
||||||
},
|
},
|
||||||
deleteShow(value:any){
|
deleteShow(value:any){
|
||||||
|
|||||||
@@ -107,7 +107,6 @@ router.beforeEach((to, from, next) => {
|
|||||||
// 如果页面存在,正常跳转
|
// 如果页面存在,正常跳转
|
||||||
next();
|
next();
|
||||||
}
|
}
|
||||||
next();
|
|
||||||
} else {
|
} else {
|
||||||
// 如果页面不存在,可以跳转到404页面或者其他页面
|
// 如果页面不存在,可以跳转到404页面或者其他页面
|
||||||
next('/404');
|
next('/404');
|
||||||
|
|||||||
@@ -79,28 +79,13 @@
|
|||||||
</div>
|
</div>
|
||||||
<HistoryDetail ref="historyDetail" :groupDetails="groupDetails" :collectionName="collectionName"></HistoryDetail>
|
<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>
|
<setLabel ref="setLabel"></setLabel>
|
||||||
<RobotAssist></RobotAssist>
|
<RobotAssist></RobotAssist>
|
||||||
|
<searchLabel ref="searchLabel"></searchLabel>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts">
|
<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 HeaderComponent from "@/component/HomePage/Header.vue";
|
||||||
import HistoryDetail from "@/component/Detail/HistoryDetail.vue";
|
import HistoryDetail from "@/component/Detail/HistoryDetail.vue";
|
||||||
import { Https } from "@/tool/https";
|
import { Https } from "@/tool/https";
|
||||||
@@ -111,6 +96,7 @@ import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
|||||||
import { ElCascader } from 'element-plus'
|
import { ElCascader } from 'element-plus'
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import setLabel from '@/component/LibraryPage/setLabel.vue';
|
import setLabel from '@/component/LibraryPage/setLabel.vue';
|
||||||
|
import searchLabel from '@/component/LibraryPage/searchLabel.vue';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: {
|
components: {
|
||||||
@@ -118,7 +104,8 @@ export default defineComponent({
|
|||||||
HistoryDetail,
|
HistoryDetail,
|
||||||
RobotAssist,
|
RobotAssist,
|
||||||
setLabel,
|
setLabel,
|
||||||
ElCascader
|
ElCascader,
|
||||||
|
searchLabel
|
||||||
},
|
},
|
||||||
setup() {
|
setup() {
|
||||||
let rangePickerValue:any = ref([])
|
let rangePickerValue:any = ref([])
|
||||||
@@ -159,7 +146,12 @@ export default defineComponent({
|
|||||||
label:'classificationName',
|
label:'classificationName',
|
||||||
}
|
}
|
||||||
let intersection = ref(1)
|
let intersection = ref(1)
|
||||||
|
let selectCode = ref('History')
|
||||||
|
let type:any = {
|
||||||
|
selectCode:selectCode,
|
||||||
|
designType:''
|
||||||
|
}
|
||||||
|
provide('type',type)
|
||||||
return {
|
return {
|
||||||
rangePickerValue,
|
rangePickerValue,
|
||||||
columns,
|
columns,
|
||||||
@@ -170,6 +162,7 @@ export default defineComponent({
|
|||||||
value,
|
value,
|
||||||
props,
|
props,
|
||||||
intersection,
|
intersection,
|
||||||
|
selectCode,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data(){
|
data(){
|
||||||
@@ -179,7 +172,6 @@ export default defineComponent({
|
|||||||
total:0,
|
total:0,
|
||||||
historyTableHeight:0,
|
historyTableHeight:0,
|
||||||
newCollectionName:'',
|
newCollectionName:'',
|
||||||
renameVisivle:false,//修改名字弹窗
|
|
||||||
groupDetails:{},//每个collection的详情
|
groupDetails:{},//每个collection的详情
|
||||||
collectionName:'',//选中的名字
|
collectionName:'',//选中的名字
|
||||||
searchCollectionName:'',
|
searchCollectionName:'',
|
||||||
@@ -189,8 +181,39 @@ export default defineComponent({
|
|||||||
let historyTable:any = this.$refs.historyTable
|
let historyTable:any = this.$refs.historyTable
|
||||||
this.historyTableHeight = historyTable.clientHeight - 130
|
this.historyTableHeight = historyTable.clientHeight - 130
|
||||||
this.getHistoryList()
|
this.getHistoryList()
|
||||||
|
this.getClass()
|
||||||
},
|
},
|
||||||
methods:{
|
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){
|
turnToDetail(record:any){
|
||||||
this.groupDetails = record.groupDetails
|
this.groupDetails = record.groupDetails
|
||||||
let historyDetail:any = this.$refs.historyDetail
|
let historyDetail:any = this.$refs.historyDetail
|
||||||
@@ -222,7 +245,24 @@ export default defineComponent({
|
|||||||
startDate:startDate,
|
startDate:startDate,
|
||||||
endDate:endDate
|
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.queryUserGroup, data).then(
|
||||||
|
// Https.axiosPost( Https.httpUrls.queryLibraryPage, data).then(
|
||||||
(rv: any) => {
|
(rv: any) => {
|
||||||
if(this.currentPage > 1 && rv.content.length == 0){
|
if(this.currentPage > 1 && rv.content.length == 0){
|
||||||
this.currentPage = 1
|
this.currentPage = 1
|
||||||
@@ -231,7 +271,6 @@ export default defineComponent({
|
|||||||
this.collectionList = rv.content
|
this.collectionList = rv.content
|
||||||
this.total = rv.total
|
this.total = rv.total
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
@@ -264,30 +303,8 @@ export default defineComponent({
|
|||||||
|
|
||||||
//修改名字
|
//修改名字
|
||||||
renameCollection(record:any,index:number){
|
renameCollection(record:any,index:number){
|
||||||
this.renameVisivle = true
|
let searchLabel:any = this.$refs.searchLabel
|
||||||
this.renameData = {
|
searchLabel.init(record,index)
|
||||||
...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 = {}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
retrieveHome(record:any){
|
retrieveHome(record:any){
|
||||||
@@ -332,34 +349,6 @@ export default defineComponent({
|
|||||||
el.innerHTML = this.t('LibraryPage.NoLabel')
|
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>
|
</script>
|
||||||
|
|||||||
@@ -139,7 +139,7 @@
|
|||||||
<div class="img_operate_block" :title="t('LibraryPage.Point')" @click.stop="editPlacementClick(img)" v-show="selectCode === 'Models'">
|
<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>
|
<span class="icon iconfont icon-dianwei operate_icon"></span>
|
||||||
</div>
|
</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>
|
<span class="icon iconfont icon-tianxie operate_icon"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="img_operate_block" :title="t('LibraryPage.Delete')" @click.stop="deleteSinglePic(img,index)">
|
<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.designType = arr[0]
|
||||||
this.disignTypeList = arr
|
this.disignTypeList = arr
|
||||||
// this.workspaceItem.position = this.singleTypeList[0].label
|
// this.workspaceItem.position = this.totalTypeList[0].label
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user